Fix Upgrade issue with new componentized Database projects
This commit is contained in:
		| @ -24,7 +24,7 @@ namespace Oqtane.Migrations | ||||
|             siteEntityBuilder.Create(); | ||||
|  | ||||
|             //Add Column to Site table (for Sql Server only) we will drop it later for Sql Server only | ||||
|             if (ActiveDatabase.Name == "SqlServer" || ActiveDatabase.Name == "LocalDB") | ||||
|             if (ActiveDatabase.Name == "SqlServer") | ||||
|             { | ||||
|                 siteEntityBuilder.AddStringColumn("DefaultLayoutType", 200, true); | ||||
|             } | ||||
| @ -35,7 +35,7 @@ namespace Oqtane.Migrations | ||||
|             pageEntityBuilder.AddIndex("IX_Page", new [] {"SiteId", "Path", "UserId"}, true); | ||||
|  | ||||
|             //Add Columns to Page table (for Sql Server only) we will drop them later for Sql Server only | ||||
|             if (ActiveDatabase.Name == "SqlServer" || ActiveDatabase.Name == "LocalDB") | ||||
|             if (ActiveDatabase.Name == "SqlServer") | ||||
|             { | ||||
|                 pageEntityBuilder.AddBooleanColumn("EditMode"); | ||||
|                 pageEntityBuilder.AddStringColumn("LayoutType", 200, true); | ||||
|  | ||||
| @ -19,7 +19,7 @@ namespace Oqtane.Migrations | ||||
|         protected override void Up(MigrationBuilder migrationBuilder) | ||||
|         { | ||||
|             //Drop Column from Page table | ||||
|             if (ActiveDatabase.Name == "SqlServer" || ActiveDatabase.Name == "LocalDB") | ||||
|             if (ActiveDatabase.Name == "SqlServer") | ||||
|             { | ||||
|                 var pageEntityBuilder = new PageEntityBuilder(migrationBuilder, ActiveDatabase); | ||||
|                 pageEntityBuilder.DropColumn("EditMode"); | ||||
|  | ||||
| @ -26,7 +26,7 @@ namespace Oqtane.Migrations | ||||
|             profileEntityBuilder.UpdateColumn("Options", "''"); | ||||
|  | ||||
|             //Alter Column in Page table for Sql Server | ||||
|             if (ActiveDatabase.Name == "SqlServer" || ActiveDatabase.Name == "LocalDB") | ||||
|             if (ActiveDatabase.Name == "SqlServer") | ||||
|             { | ||||
|                 var pageEntityBuilder = new PageEntityBuilder(migrationBuilder, ActiveDatabase); | ||||
|                 pageEntityBuilder.DropIndex("IX_Page"); | ||||
| @ -42,7 +42,7 @@ namespace Oqtane.Migrations | ||||
|             profileEntityBuilder.DropColumn("Options"); | ||||
|  | ||||
|             //Alter Column in Page table | ||||
|             if (ActiveDatabase.Name == "SqlServer" || ActiveDatabase.Name == "LocalDB") | ||||
|             if (ActiveDatabase.Name == "SqlServer") | ||||
|             { | ||||
|                 var pageEntityBuilder = new PageEntityBuilder(migrationBuilder, ActiveDatabase); | ||||
|                 pageEntityBuilder.DropIndex("IX_Page"); | ||||
|  | ||||
| @ -18,7 +18,7 @@ namespace Oqtane.Migrations | ||||
|  | ||||
|         protected override void Up(MigrationBuilder migrationBuilder) | ||||
|         { | ||||
|             if (ActiveDatabase.Name == "SqlServer" || ActiveDatabase.Name == "LocalDB") | ||||
|             if (ActiveDatabase.Name == "SqlServer") | ||||
|             { | ||||
|                 //Update DefaultContainerType In Site | ||||
|                 var siteEntityBuilder = new SiteEntityBuilder(migrationBuilder, ActiveDatabase); | ||||
|  | ||||
| @ -18,7 +18,7 @@ namespace Oqtane.Migrations | ||||
|  | ||||
|         protected override void Up(MigrationBuilder migrationBuilder) | ||||
|         { | ||||
|             if (ActiveDatabase.Name == "SqlServer" || ActiveDatabase.Name == "LocalDB") | ||||
|             if (ActiveDatabase.Name == "SqlServer") | ||||
|             { | ||||
|                 //Alter Column in Setting table for Sql Server | ||||
|                 var settingEntityBuilder = new SettingEntityBuilder(migrationBuilder, ActiveDatabase); | ||||
|  | ||||
| @ -24,7 +24,7 @@ namespace Oqtane.Migrations | ||||
|             appVersionsEntityBuilder.Create(); | ||||
|  | ||||
|             //Finish SqlServer Migration from DbUp | ||||
|             if (ActiveDatabase.Name == "SqlServer" || ActiveDatabase.Name == "LocalDB") | ||||
|             if (ActiveDatabase.Name == "SqlServer") | ||||
|             { | ||||
|                 //Version 1.0.0 | ||||
|                 InsertVersion(migrationBuilder, "01.00.00", "Oqtane.Scripts.Master.00.09.00.00.sql"); | ||||
|  | ||||
| @ -23,9 +23,9 @@ namespace Oqtane.Migrations | ||||
|             tenantEntityBuilder.AddStringColumn("DBType", 200, true); | ||||
|  | ||||
|             //Update new column if SqlServer (Other Databases will not have any records yet) | ||||
|             if (ActiveDatabase.Name == "SqlServer" || ActiveDatabase.Name == "LocalDB") | ||||
|             if (ActiveDatabase.Name == "SqlServer") | ||||
|             { | ||||
|                 tenantEntityBuilder.UpdateColumn("DBType", "'SqlServer'"); | ||||
|                 tenantEntityBuilder.UpdateColumn("DBType", ActiveDatabase.TypeName); | ||||
|             } | ||||
|         } | ||||
|     } | ||||
|  | ||||
| @ -26,7 +26,7 @@ namespace Oqtane.Migrations.EntityBuilders | ||||
|         { | ||||
|             PageId = AddAutoIncrementColumn(table,"PageId"); | ||||
|             SiteId = AddIntegerColumn(table,"SiteId"); | ||||
|             if (ActiveDatabase.Name == "SqlServer" || ActiveDatabase.Name == "LocalDB") | ||||
|             if (ActiveDatabase.Name == "SqlServer") | ||||
|             { | ||||
|                 Path = AddStringColumn(table,"Path", 50); | ||||
|             } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Charles Nurse
					Charles Nurse