From f70aa420608d973500be59036356c6845e8d21cc Mon Sep 17 00:00:00 2001 From: fr33domlover Date: Sun, 9 Jun 2019 15:56:42 +0000 Subject: [PATCH] Add UniquePersonInbox to persistent model; each user has their own unique inbox --- config/models | 1 + src/Vervis/Migration.hs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/config/models b/config/models index 65ab350..c87ee40 100644 --- a/config/models +++ b/config/models @@ -39,6 +39,7 @@ Person UniquePersonIdent ident UniquePersonLogin login UniquePersonEmail email + UniquePersonInbox inbox OutboxItem person PersonId diff --git a/src/Vervis/Migration.hs b/src/Vervis/Migration.hs index e00f662..50ef528 100644 --- a/src/Vervis/Migration.hs +++ b/src/Vervis/Migration.hs @@ -593,6 +593,8 @@ changes hLocal ctx = -- 104 , addUnique "InboxItemRemote" $ Unique "UniqueInboxItemRemote" ["inbox", "activity"] + -- 105 + , addUnique "Person" $ Unique "UniquePersonInbox" ["inbox"] ] migrateDB :: MonadIO m => Text -> HashidsContext -> ReaderT SqlBackend m (Either Text (Int, Int))