mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-22 22:25:28 +01:00
Fix mysql
This commit is contained in:
parent
ff4c7c364e
commit
ee9905e85a
1 changed files with 2 additions and 5 deletions
|
@ -12,10 +12,6 @@ namespace BTCPayServer.Migrations
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
{
|
{
|
||||||
int? maxLength = this.IsMySql(migrationBuilder.ActiveProvider) ? (int?)255 : null;
|
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(
|
migrationBuilder.CreateTable(
|
||||||
name: "OpenIddictApplications",
|
name: "OpenIddictApplications",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
|
@ -31,7 +27,8 @@ namespace BTCPayServer.Migrations
|
||||||
Properties = table.Column<string>(nullable: true),
|
Properties = table.Column<string>(nullable: true),
|
||||||
RedirectUris = table.Column<string>(nullable: true),
|
RedirectUris = table.Column<string>(nullable: true),
|
||||||
Type = table.Column<string>(maxLength: 25, nullable: false),
|
Type = table.Column<string>(maxLength: 25, nullable: false),
|
||||||
ApplicationUserId = table.Column<string>(nullable: true, maxLength: maxLength)
|
// do not set the maxLength, else http://MySql.Data.MySqlClient.MySqlException (0x80004005): Can't create table `btcpay`.`OpenIddictApplications` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||||
|
ApplicationUserId = table.Column<string>(nullable: true)
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue