diff --git a/migrations/updateMigrations.cmd b/migrations/updateMigrations.cmd new file mode 100644 index 0000000000..6e46ee2af6 --- /dev/null +++ b/migrations/updateMigrations.cmd @@ -0,0 +1,18 @@ +echo Make sure to have ran build.cmd once to ensure artifacts have been created. +rd "Company.WebApplication1" /s /q +mkdir "Company.WebApplication1" +dotnet new razor --auth Individual -i ..\artifacts\build\Microsoft.DotNet.Web.ProjectTemplates.*.nupkg -o Company.WebApplication1 +copy "Company.WebApplication1\Data\Migrations\*" "..\src\Microsoft.DotNet.Web.ProjectTemplates\content\RazorPagesWeb-CSharp\Data\SqlLite" +rd "Company.WebApplication1" /s /q +mkdir "Company.WebApplication1" +dotnet new razor --auth Individual --use-local-db -i ..\artifacts\build\Microsoft.DotNet.Web.ProjectTemplates.*.nupkg -o Company.WebApplication1 +copy "Company.WebApplication1\Data\Migrations\*" "..\src\Microsoft.DotNet.Web.ProjectTemplates\content\RazorPagesWeb-CSharp\Data\SqlServer" +rd "Company.WebApplication1" /s /q +mkdir "Company.WebApplication1" +dotnet new mvc --auth Individual --use-local-db -i ..\artifacts\build\Microsoft.DotNet.Web.ProjectTemplates.*.nupkg -o Company.WebApplication1 +copy "Company.WebApplication1\Data\Migrations\*" "..\src\Microsoft.DotNet.Web.ProjectTemplates\content\StarterWeb-CSharp\Data\SqlServer" +rd "Company.WebApplication1" /s /q +mkdir "Company.WebApplication1" +dotnet new mvc --auth Individual -i ..\artifacts\build\Microsoft.DotNet.Web.ProjectTemplates.*.nupkg -o Company.WebApplication1 +copy "Company.WebApplication1\Data\Migrations\*" "..\src\Microsoft.DotNet.Web.ProjectTemplates\content\StarterWeb-CSharp\Data\SqlLite" +rd "Company.WebApplication1" /s /q diff --git a/test/Templates.Test/Helpers/TemplateTestBase.cs b/test/Templates.Test/Helpers/TemplateTestBase.cs index b42eba6ae3..ff7e63ffa0 100644 --- a/test/Templates.Test/Helpers/TemplateTestBase.cs +++ b/test/Templates.Test/Helpers/TemplateTestBase.cs @@ -107,6 +107,7 @@ namespace Templates.Test } } + // If this fails, you should generate new migrations via migrations/updateMigrations.cmd protected void AssertEmptyMigration(string migration) { var fullPath = Path.Combine(TemplateOutputDir, "Data/Migrations");