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 504ea3e61c..92bd383159 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 @@ public class ensure_identity_on_id_columns : NzbDroneMigrationBase { 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();