From 6d4ae13e7276130d5060b297767437d4c72ebb5b Mon Sep 17 00:00:00 2001 From: Bogdan Date: Tue, 9 May 2023 00:03:15 +0300 Subject: [PATCH] Fix migrations running in PostgreSQL --- .../Datastore/Migration/135_health_issue_notification.cs | 4 ++-- .../Datastore/Migration/149_add_on_delete_to_notifications.cs | 4 ++-- .../Datastore/Migration/165_add_on_update_to_notifications.cs | 2 +- .../Migration/187_add_on_series_add_to_notifications.cs | 2 +- .../Datastore/Migration/190_health_restored_notification.cs | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/NzbDrone.Core/Datastore/Migration/135_health_issue_notification.cs b/src/NzbDrone.Core/Datastore/Migration/135_health_issue_notification.cs index 2bd945dd7..0d29d0eb5 100644 --- a/src/NzbDrone.Core/Datastore/Migration/135_health_issue_notification.cs +++ b/src/NzbDrone.Core/Datastore/Migration/135_health_issue_notification.cs @@ -8,8 +8,8 @@ namespace NzbDrone.Core.Datastore.Migration { protected override void MainDbUpgrade() { - Alter.Table("Notifications").AddColumn("OnHealthIssue").AsBoolean().WithDefaultValue(0); - Alter.Table("Notifications").AddColumn("IncludeHealthWarnings").AsBoolean().WithDefaultValue(0); + Alter.Table("Notifications").AddColumn("OnHealthIssue").AsBoolean().WithDefaultValue(false); + Alter.Table("Notifications").AddColumn("IncludeHealthWarnings").AsBoolean().WithDefaultValue(false); } } } diff --git a/src/NzbDrone.Core/Datastore/Migration/149_add_on_delete_to_notifications.cs b/src/NzbDrone.Core/Datastore/Migration/149_add_on_delete_to_notifications.cs index 70906256f..80027246e 100644 --- a/src/NzbDrone.Core/Datastore/Migration/149_add_on_delete_to_notifications.cs +++ b/src/NzbDrone.Core/Datastore/Migration/149_add_on_delete_to_notifications.cs @@ -8,8 +8,8 @@ namespace NzbDrone.Core.Datastore.Migration { protected override void MainDbUpgrade() { - Alter.Table("Notifications").AddColumn("OnSeriesDelete").AsBoolean().WithDefaultValue(0); - Alter.Table("Notifications").AddColumn("OnEpisodeFileDelete").AsBoolean().WithDefaultValue(0); + Alter.Table("Notifications").AddColumn("OnSeriesDelete").AsBoolean().WithDefaultValue(false); + Alter.Table("Notifications").AddColumn("OnEpisodeFileDelete").AsBoolean().WithDefaultValue(false); } } } diff --git a/src/NzbDrone.Core/Datastore/Migration/165_add_on_update_to_notifications.cs b/src/NzbDrone.Core/Datastore/Migration/165_add_on_update_to_notifications.cs index 338e4efc1..789de6673 100644 --- a/src/NzbDrone.Core/Datastore/Migration/165_add_on_update_to_notifications.cs +++ b/src/NzbDrone.Core/Datastore/Migration/165_add_on_update_to_notifications.cs @@ -8,7 +8,7 @@ namespace NzbDrone.Core.Datastore.Migration { protected override void MainDbUpgrade() { - Alter.Table("Notifications").AddColumn("OnApplicationUpdate").AsBoolean().WithDefaultValue(0); + Alter.Table("Notifications").AddColumn("OnApplicationUpdate").AsBoolean().WithDefaultValue(false); } } } diff --git a/src/NzbDrone.Core/Datastore/Migration/187_add_on_series_add_to_notifications.cs b/src/NzbDrone.Core/Datastore/Migration/187_add_on_series_add_to_notifications.cs index 2cda61506..546ae3886 100644 --- a/src/NzbDrone.Core/Datastore/Migration/187_add_on_series_add_to_notifications.cs +++ b/src/NzbDrone.Core/Datastore/Migration/187_add_on_series_add_to_notifications.cs @@ -8,7 +8,7 @@ namespace NzbDrone.Core.Datastore.Migration { protected override void MainDbUpgrade() { - Alter.Table("Notifications").AddColumn("OnSeriesAdd").AsBoolean().WithDefaultValue(0); + Alter.Table("Notifications").AddColumn("OnSeriesAdd").AsBoolean().WithDefaultValue(false); } } } diff --git a/src/NzbDrone.Core/Datastore/Migration/190_health_restored_notification.cs b/src/NzbDrone.Core/Datastore/Migration/190_health_restored_notification.cs index 0319f3471..09057850c 100644 --- a/src/NzbDrone.Core/Datastore/Migration/190_health_restored_notification.cs +++ b/src/NzbDrone.Core/Datastore/Migration/190_health_restored_notification.cs @@ -8,7 +8,7 @@ namespace NzbDrone.Core.Datastore.Migration { protected override void MainDbUpgrade() { - Alter.Table("Notifications").AddColumn("OnHealthRestored").AsBoolean().WithDefaultValue(0); + Alter.Table("Notifications").AddColumn("OnHealthRestored").AsBoolean().WithDefaultValue(false); } } }