diff --git a/BTCPayServer.Data/Migrations/20190225091644_AddOpenIddict.cs b/BTCPayServer.Data/Migrations/20190225091644_AddOpenIddict.cs index 9ba5de138..cdc3b848b 100644 --- a/BTCPayServer.Data/Migrations/20190225091644_AddOpenIddict.cs +++ b/BTCPayServer.Data/Migrations/20190225091644_AddOpenIddict.cs @@ -12,6 +12,10 @@ namespace BTCPayServer.Migrations protected override void Up(MigrationBuilder migrationBuilder) { int? maxLength = this.IsMySql(migrationBuilder.ActiveProvider) ? (int?)255 : null; + if (this.IsMySql(migrationBuilder.ActiveProvider)) + { + migrationBuilder.AlterColumn(name: "Id", table: "AspNetUsers", maxLength: maxLength); + } migrationBuilder.CreateTable( name: "OpenIddictApplications", columns: table => new @@ -40,11 +44,6 @@ namespace BTCPayServer.Migrations onDelete: ReferentialAction.Restrict); }); - if (this.IsMySql(migrationBuilder.ActiveProvider)) - { - migrationBuilder.AlterColumn(name: "Id", table: "AspNetUsers", maxLength: maxLength); - } - migrationBuilder.CreateTable( name: "OpenIddictScopes", columns: table => new