From ac9c79c76191100404a8aeab49e0170742e60b6f Mon Sep 17 00:00:00 2001 From: fr33domlover Date: Thu, 23 Jul 2020 13:33:54 +0000 Subject: [PATCH] DB: RemoteCollection was referring to itself accidentally, add migration to fix --- migrations/2020_07_23_remote_collection_reboot.model | 4 ++++ src/Vervis/Migration.hs | 10 ++++++++++ src/Vervis/Migration/Model.hs | 4 ++++ 3 files changed, 18 insertions(+) create mode 100644 migrations/2020_07_23_remote_collection_reboot.model diff --git a/migrations/2020_07_23_remote_collection_reboot.model b/migrations/2020_07_23_remote_collection_reboot.model new file mode 100644 index 0000000..e89bc98 --- /dev/null +++ b/migrations/2020_07_23_remote_collection_reboot.model @@ -0,0 +1,4 @@ +RemoteCollection + ident RemoteObjectId + + UniqueRemoteCollection ident diff --git a/src/Vervis/Migration.hs b/src/Vervis/Migration.hs index 7a00418..1a09eef 100644 --- a/src/Vervis/Migration.hs +++ b/src/Vervis/Migration.hs @@ -1712,6 +1712,16 @@ changes hLocal ctx = -- 269 , addUnique "RemoteTicketDependency" $ Unique "UniqueRemoteTicketDependencyAccept" ["accept"] + -- 270 + , unchecked $ lift $ deleteWhere ([] :: [Filter RemoteCollection159]) + -- 271 + , removeUnique "RemoteCollection" "UniqueRemoteCollection" + -- 272 + , removeField "RemoteCollection" "ident" + -- 273 + , removeEntity "RemoteCollection" + -- 274 + , addEntities model_2020_07_23 ] migrateDB diff --git a/src/Vervis/Migration/Model.hs b/src/Vervis/Migration/Model.hs index 17700e2..5d28195 100644 --- a/src/Vervis/Migration/Model.hs +++ b/src/Vervis/Migration/Model.hs @@ -227,6 +227,7 @@ module Vervis.Migration.Model , TicketProjectLocal266Generic (..) , Project266Generic (..) , model_2020_06_18 + , model_2020_07_23 ) where @@ -445,3 +446,6 @@ makeEntitiesMigration "266" model_2020_06_18 :: [Entity SqlBackend] model_2020_06_18 = $(schema "2020_06_18_tdo") + +model_2020_07_23 :: [Entity SqlBackend] +model_2020_07_23 = $(schema "2020_07_23_remote_collection_reboot")