Add support for IsPublic to all Setting types, enable Url Mapping for internal links
This commit is contained in:
		| @ -0,0 +1,30 @@ | ||||
| using Microsoft.EntityFrameworkCore.Infrastructure; | ||||
| using Microsoft.EntityFrameworkCore.Migrations; | ||||
| using Oqtane.Databases.Interfaces; | ||||
| using Oqtane.Migrations.EntityBuilders; | ||||
| using Oqtane.Repository; | ||||
| using Oqtane.Shared; | ||||
|  | ||||
| namespace Oqtane.Migrations.Tenant | ||||
| { | ||||
|     [DbContext(typeof(TenantDBContext))] | ||||
|     [Migration("Tenant.03.00.02.01")] | ||||
|     public class UpdateSettingIsPublic : MultiDatabaseMigration | ||||
|     { | ||||
|         public UpdateSettingIsPublic(IDatabase database) : base(database) | ||||
|         { | ||||
|         } | ||||
|  | ||||
|         protected override void Up(MigrationBuilder migrationBuilder) | ||||
|         { | ||||
|             var settingEntityBuilder = new SettingEntityBuilder(migrationBuilder, ActiveDatabase); | ||||
|             settingEntityBuilder.UpdateColumn("IsPublic", "1", "bool", "SettingName NOT LIKE 'SMTP%'"); | ||||
|         } | ||||
|  | ||||
|         protected override void Down(MigrationBuilder migrationBuilder) | ||||
|         { | ||||
|             var settingEntityBuilder = new SettingEntityBuilder(migrationBuilder, ActiveDatabase); | ||||
|             settingEntityBuilder.UpdateColumn("IsPublic", "0", "bool", "SettingName NOT LIKE 'SMTP%'"); | ||||
|         } | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 Shaun Walker
					Shaun Walker