From 0d96ee077577e6f23021e8f197ec5ec42ad8263b Mon Sep 17 00:00:00 2001 From: fr33domlover Date: Thu, 1 Sep 2022 17:44:43 +0000 Subject: [PATCH] DB: Add CollabTopicLocalReceive and CollabRecipLocalReceive tables I was going to link the matching Accept tables to them, but then switched to the Invite-Accept-Grant model and going to implement it in the next patches. So I'm committing these new tables just in case I decide to revert to the current model. --- migrations/453_2022-09-01_collab_receive.model | 13 +++++++++++++ src/Vervis/Migration.hs | 2 ++ src/Vervis/Migration/Model.hs | 3 +++ th/models | 14 ++++++++++++++ 4 files changed, 32 insertions(+) create mode 100644 migrations/453_2022-09-01_collab_receive.model diff --git a/migrations/453_2022-09-01_collab_receive.model b/migrations/453_2022-09-01_collab_receive.model new file mode 100644 index 0000000..b761a34 --- /dev/null +++ b/migrations/453_2022-09-01_collab_receive.model @@ -0,0 +1,13 @@ +CollabTopicLocalReceive + collab CollabTopicLocalId + item InboxItemId + + UniqueCollabTopicLocalReceiveCollab collab + UniqueCollabTopicLocalReceiveItem item + +CollabRecipLocalReceive + collab CollabRecipLocalId + item InboxItemId + + UniqueCollabRecipLocalReceiveCollab collab + UniqueCollabRecipLocalReceiveItem item diff --git a/src/Vervis/Migration.hs b/src/Vervis/Migration.hs index de2644a..1915d2a 100644 --- a/src/Vervis/Migration.hs +++ b/src/Vervis/Migration.hs @@ -2554,6 +2554,8 @@ changes hLocal ctx = , addEntities model_451_collab_remote_accept -- 452 , addFieldPrimRequired "InboxItem" defaultTime "received" + -- 453 + , addEntities model_453_collab_receive ] migrateDB diff --git a/src/Vervis/Migration/Model.hs b/src/Vervis/Migration/Model.hs index 509da5f..328b24a 100644 --- a/src/Vervis/Migration/Model.hs +++ b/src/Vervis/Migration/Model.hs @@ -647,3 +647,6 @@ makeEntitiesMigration "447" model_451_collab_remote_accept :: [Entity SqlBackend] model_451_collab_remote_accept = $(schema "451_2022-08-30_collab_remote_accept") + +model_453_collab_receive :: [Entity SqlBackend] +model_453_collab_receive = $(schema "453_2022-09-01_collab_receive") diff --git a/th/models b/th/models index a085f5c..876b733 100644 --- a/th/models +++ b/th/models @@ -619,6 +619,13 @@ CollabTopicLocalLoom UniqueCollabTopicLocalLoom collab +CollabTopicLocalReceive + collab CollabTopicLocalId + item InboxItemId + + UniqueCollabTopicLocalReceiveCollab collab + UniqueCollabTopicLocalReceiveItem item + CollabTopicLocalAccept collab CollabTopicLocalId accept OutboxItemId @@ -666,6 +673,13 @@ CollabRecipLocal UniqueCollabRecipLocal collab +CollabRecipLocalReceive + collab CollabRecipLocalId + item InboxItemId + + UniqueCollabRecipLocalReceiveCollab collab + UniqueCollabRecipLocalReceiveItem item + CollabRecipLocalAccept collab CollabRecipLocalId accept OutboxItemId