diff --git a/BTCPayServer.Data/Migrations/20210314092253_Fido2Credentials.cs b/BTCPayServer.Data/Migrations/20210314092253_Fido2Credentials.cs index 6ec5bbdf7..0842644d5 100644 --- a/BTCPayServer.Data/Migrations/20210314092253_Fido2Credentials.cs +++ b/BTCPayServer.Data/Migrations/20210314092253_Fido2Credentials.cs @@ -1,4 +1,4 @@ -using System; +using System; using Microsoft.EntityFrameworkCore.Migrations; using BTCPayServer.Data; using Microsoft.EntityFrameworkCore.Infrastructure; @@ -11,13 +11,14 @@ namespace BTCPayServer.Migrations { protected override void Up(MigrationBuilder migrationBuilder) { + int? maxLength = this.IsMySql(migrationBuilder.ActiveProvider) ? (int?)255 : null; migrationBuilder.CreateTable( name: "Fido2Credentials", columns: table => new { - Id = table.Column(nullable: false), + Id = table.Column(nullable: false, maxLength: maxLength), Name = table.Column(nullable: true), - ApplicationUserId = table.Column(nullable: true), + ApplicationUserId = table.Column(nullable: true, maxLength: maxLength), Blob = table.Column(nullable: true), Type = table.Column(nullable: false) },