From 346236764cb492f16f718fe77e7a45b93bbcce41 Mon Sep 17 00:00:00 2001 From: Qstick Date: Thu, 23 Dec 2021 11:50:13 -0600 Subject: [PATCH] Drop all Commands rows before running migration 204 --- .../Datastore/Migration/204_ensure_identity_on_id_columns.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/NzbDrone.Core/Datastore/Migration/204_ensure_identity_on_id_columns.cs b/src/NzbDrone.Core/Datastore/Migration/204_ensure_identity_on_id_columns.cs index 504ea3e61..92bd38315 100644 --- a/src/NzbDrone.Core/Datastore/Migration/204_ensure_identity_on_id_columns.cs +++ b/src/NzbDrone.Core/Datastore/Migration/204_ensure_identity_on_id_columns.cs @@ -8,6 +8,9 @@ namespace NzbDrone.Core.Datastore.Migration { protected override void MainDbUpgrade() { + //Purge Commands before reworking tables + Delete.FromTable("Commands").AllRows(); + Alter.Column("Id").OnTable("Movies").AsInt32().PrimaryKey().Identity(); Alter.Column("Id").OnTable("MovieTranslations").AsInt32().PrimaryKey().Identity(); Alter.Column("Id").OnTable("Commands").AsInt32().PrimaryKey().Identity();