From 3db602e3bd08dea1ab70b8b70f00698c0c86a7eb Mon Sep 17 00:00:00 2001 From: Pere Lev Date: Mon, 26 Jun 2023 17:26:20 +0300 Subject: [PATCH] DB entity for Project --- migrations/541_2023-06-26_project.model | 6 ++++++ src/Vervis/Migration.hs | 2 ++ src/Vervis/Migration/Entities.hs | 4 ++++ th/models | 7 +++++++ 4 files changed, 19 insertions(+) create mode 100644 migrations/541_2023-06-26_project.model diff --git a/migrations/541_2023-06-26_project.model b/migrations/541_2023-06-26_project.model new file mode 100644 index 0000000..833f061 --- /dev/null +++ b/migrations/541_2023-06-26_project.model @@ -0,0 +1,6 @@ +Project + actor ActorId + create OutboxItemId + + UniqueProjectActor actor + UniqueProjectCreate create diff --git a/src/Vervis/Migration.hs b/src/Vervis/Migration.hs index 08e4cd6..357d575 100644 --- a/src/Vervis/Migration.hs +++ b/src/Vervis/Migration.hs @@ -2956,6 +2956,8 @@ changes hLocal ctx = , addFieldPrimRequired "Collab" ("RoleAdmin" :: String) "role" -- 540 , addFieldRefOptional "Actor" Nothing "justCreatedBy" "Actor" + -- 541 + , addEntities model_541_project ] migrateDB diff --git a/src/Vervis/Migration/Entities.hs b/src/Vervis/Migration/Entities.hs index 7be9247..8e1daf5 100644 --- a/src/Vervis/Migration/Entities.hs +++ b/src/Vervis/Migration/Entities.hs @@ -62,6 +62,7 @@ module Vervis.Migration.Entities , model_508_invite , model_530_join , model_531_follow_request + , model_541_project ) where @@ -240,3 +241,6 @@ model_530_join = $(schema "530_2022-11-01_join") model_531_follow_request :: [Entity SqlBackend] model_531_follow_request = $(schema "531_2023-06-15_follow_request") + +model_541_project :: [Entity SqlBackend] +model_541_project = $(schema "541_2023-06-26_project") diff --git a/th/models b/th/models index ff1e379..136eaec 100644 --- a/th/models +++ b/th/models @@ -285,6 +285,13 @@ GroupMember -- Projects ------------------------------------------------------------------------------- +Project + actor ActorId + create OutboxItemId + + UniqueProjectActor actor + UniqueProjectCreate create + Deck actor ActorId workflow WorkflowId