From da6d8c008e712f4b3c6bab6f969ad465f6ebbf2b Mon Sep 17 00:00:00 2001 From: fr33domlover Date: Sat, 26 Jan 2019 12:56:15 +0000 Subject: [PATCH] Rename project field in Project Role assignment tables, it had the wrong name --- config/models | 14 +++++++------- src/Vervis/Migration.hs | 6 +++++- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/config/models b/config/models index e070482..59255f3 100644 --- a/config/models +++ b/config/models @@ -1,6 +1,6 @@ -- This file is part of Vervis. -- --- Written in 2016, 2018 by fr33domlover . +-- Written in 2016, 2018, 2019 by fr33domlover . -- -- ♡ Copying is an act of love. Please copy, reuse and share. -- @@ -124,16 +124,16 @@ ProjectCollab UniqueProjectCollab project person ProjectCollabAnon - repo ProjectId - role ProjectRoleId + project ProjectId + role ProjectRoleId - UniqueProjectCollabAnon repo + UniqueProjectCollabAnon project ProjectCollabUser - repo ProjectId - role ProjectRoleId + project ProjectId + role ProjectRoleId - UniqueProjectCollabUser repo + UniqueProjectCollabUser project ------------------------------------------------------------------------------- -- Projects diff --git a/src/Vervis/Migration.hs b/src/Vervis/Migration.hs index c8aeee3..0257586 100644 --- a/src/Vervis/Migration.hs +++ b/src/Vervis/Migration.hs @@ -1,6 +1,6 @@ {- This file is part of Vervis. - - - Written in 2016, 2018 by fr33domlover . + - Written in 2016, 2018, 2019 by fr33domlover . - - ♡ Copying is an act of love. Please copy, reuse and share. - @@ -128,6 +128,10 @@ changes = , addFieldPrimRequired "Person" defaultTime "resetPassKeyCreated" -- 22 , addUnique "Person" $ Unique "UniquePersonEmail" ["email"] + -- 23 + , renameField "ProjectCollabAnon" "repo" "project" + -- 24 + , renameField "ProjectCollabUser" "repo" "project" ] migrateDB :: MonadIO m => ReaderT SqlBackend m (Either Text (Int, Int))