From 1fed7fb5afb4cd48b73d3478cdd7ea0af35ece3b Mon Sep 17 00:00:00 2001 From: ketominer Date: Sun, 7 Feb 2021 21:14:31 +0100 Subject: [PATCH] fix for sqlite --- .../20201208054211_invoicesorderindex.cs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/BTCPayServer.Data/Migrations/20201208054211_invoicesorderindex.cs b/BTCPayServer.Data/Migrations/20201208054211_invoicesorderindex.cs index 5802fba85..a93f4198f 100644 --- a/BTCPayServer.Data/Migrations/20201208054211_invoicesorderindex.cs +++ b/BTCPayServer.Data/Migrations/20201208054211_invoicesorderindex.cs @@ -10,14 +10,17 @@ namespace BTCPayServer.Migrations { protected override void Up(MigrationBuilder migrationBuilder) { - migrationBuilder.AlterColumn( - name: "OrderId", - table: "Invoices", - maxLength: 100, - nullable: true, - oldClrType: typeof(string)); + if (!migrationBuilder.IsSqlite()) + { + migrationBuilder.AlterColumn( + name: "OrderId", + table: "Invoices", + maxLength: 100, + nullable: true, + oldClrType: typeof(string)); + } - migrationBuilder.CreateIndex( + migrationBuilder.CreateIndex( name: "IX_Invoices_OrderId", table: "Invoices", column: "OrderId");