From 5734e720ad6b493cfbb45c7c0210e20364889bb5 Mon Sep 17 00:00:00 2001 From: fr33domlover Date: Thu, 11 Feb 2016 09:36:24 +0000 Subject: [PATCH] Update data model to reflect recent decisions --- src/Vervis/Persist.hs | 53 +++++++++++++++++++++++++++++-------------- 1 file changed, 36 insertions(+), 17 deletions(-) diff --git a/src/Vervis/Persist.hs b/src/Vervis/Persist.hs index b45bd35..39b0e0c 100644 --- a/src/Vervis/Persist.hs +++ b/src/Vervis/Persist.hs @@ -39,28 +39,47 @@ share [mkPersist sqlSettings, mkMigrate "migrateAll"] [persistLowerCase| IrcChannel network Text name Text -User + +Sharer ident Text --CI - hash Text Maybe name Text Maybe - email Text Maybe + + UniqueIdent ident + +Person + ident SharerId + hash Text Maybe + email Text Maybe + + UniquePersonIdent ident + Group - ident Text --CI - name Text Maybe -Repo - name Text --CI - irc IrcChannelId Maybe - ml Text Maybe + ident SharerId + + UniqueGroupIdent ident + Project - ident Text --CI - name Text Maybe - desc Text Maybe + ident Text --CI + sharer SharerId + name Text Maybe + desc Text Maybe -UserInGroup - user UserId - group GroupId + UniqueProject ident sharer -RepoInProject - repo RepoId +Repo + name Text --CI project ProjectId + irc IrcChannelId Maybe + ml Text Maybe + + UniqueRepo name project + +PersonInGroup + person PersonId + group GroupId + + UniquePersonInGroup person group + |] + +--mainViewQuery = --TODO