Fix mysql

This commit is contained in:
nicolas.dorier 2020-02-14 00:02:47 +09:00
parent a2d657f5cb
commit ff4c7c364e
No known key found for this signature in database
GPG Key ID: 6618763EF09186FE

View File

@ -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<string>(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<string>(name: "Id", table: "AspNetUsers", maxLength: maxLength);
}
migrationBuilder.CreateTable(
name: "OpenIddictScopes",
columns: table => new