using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace DysonNetwork.Sphere.Data.Migrations { /// public partial class AddOidcProviderSupport : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.RenameColumn( name: "remarks", table: "custom_app_secrets", newName: "description"); migrationBuilder.AddColumn( name: "allow_offline_access", table: "custom_apps", type: "boolean", nullable: false, defaultValue: false); migrationBuilder.AddColumn( name: "allowed_grant_types", table: "custom_apps", type: "character varying(256)", maxLength: 256, nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "allowed_scopes", table: "custom_apps", type: "character varying(256)", maxLength: 256, nullable: true); migrationBuilder.AddColumn( name: "client_uri", table: "custom_apps", type: "character varying(1024)", maxLength: 1024, nullable: true); migrationBuilder.AddColumn( name: "logo_uri", table: "custom_apps", type: "character varying(4096)", maxLength: 4096, nullable: true); migrationBuilder.AddColumn( name: "post_logout_redirect_uris", table: "custom_apps", type: "character varying(4096)", maxLength: 4096, nullable: true); migrationBuilder.AddColumn( name: "redirect_uris", table: "custom_apps", type: "character varying(4096)", maxLength: 4096, nullable: false, defaultValue: ""); migrationBuilder.AddColumn( name: "require_pkce", table: "custom_apps", type: "boolean", nullable: false, defaultValue: false); migrationBuilder.AddColumn( name: "is_oidc", table: "custom_app_secrets", type: "boolean", nullable: false, defaultValue: false); migrationBuilder.CreateIndex( name: "ix_custom_app_secrets_secret", table: "custom_app_secrets", column: "secret", unique: true); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropIndex( name: "ix_custom_app_secrets_secret", table: "custom_app_secrets"); migrationBuilder.DropColumn( name: "allow_offline_access", table: "custom_apps"); migrationBuilder.DropColumn( name: "allowed_grant_types", table: "custom_apps"); migrationBuilder.DropColumn( name: "allowed_scopes", table: "custom_apps"); migrationBuilder.DropColumn( name: "client_uri", table: "custom_apps"); migrationBuilder.DropColumn( name: "logo_uri", table: "custom_apps"); migrationBuilder.DropColumn( name: "post_logout_redirect_uris", table: "custom_apps"); migrationBuilder.DropColumn( name: "redirect_uris", table: "custom_apps"); migrationBuilder.DropColumn( name: "require_pkce", table: "custom_apps"); migrationBuilder.DropColumn( name: "is_oidc", table: "custom_app_secrets"); migrationBuilder.RenameColumn( name: "description", table: "custom_app_secrets", newName: "remarks"); } } }