DB: Split migration model module + remove DestUsGatherTo* entities
This commit is contained in:
parent
97b675130f
commit
b47941af97
13 changed files with 952 additions and 618 deletions
5
migrations/584_2024-04-14_delete_gather.model
Normal file
5
migrations/584_2024-04-14_delete_gather.model
Normal file
|
@ -0,0 +1,5 @@
|
|||
SourceUsGather
|
||||
SourceUsGatherFromLocal
|
||||
SourceUsGatherFromRemote
|
||||
SourceUsGatherToLocal
|
||||
SourceUsGatherToRemote
|
|
@ -1195,8 +1195,6 @@ projectAccept now projectID (Verse authorIdMsig body) accept = do
|
|||
let gatherIDs = map entityKey gathers
|
||||
deleteWhere [SourceUsGatherFromLocalGather <-. gatherIDs]
|
||||
deleteWhere [SourceUsGatherFromRemoteGather <-. gatherIDs]
|
||||
deleteWhere [SourceUsGatherToLocalGather <-. gatherIDs]
|
||||
deleteWhere [SourceUsGatherToRemoteGather <-. gatherIDs]
|
||||
deleteWhere [SourceUsGatherId <-. gatherIDs]
|
||||
let leafIDs = map entityKey leafs
|
||||
deleteWhere [SourceUsLeafFromLocalLeaf <-. leafIDs]
|
||||
|
@ -1253,7 +1251,8 @@ projectAccept now projectID (Verse authorIdMsig body) accept = do
|
|||
_luRevoke <- updateOutboxItem' recipByKey revokeID actionRevoke
|
||||
|
||||
-- Prepare and insert Revokes on all the extension-Grants
|
||||
revokesG <- for gathers $ \ (Entity _ (SourceUsGather _ acceptID grantID)) -> do
|
||||
revokesG <- for gathers $ \ (Entity _ (SourceUsGather _ startID grantID)) -> do
|
||||
DestUsStart acceptID _ <- getJust startID
|
||||
DestUsAccept destID _ <- getJust acceptID
|
||||
parent <- do
|
||||
p <- getDestTopic destID
|
||||
|
@ -3053,13 +3052,12 @@ projectGrant now projectID (Verse authorIdMsig body) grant = do
|
|||
, accept E.^. DestUsAcceptId
|
||||
, start E.^. DestUsStartId
|
||||
)
|
||||
localExtensionsForParents <- lift $ for localParents $ \ (E.Value role', E.Value parentID, E.Value delegID, E.Value grantID, E.Value acceptID, E.Value startID) -> do
|
||||
localExtensionsForParents <- lift $ for localParents $ \ (E.Value role', E.Value parentID, E.Value _delegID, E.Value grantID, E.Value _acceptID, E.Value startID) -> do
|
||||
extID <- insertEmptyOutboxItem' (actorOutbox recipActor) now
|
||||
gatherID <- insert $ SourceUsGather sendID acceptID extID
|
||||
gatherID <- insert $ SourceUsGather sendID startID extID
|
||||
case from of
|
||||
Left localID -> insert_ $ SourceUsGatherFromLocal gatherID localID
|
||||
Right remoteID -> insert_ $ SourceUsGatherFromRemote gatherID remoteID
|
||||
insert_ $ SourceUsGatherToLocal gatherID delegID
|
||||
ext@(actionExt, _, _, _) <-
|
||||
prepareExtensionGrantForParent (Left (parentID, grantID)) (min role role') startID
|
||||
let recipByKey = LocalActorProject projectID
|
||||
|
@ -3083,13 +3081,12 @@ projectGrant now projectID (Verse authorIdMsig body) grant = do
|
|||
, accept E.^. DestUsAcceptId
|
||||
, start E.^. DestUsStartId
|
||||
)
|
||||
remoteExtensionsForParents <- lift $ for remoteParents $ \ (E.Value role', E.Value parentID, E.Value delegID, E.Value grantID, E.Value acceptID, E.Value startID) -> do
|
||||
remoteExtensionsForParents <- lift $ for remoteParents $ \ (E.Value role', E.Value parentID, E.Value _delegID, E.Value grantID, E.Value _acceptID, E.Value startID) -> do
|
||||
extID <- insertEmptyOutboxItem' (actorOutbox recipActor) now
|
||||
gatherID <- insert $ SourceUsGather sendID acceptID extID
|
||||
gatherID <- insert $ SourceUsGather sendID startID extID
|
||||
case from of
|
||||
Left localID -> insert_ $ SourceUsGatherFromLocal gatherID localID
|
||||
Right remoteID -> insert_ $ SourceUsGatherFromRemote gatherID remoteID
|
||||
insert_ $ SourceUsGatherToRemote gatherID delegID
|
||||
ext@(actionExt, _, _, _) <-
|
||||
prepareExtensionGrantForParent (Right (parentID, grantID)) (min role role') startID
|
||||
let recipByKey = LocalActorProject projectID
|
||||
|
@ -3434,13 +3431,10 @@ projectGrant now projectID (Verse authorIdMsig body) grant = do
|
|||
fromChildren <- lift $ for (l ++ r) $ \ (E.Value sendID, deleg) -> do
|
||||
extID <- insertEmptyOutboxItem' (actorOutbox recipActor) now
|
||||
|
||||
gatherID <- insert $ SourceUsGather sendID acceptID extID
|
||||
gatherID <- insert $ SourceUsGather sendID destStartID extID
|
||||
case bimap entityKey entityKey deleg of
|
||||
Left localID -> insert_ $ SourceUsGatherFromLocal gatherID localID
|
||||
Right remoteID -> insert_ $ SourceUsGatherFromRemote gatherID remoteID
|
||||
case to of
|
||||
Left localID -> insert_ $ SourceUsGatherToLocal gatherID localID
|
||||
Right remoteID -> insert_ $ SourceUsGatherToRemote gatherID remoteID
|
||||
|
||||
(AP.Doc h a, grant) <- getGrantActivityBody $ bimap (sourceThemDelegateLocalGrant . entityVal) (sourceThemDelegateRemoteGrant . entityVal) deleg
|
||||
uStart <-
|
||||
|
@ -4307,8 +4301,6 @@ projectRemove now projectID (Verse authorIdMsig body) remove = do
|
|||
let gatherIDs = map entityKey gathers
|
||||
deleteWhere [SourceUsGatherFromLocalGather <-. gatherIDs]
|
||||
deleteWhere [SourceUsGatherFromRemoteGather <-. gatherIDs]
|
||||
deleteWhere [SourceUsGatherToLocalGather <-. gatherIDs]
|
||||
deleteWhere [SourceUsGatherToRemoteGather <-. gatherIDs]
|
||||
deleteWhere [SourceUsGatherId <-. gatherIDs]
|
||||
let leafIDs = map entityKey leafs
|
||||
deleteWhere [SourceUsLeafFromLocalLeaf <-. leafIDs]
|
||||
|
@ -4360,7 +4352,8 @@ projectRemove now projectID (Verse authorIdMsig body) remove = do
|
|||
_luRevoke <- updateOutboxItem' recipByKey revokeID actionRevoke
|
||||
|
||||
-- Prepare and insert Revokes on all the extension-Grants
|
||||
revokesG <- for gathers $ \ (Entity _ (SourceUsGather _ acceptID grantID)) -> do
|
||||
revokesG <- for gathers $ \ (Entity _ (SourceUsGather _ startID grantID)) -> do
|
||||
DestUsStart acceptID _ <- getJust startID
|
||||
DestUsAccept destID _ <- getJust acceptID
|
||||
parent <- do
|
||||
p <- getDestTopic destID
|
||||
|
@ -4539,11 +4532,13 @@ projectRemove now projectID (Verse authorIdMsig body) remove = do
|
|||
p <- getJust projectID
|
||||
(p,) <$> getJust (projectActor p)
|
||||
|
||||
-- Verify it's an active child of mine
|
||||
-- Verify it's an active parent of mine
|
||||
dests <- lift $ case parentDB of
|
||||
Left (Entity j _) ->
|
||||
fmap (map $ \ (d, h, a, E.Value l, E.Value t, E.Value s) -> (d, h, a, Left (l, t, s))) $
|
||||
E.select $ E.from $ \ (dest `E.InnerJoin` holder `E.InnerJoin` topic `E.InnerJoin` send) -> do
|
||||
fmap (map $ \ (d, h, a, z, E.Value l, E.Value t, E.Value s) -> (d, h, a, z, Left (l, t, s))) $
|
||||
E.select $ E.from $ \ (dest `E.InnerJoin` holder `E.InnerJoin` topic `E.InnerJoin` send `E.InnerJoin` accept `E.InnerJoin` start) -> do
|
||||
E.on $ accept E.^. DestUsAcceptId E.==. start E.^. DestUsStartDest
|
||||
E.on $ dest E.^. DestId E.==. accept E.^. DestUsAcceptDest
|
||||
E.on $ topic E.^. DestTopicProjectTopic E.==. send E.^. DestThemSendDelegatorLocalTopic
|
||||
E.on $ holder E.^. DestHolderProjectId E.==. topic E.^. DestTopicProjectHolder
|
||||
E.on $ dest E.^. DestId E.==. holder E.^. DestHolderProjectDest
|
||||
|
@ -4554,13 +4549,16 @@ projectRemove now projectID (Verse authorIdMsig body) remove = do
|
|||
( dest E.^. DestId
|
||||
, holder E.^. DestHolderProjectId
|
||||
, send E.^. DestThemSendDelegatorLocalDest
|
||||
, start E.^. DestUsStartId
|
||||
, topic E.^. DestTopicProjectTopic
|
||||
, topic E.^. DestTopicProjectId
|
||||
, send E.^. DestThemSendDelegatorLocalId
|
||||
)
|
||||
Right (_, Entity a _) ->
|
||||
fmap (map $ \ (d, h, a, E.Value t, E.Value s) -> (d, h, a, Right (t, s))) $
|
||||
E.select $ E.from $ \ (dest `E.InnerJoin` holder `E.InnerJoin` topic `E.InnerJoin` send) -> do
|
||||
fmap (map $ \ (d, h, a, z, E.Value t, E.Value s) -> (d, h, a, z, Right (t, s))) $
|
||||
E.select $ E.from $ \ (dest `E.InnerJoin` holder `E.InnerJoin` topic `E.InnerJoin` send `E.InnerJoin` accept `E.InnerJoin` start) -> do
|
||||
E.on $ accept E.^. DestUsAcceptId E.==. start E.^. DestUsStartDest
|
||||
E.on $ dest E.^. DestId E.==. accept E.^. DestUsAcceptDest
|
||||
E.on $ topic E.^. DestTopicRemoteId E.==. send E.^. DestThemSendDelegatorRemoteTopic
|
||||
E.on $ dest E.^. DestId E.==. topic E.^. DestTopicRemoteDest
|
||||
E.on $ dest E.^. DestId E.==. holder E.^. DestHolderProjectDest
|
||||
|
@ -4571,11 +4569,12 @@ projectRemove now projectID (Verse authorIdMsig body) remove = do
|
|||
( dest E.^. DestId
|
||||
, holder E.^. DestHolderProjectId
|
||||
, send E.^. DestThemSendDelegatorRemoteDest
|
||||
, start E.^. DestUsStartId
|
||||
, topic E.^. DestTopicRemoteId
|
||||
, send E.^. DestThemSendDelegatorRemoteId
|
||||
)
|
||||
|
||||
(E.Value destID, E.Value holderID, E.Value usAcceptID, topic) <-
|
||||
(E.Value destID, E.Value holderID, E.Value usAcceptID, E.Value destStartID, topic) <-
|
||||
verifySingleE dests "No dest" "Multiple dests"
|
||||
|
||||
maybeRemoveDB <- lift $ insertToInbox now authorIdMsig body (actorInbox actorRecip) False
|
||||
|
@ -4589,26 +4588,13 @@ projectRemove now projectID (Verse authorIdMsig body) remove = do
|
|||
deleteWhere [ComponentGatherRemoteParent ==. sendID]
|
||||
|
||||
-- Delete uses of this Dest from my Source records
|
||||
case topic of
|
||||
Left (_, _, sendID) -> do
|
||||
gatherIDs <-
|
||||
map (sourceUsGatherToLocalGather . entityVal) <$>
|
||||
selectList [SourceUsGatherToLocalTo ==. sendID] []
|
||||
gatherIDs <- selectKeysList [SourceUsGatherDest ==. destStartID] []
|
||||
deleteWhere [SourceUsGatherFromLocalGather <-. gatherIDs]
|
||||
deleteWhere [SourceUsGatherFromRemoteGather <-. gatherIDs]
|
||||
deleteWhere [SourceUsGatherToLocalGather <-. gatherIDs]
|
||||
deleteWhere [SourceUsGatherId <-. gatherIDs]
|
||||
Right (_, sendID) -> do
|
||||
gatherIDs <-
|
||||
map (sourceUsGatherToRemoteGather . entityVal) <$>
|
||||
selectList [SourceUsGatherToRemoteTo ==. sendID] []
|
||||
deleteWhere [SourceUsGatherFromLocalGather <-. gatherIDs]
|
||||
deleteWhere [SourceUsGatherFromRemoteGather <-. gatherIDs]
|
||||
deleteWhere [SourceUsGatherToRemoteGather <-. gatherIDs]
|
||||
deleteWhere [SourceUsGatherId <-. gatherIDs]
|
||||
|
||||
-- Delete the whole Dest record
|
||||
deleteBy $ UniqueDestUsStart usAcceptID
|
||||
delete destStartID
|
||||
case topic of
|
||||
Left (_, _, sendID) -> delete sendID
|
||||
Right (_, sendID) -> delete sendID
|
||||
|
@ -5017,27 +5003,17 @@ projectRevoke now projectID (Verse authorIdMsig body) (AP.Revoke (luFirst :| lus
|
|||
Right sendID ->
|
||||
deleteWhere [ComponentGatherRemoteParent ==. sendID]
|
||||
|
||||
maybeStartID <- getKeyBy $ UniqueDestUsStart usAcceptID
|
||||
|
||||
-- Delete uses of this Dest from my Source records
|
||||
case send of
|
||||
Left sendID -> do
|
||||
gatherIDs <-
|
||||
map (sourceUsGatherToLocalGather . entityVal) <$>
|
||||
selectList [SourceUsGatherToLocalTo ==. sendID] []
|
||||
for_ maybeStartID $ \ destStartID -> do
|
||||
gatherIDs <- selectKeysList [SourceUsGatherDest ==. destStartID] []
|
||||
deleteWhere [SourceUsGatherFromLocalGather <-. gatherIDs]
|
||||
deleteWhere [SourceUsGatherFromRemoteGather <-. gatherIDs]
|
||||
deleteWhere [SourceUsGatherToLocalGather <-. gatherIDs]
|
||||
deleteWhere [SourceUsGatherId <-. gatherIDs]
|
||||
Right sendID -> do
|
||||
gatherIDs <-
|
||||
map (sourceUsGatherToRemoteGather . entityVal) <$>
|
||||
selectList [SourceUsGatherToRemoteTo ==. sendID] []
|
||||
deleteWhere [SourceUsGatherFromLocalGather <-. gatherIDs]
|
||||
deleteWhere [SourceUsGatherFromRemoteGather <-. gatherIDs]
|
||||
deleteWhere [SourceUsGatherToRemoteGather <-. gatherIDs]
|
||||
deleteWhere [SourceUsGatherId <-. gatherIDs]
|
||||
|
||||
-- Delete the whole Dest record
|
||||
deleteBy $ UniqueDestUsStart usAcceptID
|
||||
for_ maybeStartID delete
|
||||
case send of
|
||||
Left sendID -> delete sendID
|
||||
Right sendID -> delete sendID
|
||||
|
@ -5162,8 +5138,6 @@ projectRevoke now projectID (Verse authorIdMsig body) (AP.Revoke (luFirst :| lus
|
|||
-- Delete the records of these extensions
|
||||
deleteWhere [SourceUsGatherFromLocalGather <-. gatherIDs]
|
||||
deleteWhere [SourceUsGatherFromRemoteGather <-. gatherIDs]
|
||||
deleteWhere [SourceUsGatherToLocalGather <-. gatherIDs]
|
||||
deleteWhere [SourceUsGatherToRemoteGather <-. gatherIDs]
|
||||
deleteWhere [SourceUsGatherId <-. gatherIDs]
|
||||
deleteWhere [SourceUsLeafFromLocalLeaf <-. leafIDs]
|
||||
deleteWhere [SourceUsLeafFromRemoteLeaf <-. leafIDs]
|
||||
|
@ -5175,7 +5149,8 @@ projectRevoke now projectID (Verse authorIdMsig body) (AP.Revoke (luFirst :| lus
|
|||
Right (_, _, delegID, _) -> delete delegID
|
||||
|
||||
-- Prepare and insert Revokes on all the extension-Grants
|
||||
revokesG <- for gathers $ \ (Entity _ (SourceUsGather _ acceptID grantID)) -> do
|
||||
revokesG <- for gathers $ \ (Entity _ (SourceUsGather _ startID grantID)) -> do
|
||||
DestUsStart acceptID _ <- getJust startID
|
||||
DestUsAccept destID _ <- getJust acceptID
|
||||
parent <- do
|
||||
p <- getDestTopic destID
|
||||
|
|
|
@ -90,7 +90,13 @@ import Vervis.Model.Ticket
|
|||
import Vervis.Model.Workflow
|
||||
import Vervis.Foundation (App (..), Route (..))
|
||||
import Vervis.Migration.Entities
|
||||
import Vervis.Migration.Model
|
||||
import Vervis.Migration.Model2016
|
||||
import Vervis.Migration.Model2018
|
||||
import Vervis.Migration.Model2019
|
||||
import Vervis.Migration.Model2020
|
||||
import Vervis.Migration.Model2022
|
||||
import Vervis.Migration.Model2023
|
||||
import Vervis.Migration.Model2024
|
||||
import Vervis.Settings
|
||||
|
||||
instance PersistDefault ByteString where
|
||||
|
@ -3224,6 +3230,23 @@ changes hLocal ctx =
|
|||
, addUnique' "SourceThemDelegateRemote" "" ["grant"]
|
||||
-- 583
|
||||
, addEntities model_583_dest_start
|
||||
-- 584
|
||||
, unchecked $ lift $ do
|
||||
deleteWhere ([] :: [Filter SourceUsGatherFromLocal584])
|
||||
deleteWhere ([] :: [Filter SourceUsGatherFromRemote584])
|
||||
deleteWhere ([] :: [Filter SourceUsGatherToLocal584])
|
||||
deleteWhere ([] :: [Filter SourceUsGatherToRemote584])
|
||||
deleteWhere ([] :: [Filter SourceUsGather584])
|
||||
-- 585
|
||||
, addFieldRefRequiredEmpty "SourceUsGather" "destNew" "DestUsStart"
|
||||
-- 586
|
||||
, removeField "SourceUsGather" "dest"
|
||||
-- 586
|
||||
, renameField "SourceUsGather" "destNew" "dest"
|
||||
-- 587
|
||||
, removeEntity "SourceUsGatherToLocal"
|
||||
-- 588
|
||||
, removeEntity "SourceUsGatherToRemote"
|
||||
]
|
||||
|
||||
migrateDB
|
||||
|
|
|
@ -1,542 +0,0 @@
|
|||
{- This file is part of Vervis.
|
||||
-
|
||||
- Written in 2018, 2019, 2020, 2022, 2023
|
||||
- by fr33domlover <fr33domlover@riseup.net>.
|
||||
-
|
||||
- ♡ Copying is an act of love. Please copy, reuse and share.
|
||||
-
|
||||
- The author(s) have dedicated all copyright and related and neighboring
|
||||
- rights to this software to the public domain worldwide. This software is
|
||||
- distributed without any warranty.
|
||||
-
|
||||
- You should have received a copy of the CC0 Public Domain Dedication along
|
||||
- with this software. If not, see
|
||||
- <http://creativecommons.org/publicdomain/zero/1.0/>.
|
||||
-}
|
||||
|
||||
module Vervis.Migration.Model
|
||||
{-
|
||||
( EntityField (..)
|
||||
, Unique (..)
|
||||
, Sharer2016
|
||||
, Project2016
|
||||
, Workflow2016Generic (..)
|
||||
, Workflow2016
|
||||
, VerifKey2019Generic (..)
|
||||
, VerifKey2019
|
||||
, VerifKeySharedUsage2019Generic (..)
|
||||
, VerifKeySharedUsage2019
|
||||
, Message2019Generic (..)
|
||||
, Message2019
|
||||
, LocalMessage2019Generic (..)
|
||||
, LocalMessage2019
|
||||
, FollowerSet2019Generic (..)
|
||||
, Ticket2019
|
||||
, Sharer201905Generic (..)
|
||||
, Person201905Generic (..)
|
||||
, OutboxItem201905Generic (..)
|
||||
, OutboxItem201905
|
||||
, LocalMessage201905Generic (..)
|
||||
, LocalMessage201905
|
||||
, Message201905Generic (..)
|
||||
, Project201905Generic (..)
|
||||
, Ticket201905Generic (..)
|
||||
, Instance201905Generic (..)
|
||||
, RemoteDiscussion201905Generic (..)
|
||||
, RemoteMessage201905Generic (..)
|
||||
, Message201906Generic (..)
|
||||
, Message201906
|
||||
, Ticket201906Generic (..)
|
||||
, Ticket201906
|
||||
, Ticket20190606Generic (..)
|
||||
, Ticket20190606
|
||||
, TicketAuthorLocal20190606Generic (..)
|
||||
, Person20190607Generic (..)
|
||||
, Person20190607
|
||||
, Inbox20190607Generic (..)
|
||||
, InboxItemLocal20190607Generic (..)
|
||||
, InboxItemLocal20190607
|
||||
, InboxItemRemote20190607Generic (..)
|
||||
, InboxItemRemote20190607
|
||||
, Project20190609
|
||||
, Inbox20190609Generic (..)
|
||||
, InboxItem2019FillGeneric (..)
|
||||
, InboxItem2019Fill
|
||||
, InboxItemLocal2019FillGeneric (..)
|
||||
, InboxItemRemote2019FillGeneric (..)
|
||||
, Project2019FillGeneric (..)
|
||||
, Ticket2019FillGeneric (..)
|
||||
, Message2019FillGeneric (..)
|
||||
, LocalMessage2019FillGeneric (..)
|
||||
, RemoteMessage2019FillGeneric (..)
|
||||
, FollowerSet20190610Generic (..)
|
||||
, Project20190610
|
||||
, Sharer20190612Generic (..)
|
||||
, Person20190612Generic (..)
|
||||
, OutboxItem20190612Generic (..)
|
||||
, Inbox20190612Generic (..)
|
||||
, InboxItem20190612Generic (..)
|
||||
, InboxItemLocal20190612Generic (..)
|
||||
, Project20190612Generic (..)
|
||||
, Ticket20190612Generic (..)
|
||||
, Ticket20190612
|
||||
, TicketAuthorLocal20190612Generic (..)
|
||||
, Person20190615Generic (..)
|
||||
, Person20190615
|
||||
, Outbox20190615Generic (..)
|
||||
, OutboxItem20190615Generic (..)
|
||||
, OutboxItem20190615
|
||||
, Project20190616Generic (..)
|
||||
, Project20190616
|
||||
, Outbox20190616Generic (..)
|
||||
, Sharer20190624Generic (..)
|
||||
, Person20190624Generic (..)
|
||||
, Outbox20190624Generic (..)
|
||||
, OutboxItem20190624Generic (..)
|
||||
, Inbox20190624Generic (..)
|
||||
, InboxItem20190624Generic (..)
|
||||
, InboxItemLocal20190624Generic (..)
|
||||
, Project20190624Generic (..)
|
||||
, Ticket20190624Generic (..)
|
||||
, Ticket20190624
|
||||
, TicketAuthorLocal20190624Generic (..)
|
||||
, Sharer127Generic (..)
|
||||
, Person127Generic (..)
|
||||
, Outbox127Generic (..)
|
||||
, Inbox127Generic (..)
|
||||
, Project127Generic (..)
|
||||
, Ticket127Generic (..)
|
||||
, TicketDependency127Generic (..)
|
||||
, TicketDependency127
|
||||
, Inbox130Generic (..)
|
||||
, FollowerSet130Generic (..)
|
||||
, Repo130
|
||||
, Person130
|
||||
, Outbox138Generic (..)
|
||||
, Repo138
|
||||
, Instance152Generic (..)
|
||||
, RemoteObject152Generic (..)
|
||||
, RemoteActivity152Generic (..)
|
||||
, RemoteActivity152
|
||||
, Instance159Generic (..)
|
||||
, RemoteObject159Generic (..)
|
||||
, RemoteActor159Generic (..)
|
||||
, RemoteActor159
|
||||
, UnfetchedRemoteActor159Generic (..)
|
||||
, UnfetchedRemoteActor159
|
||||
, RemoteCollection159Generic (..)
|
||||
, RemoteCollection159
|
||||
, Ticket189
|
||||
, Ticket189Generic (..)
|
||||
, LocalTicket189Generic (..)
|
||||
, Sharer194Generic (..)
|
||||
, Outbox194Generic (..)
|
||||
, OutboxItem194Generic (..)
|
||||
, Inbox194Generic (..)
|
||||
, FollowerSet194Generic (..)
|
||||
, Project194Generic (..)
|
||||
, Workflow194Generic (..)
|
||||
, Ticket194Generic (..)
|
||||
, LocalTicket194Generic (..)
|
||||
, TicketAuthorLocal194
|
||||
, TicketAuthorLocal194Generic (..)
|
||||
, Discussion194Generic (..)
|
||||
, Ticket201
|
||||
, Ticket201Generic (..)
|
||||
, TicketProjectLocal201Generic (..)
|
||||
, Sharer205Generic (..)
|
||||
, Outbox205Generic (..)
|
||||
, OutboxItem205Generic (..)
|
||||
, Inbox205Generic (..)
|
||||
, FollowerSet205Generic (..)
|
||||
, Project205Generic (..)
|
||||
, Workflow205Generic (..)
|
||||
, Ticket205Generic (..)
|
||||
, TicketProjectLocal205Generic (..)
|
||||
, TicketAuthorRemote205
|
||||
, TicketAuthorRemote205Generic (..)
|
||||
, Instance215Generic (..)
|
||||
, RemoteObject215Generic (..)
|
||||
, RemoteDiscussion215
|
||||
, RemoteDiscussion215Generic (..)
|
||||
, TicketUnderProject223Generic (..)
|
||||
, Instance227Generic (..)
|
||||
, RemoteObject227Generic (..)
|
||||
, RemoteMessage227
|
||||
, RemoteMessage227Generic (..)
|
||||
, RemoteTicket238
|
||||
, RemoteTicket238Generic (..)
|
||||
, Instance238Generic (..)
|
||||
, RemoteObject238Generic (..)
|
||||
, Discussion238Generic (..)
|
||||
, RemoteDiscussion238Generic (..)
|
||||
, Forwarding241
|
||||
, Forwarding241Generic (..)
|
||||
, ForwarderProject241Generic (..)
|
||||
, TicketContextLocal247
|
||||
, TicketContextLocal247Generic (..)
|
||||
, TicketProjectLocal247Generic (..)
|
||||
, OutboxItem255Generic (..)
|
||||
, Person255Generic (..)
|
||||
, TicketDependency255
|
||||
, TicketDependency255Generic (..)
|
||||
, TicketDependencyAuthorLocal255Generic (..)
|
||||
, RemoteTicket260Generic (..)
|
||||
, LocalTicketDependency260
|
||||
, LocalTicketDependency260Generic (..)
|
||||
, TicketDependencyChildLocal260Generic (..)
|
||||
, TicketDependencyChildRemote260Generic (..)
|
||||
, Discussion263Generic (..)
|
||||
, FollowerSet263Generic (..)
|
||||
, Ticket263Generic (..)
|
||||
, LocalTicket263Generic (..)
|
||||
, LocalTicketDependency263
|
||||
, LocalTicketDependency263Generic (..)
|
||||
, Outbox266Generic (..)
|
||||
, OutboxItem266Generic (..)
|
||||
, LocalTicketDependency266
|
||||
, LocalTicketDependency266Generic (..)
|
||||
, LocalTicket266Generic (..)
|
||||
, TicketContextLocal266Generic (..)
|
||||
, TicketUnderProject266Generic (..)
|
||||
, TicketProjectLocal266Generic (..)
|
||||
, Project266Generic (..)
|
||||
, TicketResolve276Generic (..)
|
||||
, TicketResolveLocal276Generic (..)
|
||||
, Ticket276Generic (..)
|
||||
, LocalTicket276
|
||||
, LocalTicket276Generic (..)
|
||||
, Person276Generic (..)
|
||||
, OutboxItem276Generic (..)
|
||||
, TicketProjectLocal276Generic (..)
|
||||
, Project276Generic (..)
|
||||
, Ticket280Generic (..)
|
||||
, Bundle280Generic (..)
|
||||
, Patch280
|
||||
, Patch280Generic (..)
|
||||
, Repo282
|
||||
, Repo282Generic (..)
|
||||
, Collab285Generic (..)
|
||||
, CollabRecipLocal285Generic (..)
|
||||
, CollabRoleLocal285Generic (..)
|
||||
, CollabSenderLocal285Generic (..)
|
||||
, CollabTopicLocalProject285Generic (..)
|
||||
, CollabTopicLocalRepo285Generic (..)
|
||||
, OutboxItem285Generic (..)
|
||||
, Project285Generic (..)
|
||||
, ProjectCollab285
|
||||
, ProjectCollab285Generic (..)
|
||||
, Repo285Generic (..)
|
||||
, RepoCollab285
|
||||
, RepoCollab285Generic (..)
|
||||
, Project289
|
||||
, Inbox289Generic (..)
|
||||
, Outbox289Generic (..)
|
||||
, FollowerSet289Generic (..)
|
||||
, Actor289Generic (..)
|
||||
, Project289Generic (..)
|
||||
, Outbox297Generic (..)
|
||||
, OutboxItem297Generic (..)
|
||||
, Project297
|
||||
, Project297Generic (..)
|
||||
, Person297Generic (..)
|
||||
, CollabTopicLocalProject300
|
||||
, CollabTopicLocalProject300Generic (..)
|
||||
, CollabTopicLocalRepo300
|
||||
, CollabTopicLocalRepo300Generic (..)
|
||||
, CollabRecipLocal300Generic (..)
|
||||
, Person300Generic (..)
|
||||
, Project300Generic (..)
|
||||
, Repo300Generic (..)
|
||||
, CollabFulfillsLocalTopicCreation300Generic (..)
|
||||
)
|
||||
-}
|
||||
where
|
||||
|
||||
import Data.ByteString (ByteString)
|
||||
import Data.Text (Text)
|
||||
import Data.Time (UTCTime)
|
||||
import Database.Persist.Class (EntityField, Unique)
|
||||
import Database.Persist.EmailAddress ()
|
||||
import Database.Persist.Schema.Types (Entity)
|
||||
import Database.Persist.Schema.SQL ()
|
||||
import Database.Persist.Schema.TH (makeEntitiesMigration)
|
||||
import Database.Persist.Sql (SqlBackend)
|
||||
import Text.Email.Validate (EmailAddress)
|
||||
import Web.Text (HTML, PandocMarkdown)
|
||||
|
||||
import Crypto.ActorKey
|
||||
import Development.PatchMediaType
|
||||
import Development.PatchMediaType.Persist
|
||||
|
||||
import Vervis.FedURI
|
||||
import Vervis.Migration.TH (schema)
|
||||
import Vervis.Model.Group
|
||||
import Vervis.Model.Ident
|
||||
import Vervis.Model.Role
|
||||
import Vervis.Model.TH
|
||||
import Vervis.Model.Ticket
|
||||
import Vervis.Model.Workflow
|
||||
|
||||
-- For migrations 77, 114
|
||||
|
||||
import Data.Int
|
||||
|
||||
import Database.Persist.JSON
|
||||
import Network.FedURI
|
||||
import Web.ActivityPub
|
||||
|
||||
type PersistActivity = PersistJSON (Doc Activity URIMode)
|
||||
|
||||
makeEntitiesMigration "2016"
|
||||
$(modelFile "migrations/2016_09_01_just_workflow_prepare.model")
|
||||
|
||||
makeEntitiesMigration "2018"
|
||||
$(modelFile "migrations/2019_01_28_project_collabs.model")
|
||||
|
||||
makeEntitiesMigration "2019"
|
||||
$(modelFile "migrations/2019_02_03_verifkey.model")
|
||||
|
||||
makeEntitiesMigration "2019"
|
||||
$(modelFile "migrations/2019_03_18_message.model")
|
||||
|
||||
makeEntitiesMigration "2019"
|
||||
$(modelFile "migrations/2019_03_30_follower_set.model")
|
||||
|
||||
makeEntitiesMigration "201905"
|
||||
$(modelFile "migrations/2019_05_24.model")
|
||||
|
||||
makeEntitiesMigration "201906"
|
||||
$(modelFile "migrations/2019_06_02.model")
|
||||
|
||||
makeEntitiesMigration "201906"
|
||||
$(modelFile "migrations/2019_06_03.model")
|
||||
|
||||
makeEntitiesMigration "20190606"
|
||||
$(modelFile "migrations/2019_06_06_mig.model")
|
||||
|
||||
makeEntitiesMigration "20190607"
|
||||
$(modelFile "migrations/2019_06_07.model")
|
||||
|
||||
makeEntitiesMigration "20190609"
|
||||
$(modelFile "migrations/2019_06_09.model")
|
||||
|
||||
makeEntitiesMigration "2019Fill"
|
||||
$(modelFile "migrations/2019_06_09_fill.model")
|
||||
|
||||
makeEntitiesMigration "20190610"
|
||||
$(modelFile "migrations/2019_06_10.model")
|
||||
|
||||
makeEntitiesMigration "20190612"
|
||||
$(modelFile "migrations/2019_06_12.model")
|
||||
|
||||
makeEntitiesMigration "20190615"
|
||||
$(modelFile "migrations/2019_06_15.model")
|
||||
|
||||
makeEntitiesMigration "20190616"
|
||||
$(modelFile "migrations/2019_06_16.model")
|
||||
|
||||
makeEntitiesMigration "20190624"
|
||||
$(modelFile "migrations/2019_06_24.model")
|
||||
|
||||
makeEntitiesMigration "127"
|
||||
$(modelFile "migrations/2019_07_11.model")
|
||||
|
||||
makeEntitiesMigration "130"
|
||||
$(modelFile "migrations/2019_09_06.model")
|
||||
|
||||
makeEntitiesMigration "138"
|
||||
$(modelFile "migrations/2019_09_10.model")
|
||||
|
||||
makeEntitiesMigration "152"
|
||||
$(modelFile "migrations/2019_11_04_remote_activity_ident.model")
|
||||
|
||||
makeEntitiesMigration "159"
|
||||
$(modelFile "migrations/2019_11_05_remote_actor_ident.model")
|
||||
|
||||
makeEntitiesMigration "189" $(modelFile "migrations/2020_02_05_mig.model")
|
||||
|
||||
makeEntitiesMigration "194"
|
||||
$(modelFile "migrations/2020_02_06_tal_point_to_lt.model")
|
||||
|
||||
makeEntitiesMigration "201"
|
||||
$(modelFile "migrations/2020_02_07_tpl_mig.model")
|
||||
|
||||
makeEntitiesMigration "205"
|
||||
$(modelFile "migrations/2020_02_08_tar_point_to_tpl.model")
|
||||
|
||||
makeEntitiesMigration "215"
|
||||
$(modelFile "migrations/2020_02_09_rd_point_to_ro.model")
|
||||
|
||||
makeEntitiesMigration "223"
|
||||
$(modelFile "migrations/2020_02_09_tup_mig.model")
|
||||
|
||||
makeEntitiesMigration "227"
|
||||
$(modelFile "migrations/2020_02_10_rm_point_to_ro.model")
|
||||
|
||||
makeEntitiesMigration "238" $(modelFile "migrations/2020_04_10_rt_rd.model")
|
||||
|
||||
makeEntitiesMigration "241"
|
||||
$(modelFile "migrations/2020_05_12_fwd_sender_mig.model")
|
||||
|
||||
makeEntitiesMigration "247"
|
||||
$(modelFile "migrations/2020_05_16_tcl_mig.model")
|
||||
|
||||
makeEntitiesMigration "255" $(modelFile "migrations/2020_05_28_tda_mig.model")
|
||||
|
||||
makeEntitiesMigration "260" $(modelFile "migrations/2020_06_01_tdc_mig.model")
|
||||
|
||||
makeEntitiesMigration "263" $(modelFile "migrations/2020_06_02_tdp.model")
|
||||
|
||||
makeEntitiesMigration "266"
|
||||
$(modelFile "migrations/2020_06_15_td_accept.model")
|
||||
|
||||
makeEntitiesMigration "276"
|
||||
$(modelFile "migrations/2020_07_27_ticket_resolve_mig.model")
|
||||
|
||||
makeEntitiesMigration "280"
|
||||
$(modelFile "migrations/2020_08_10_bundle_mig.model")
|
||||
|
||||
makeEntitiesMigration "282"
|
||||
$(modelFile "migrations/2020_08_13_vcs.model")
|
||||
|
||||
makeEntitiesMigration "285"
|
||||
$(modelFile "migrations/2022_06_14_collab_mig.model")
|
||||
|
||||
makeEntitiesMigration "289"
|
||||
$(modelFile "migrations/2022_07_17_project_actor.model")
|
||||
|
||||
makeEntitiesMigration "297"
|
||||
$(modelFile "migrations/2022_07_24_project_create.model")
|
||||
|
||||
makeEntitiesMigration "300"
|
||||
$(modelFile "migrations/2022_07_25_collab_fulfills_mig.model")
|
||||
|
||||
makeEntitiesMigration "303"
|
||||
$(modelFile "migrations/303_2022-08-04_username.model")
|
||||
|
||||
makeEntitiesMigration "308"
|
||||
$(modelFile "migrations/308_2022-08-04_remove_tcr.model")
|
||||
|
||||
makeEntitiesMigration "310"
|
||||
$(modelFile "migrations/310_2022-08-04_move_ticket_discuss.model")
|
||||
|
||||
makeEntitiesMigration "312"
|
||||
$(modelFile "migrations/312_2022-08-04_move_ticket_followers.model")
|
||||
|
||||
makeEntitiesMigration "316"
|
||||
$(modelFile "migrations/316_2022-08-04_move_ticket_accept.model")
|
||||
|
||||
makeEntitiesMigration "318"
|
||||
$(modelFile "migrations/318_2022-08-04_tal_ticket.model")
|
||||
|
||||
makeEntitiesMigration "323"
|
||||
$(modelFile "migrations/323_2022-08-04_tar_ticket.model")
|
||||
|
||||
makeEntitiesMigration "328"
|
||||
$(modelFile "migrations/328_2022-08-04_tjl_ticket.model")
|
||||
|
||||
makeEntitiesMigration "332"
|
||||
$(modelFile "migrations/332_2022-08-04_trl_ticket.model")
|
||||
|
||||
makeEntitiesMigration "338"
|
||||
$(modelFile "migrations/338_2022-08-04_rtd_child.model")
|
||||
|
||||
makeEntitiesMigration "342"
|
||||
$(modelFile "migrations/342_2022-08-04_ltd_parent.model")
|
||||
|
||||
makeEntitiesMigration "345"
|
||||
$(modelFile "migrations/345_2022-08-04_tdcl_child.model")
|
||||
|
||||
makeEntitiesMigration "348"
|
||||
$(modelFile "migrations/348_2022-08-04_tr_ticket.model")
|
||||
|
||||
makeEntitiesMigration "356"
|
||||
$(modelFile "migrations/356_2022-08-04_person_actor.model")
|
||||
|
||||
makeEntitiesMigration "365"
|
||||
$(modelFile "migrations/365_2022-08-04_group_actor.model")
|
||||
|
||||
makeEntitiesMigration "367"
|
||||
$(modelFile "migrations/367_2022-08-04_repo_actor.model")
|
||||
|
||||
makeEntitiesMigration "388"
|
||||
$(modelFile "migrations/388_2022-08-04_ticket_loom.model")
|
||||
|
||||
makeEntitiesMigration "396"
|
||||
$(modelFile "migrations/396_2022-08-04_repo_dir.model")
|
||||
|
||||
makeEntitiesMigration "409"
|
||||
$(modelFile "migrations/409_2022-08-05_repo_create.model")
|
||||
|
||||
makeEntitiesMigration "414"
|
||||
$(modelFile "migrations/414_2022-08-05_followremote_actor.model")
|
||||
|
||||
makeEntitiesMigration "418"
|
||||
$(modelFile "migrations/418_2022-08-06_follow_actor.model")
|
||||
|
||||
makeEntitiesMigration "426"
|
||||
$(modelFile "migrations/426_2022-08-21_collab_accept_mig.model")
|
||||
|
||||
makeEntitiesMigration "429"
|
||||
$(modelFile "migrations/429_2022-08-30_collab_repo.model")
|
||||
|
||||
makeEntitiesMigration "430"
|
||||
$(modelFile "migrations/430_2022-08-30_collab_deck.model")
|
||||
|
||||
makeEntitiesMigration "431"
|
||||
$(modelFile "migrations/431_2022-08-30_collab_loom.model")
|
||||
|
||||
makeEntitiesMigration "447"
|
||||
$(modelFile "migrations/447_2022-08-30_collab_accept.model")
|
||||
|
||||
makeEntitiesMigration "466"
|
||||
$(modelFile "migrations/466_2022-09-04_collab_topic_repo.model")
|
||||
|
||||
makeEntitiesMigration "467"
|
||||
$(modelFile "migrations/467_2022-09-04_collab_topic_deck.model")
|
||||
|
||||
makeEntitiesMigration "468"
|
||||
$(modelFile "migrations/468_2022-09-04_collab_topic_loom.model")
|
||||
|
||||
makeEntitiesMigration "486"
|
||||
$(modelFile "migrations/486_2022-09-04_collab_enable.model")
|
||||
|
||||
makeEntitiesMigration "495"
|
||||
$(modelFile "migrations/495_2022-09-21_ticket_title.model")
|
||||
|
||||
makeEntitiesMigration "498"
|
||||
$(modelFile "migrations/498_2022-10-03_forwarder.model")
|
||||
|
||||
makeEntitiesMigration "504"
|
||||
$(modelFile "migrations/504_2022-10-16_message_author.model")
|
||||
|
||||
makeEntitiesMigration "507"
|
||||
$(modelFile "migrations/507_2022-10-16_workflow.model")
|
||||
|
||||
makeEntitiesMigration "515"
|
||||
$(modelFile "migrations/515_2022-10-19_inviter_local.model")
|
||||
|
||||
makeEntitiesMigration "520"
|
||||
$(modelFile "migrations/520_2022-10-19_inviter_remote.model")
|
||||
|
||||
makeEntitiesMigration "525"
|
||||
$(modelFile "migrations/525_2022-10-19_collab_accept_local.model")
|
||||
|
||||
makeEntitiesMigration "527"
|
||||
$(modelFile "migrations/527_2022-10-20_collab_accept_remote.model")
|
||||
|
||||
makeEntitiesMigration "547"
|
||||
$(modelFile "migrations/547_2023-06-28_invite_accept.model")
|
||||
|
||||
makeEntitiesMigration "549"
|
||||
$(modelFile "migrations/549_2023-11-21_group_create.model")
|
||||
|
||||
makeEntitiesMigration "553"
|
||||
$(modelFile "migrations/553_2023-11-21_collab_deleg.model")
|
||||
|
||||
makeEntitiesMigration "554"
|
||||
$(modelFile "migrations/554_2023-11-21_further_local_deleg.model")
|
||||
|
||||
makeEntitiesMigration "565"
|
||||
$(modelFile "migrations/565_2023-12-09_collab_permit.model")
|
63
src/Vervis/Migration/Model2016.hs
Normal file
63
src/Vervis/Migration/Model2016.hs
Normal file
|
@ -0,0 +1,63 @@
|
|||
{- This file is part of Vervis.
|
||||
-
|
||||
- Written in 2018, 2019, 2020, 2022, 2023, 2024
|
||||
- by fr33domlover <fr33domlover@riseup.net>.
|
||||
-
|
||||
- ♡ Copying is an act of love. Please copy, reuse and share.
|
||||
-
|
||||
- The author(s) have dedicated all copyright and related and neighboring
|
||||
- rights to this software to the public domain worldwide. This software is
|
||||
- distributed without any warranty.
|
||||
-
|
||||
- You should have received a copy of the CC0 Public Domain Dedication along
|
||||
- with this software. If not, see
|
||||
- <http://creativecommons.org/publicdomain/zero/1.0/>.
|
||||
-}
|
||||
|
||||
module Vervis.Migration.Model2016
|
||||
{-
|
||||
( EntityField (..)
|
||||
, Unique (..)
|
||||
, Sharer2016
|
||||
, Project2016
|
||||
, Workflow2016Generic (..)
|
||||
, Workflow2016
|
||||
)
|
||||
-}
|
||||
where
|
||||
|
||||
import Data.ByteString (ByteString)
|
||||
import Data.Text (Text)
|
||||
import Data.Time (UTCTime)
|
||||
import Database.Persist.Class (EntityField, Unique)
|
||||
import Database.Persist.EmailAddress ()
|
||||
import Database.Persist.Schema.Types (Entity)
|
||||
import Database.Persist.Schema.SQL ()
|
||||
import Database.Persist.Schema.TH (makeEntitiesMigration)
|
||||
import Database.Persist.Sql (SqlBackend)
|
||||
import Text.Email.Validate (EmailAddress)
|
||||
import Web.Text (HTML, PandocMarkdown)
|
||||
|
||||
import Crypto.ActorKey
|
||||
import Development.PatchMediaType
|
||||
import Development.PatchMediaType.Persist
|
||||
|
||||
import Vervis.FedURI
|
||||
import Vervis.Migration.TH (schema)
|
||||
import Vervis.Model.Group
|
||||
import Vervis.Model.Ident
|
||||
import Vervis.Model.Role
|
||||
import Vervis.Model.TH
|
||||
import Vervis.Model.Ticket
|
||||
import Vervis.Model.Workflow
|
||||
|
||||
-- For migrations 77, 114
|
||||
|
||||
import Data.Int
|
||||
|
||||
import Database.Persist.JSON
|
||||
import Network.FedURI
|
||||
import Web.ActivityPub
|
||||
|
||||
makeEntitiesMigration "2016"
|
||||
$(modelFile "migrations/2016_09_01_just_workflow_prepare.model")
|
59
src/Vervis/Migration/Model2018.hs
Normal file
59
src/Vervis/Migration/Model2018.hs
Normal file
|
@ -0,0 +1,59 @@
|
|||
{- This file is part of Vervis.
|
||||
-
|
||||
- Written in 2018, 2019, 2020, 2022, 2023, 2024
|
||||
- by fr33domlover <fr33domlover@riseup.net>.
|
||||
-
|
||||
- ♡ Copying is an act of love. Please copy, reuse and share.
|
||||
-
|
||||
- The author(s) have dedicated all copyright and related and neighboring
|
||||
- rights to this software to the public domain worldwide. This software is
|
||||
- distributed without any warranty.
|
||||
-
|
||||
- You should have received a copy of the CC0 Public Domain Dedication along
|
||||
- with this software. If not, see
|
||||
- <http://creativecommons.org/publicdomain/zero/1.0/>.
|
||||
-}
|
||||
|
||||
module Vervis.Migration.Model2018
|
||||
{-
|
||||
( EntityField (..)
|
||||
, Unique (..)
|
||||
)
|
||||
-}
|
||||
where
|
||||
|
||||
import Data.ByteString (ByteString)
|
||||
import Data.Text (Text)
|
||||
import Data.Time (UTCTime)
|
||||
import Database.Persist.Class (EntityField, Unique)
|
||||
import Database.Persist.EmailAddress ()
|
||||
import Database.Persist.Schema.Types (Entity)
|
||||
import Database.Persist.Schema.SQL ()
|
||||
import Database.Persist.Schema.TH (makeEntitiesMigration)
|
||||
import Database.Persist.Sql (SqlBackend)
|
||||
import Text.Email.Validate (EmailAddress)
|
||||
import Web.Text (HTML, PandocMarkdown)
|
||||
|
||||
import Crypto.ActorKey
|
||||
import Development.PatchMediaType
|
||||
import Development.PatchMediaType.Persist
|
||||
|
||||
import Vervis.FedURI
|
||||
import Vervis.Migration.TH (schema)
|
||||
import Vervis.Model.Group
|
||||
import Vervis.Model.Ident
|
||||
import Vervis.Model.Role
|
||||
import Vervis.Model.TH
|
||||
import Vervis.Model.Ticket
|
||||
import Vervis.Model.Workflow
|
||||
|
||||
-- For migrations 77, 114
|
||||
|
||||
import Data.Int
|
||||
|
||||
import Database.Persist.JSON
|
||||
import Network.FedURI
|
||||
import Web.ActivityPub
|
||||
|
||||
makeEntitiesMigration "2018"
|
||||
$(modelFile "migrations/2019_01_28_project_collabs.model")
|
220
src/Vervis/Migration/Model2019.hs
Normal file
220
src/Vervis/Migration/Model2019.hs
Normal file
|
@ -0,0 +1,220 @@
|
|||
{- This file is part of Vervis.
|
||||
-
|
||||
- Written in 2018, 2019, 2020, 2022, 2023, 2024
|
||||
- by fr33domlover <fr33domlover@riseup.net>.
|
||||
-
|
||||
- ♡ Copying is an act of love. Please copy, reuse and share.
|
||||
-
|
||||
- The author(s) have dedicated all copyright and related and neighboring
|
||||
- rights to this software to the public domain worldwide. This software is
|
||||
- distributed without any warranty.
|
||||
-
|
||||
- You should have received a copy of the CC0 Public Domain Dedication along
|
||||
- with this software. If not, see
|
||||
- <http://creativecommons.org/publicdomain/zero/1.0/>.
|
||||
-}
|
||||
|
||||
module Vervis.Migration.Model2019
|
||||
{-
|
||||
( EntityField (..)
|
||||
, Unique (..)
|
||||
, VerifKey2019Generic (..)
|
||||
, VerifKey2019
|
||||
, VerifKeySharedUsage2019Generic (..)
|
||||
, VerifKeySharedUsage2019
|
||||
, Message2019Generic (..)
|
||||
, Message2019
|
||||
, LocalMessage2019Generic (..)
|
||||
, LocalMessage2019
|
||||
, FollowerSet2019Generic (..)
|
||||
, Ticket2019
|
||||
, Sharer201905Generic (..)
|
||||
, Person201905Generic (..)
|
||||
, OutboxItem201905Generic (..)
|
||||
, OutboxItem201905
|
||||
, LocalMessage201905Generic (..)
|
||||
, LocalMessage201905
|
||||
, Message201905Generic (..)
|
||||
, Project201905Generic (..)
|
||||
, Ticket201905Generic (..)
|
||||
, Instance201905Generic (..)
|
||||
, RemoteDiscussion201905Generic (..)
|
||||
, RemoteMessage201905Generic (..)
|
||||
, Message201906Generic (..)
|
||||
, Message201906
|
||||
, Ticket201906Generic (..)
|
||||
, Ticket201906
|
||||
, Ticket20190606Generic (..)
|
||||
, Ticket20190606
|
||||
, TicketAuthorLocal20190606Generic (..)
|
||||
, Person20190607Generic (..)
|
||||
, Person20190607
|
||||
, Inbox20190607Generic (..)
|
||||
, InboxItemLocal20190607Generic (..)
|
||||
, InboxItemLocal20190607
|
||||
, InboxItemRemote20190607Generic (..)
|
||||
, InboxItemRemote20190607
|
||||
, Project20190609
|
||||
, Inbox20190609Generic (..)
|
||||
, InboxItem2019FillGeneric (..)
|
||||
, InboxItem2019Fill
|
||||
, InboxItemLocal2019FillGeneric (..)
|
||||
, InboxItemRemote2019FillGeneric (..)
|
||||
, Project2019FillGeneric (..)
|
||||
, Ticket2019FillGeneric (..)
|
||||
, Message2019FillGeneric (..)
|
||||
, LocalMessage2019FillGeneric (..)
|
||||
, RemoteMessage2019FillGeneric (..)
|
||||
, FollowerSet20190610Generic (..)
|
||||
, Project20190610
|
||||
, Sharer20190612Generic (..)
|
||||
, Person20190612Generic (..)
|
||||
, OutboxItem20190612Generic (..)
|
||||
, Inbox20190612Generic (..)
|
||||
, InboxItem20190612Generic (..)
|
||||
, InboxItemLocal20190612Generic (..)
|
||||
, Project20190612Generic (..)
|
||||
, Ticket20190612Generic (..)
|
||||
, Ticket20190612
|
||||
, TicketAuthorLocal20190612Generic (..)
|
||||
, Person20190615Generic (..)
|
||||
, Person20190615
|
||||
, Outbox20190615Generic (..)
|
||||
, OutboxItem20190615Generic (..)
|
||||
, OutboxItem20190615
|
||||
, Project20190616Generic (..)
|
||||
, Project20190616
|
||||
, Outbox20190616Generic (..)
|
||||
, Sharer20190624Generic (..)
|
||||
, Person20190624Generic (..)
|
||||
, Outbox20190624Generic (..)
|
||||
, OutboxItem20190624Generic (..)
|
||||
, Inbox20190624Generic (..)
|
||||
, InboxItem20190624Generic (..)
|
||||
, InboxItemLocal20190624Generic (..)
|
||||
, Project20190624Generic (..)
|
||||
, Ticket20190624Generic (..)
|
||||
, Ticket20190624
|
||||
, TicketAuthorLocal20190624Generic (..)
|
||||
, Sharer127Generic (..)
|
||||
, Person127Generic (..)
|
||||
, Outbox127Generic (..)
|
||||
, Inbox127Generic (..)
|
||||
, Project127Generic (..)
|
||||
, Ticket127Generic (..)
|
||||
, TicketDependency127Generic (..)
|
||||
, TicketDependency127
|
||||
, Inbox130Generic (..)
|
||||
, FollowerSet130Generic (..)
|
||||
, Repo130
|
||||
, Person130
|
||||
, Outbox138Generic (..)
|
||||
, Repo138
|
||||
, Instance152Generic (..)
|
||||
, RemoteObject152Generic (..)
|
||||
, RemoteActivity152Generic (..)
|
||||
, RemoteActivity152
|
||||
, Instance159Generic (..)
|
||||
, RemoteObject159Generic (..)
|
||||
, RemoteActor159Generic (..)
|
||||
, RemoteActor159
|
||||
, UnfetchedRemoteActor159Generic (..)
|
||||
, UnfetchedRemoteActor159
|
||||
, RemoteCollection159Generic (..)
|
||||
, RemoteCollection159
|
||||
)
|
||||
-}
|
||||
where
|
||||
|
||||
import Data.ByteString (ByteString)
|
||||
import Data.Text (Text)
|
||||
import Data.Time (UTCTime)
|
||||
import Database.Persist.Class (EntityField, Unique)
|
||||
import Database.Persist.EmailAddress ()
|
||||
import Database.Persist.Schema.Types (Entity)
|
||||
import Database.Persist.Schema.SQL ()
|
||||
import Database.Persist.Schema.TH (makeEntitiesMigration)
|
||||
import Database.Persist.Sql (SqlBackend)
|
||||
import Text.Email.Validate (EmailAddress)
|
||||
import Web.Text (HTML, PandocMarkdown)
|
||||
|
||||
import Crypto.ActorKey
|
||||
import Development.PatchMediaType
|
||||
import Development.PatchMediaType.Persist
|
||||
|
||||
import Vervis.FedURI
|
||||
import Vervis.Migration.TH (schema)
|
||||
import Vervis.Model.Group
|
||||
import Vervis.Model.Ident
|
||||
import Vervis.Model.Role
|
||||
import Vervis.Model.TH
|
||||
import Vervis.Model.Ticket
|
||||
import Vervis.Model.Workflow
|
||||
|
||||
-- For migrations 77, 114
|
||||
|
||||
import Data.Int
|
||||
|
||||
import Database.Persist.JSON
|
||||
import Network.FedURI
|
||||
import Web.ActivityPub
|
||||
|
||||
makeEntitiesMigration "2019"
|
||||
$(modelFile "migrations/2019_02_03_verifkey.model")
|
||||
|
||||
makeEntitiesMigration "2019"
|
||||
$(modelFile "migrations/2019_03_18_message.model")
|
||||
|
||||
makeEntitiesMigration "2019"
|
||||
$(modelFile "migrations/2019_03_30_follower_set.model")
|
||||
|
||||
makeEntitiesMigration "201905"
|
||||
$(modelFile "migrations/2019_05_24.model")
|
||||
|
||||
makeEntitiesMigration "201906"
|
||||
$(modelFile "migrations/2019_06_02.model")
|
||||
|
||||
makeEntitiesMigration "201906"
|
||||
$(modelFile "migrations/2019_06_03.model")
|
||||
|
||||
makeEntitiesMigration "20190606"
|
||||
$(modelFile "migrations/2019_06_06_mig.model")
|
||||
|
||||
makeEntitiesMigration "20190607"
|
||||
$(modelFile "migrations/2019_06_07.model")
|
||||
|
||||
makeEntitiesMigration "20190609"
|
||||
$(modelFile "migrations/2019_06_09.model")
|
||||
|
||||
makeEntitiesMigration "2019Fill"
|
||||
$(modelFile "migrations/2019_06_09_fill.model")
|
||||
|
||||
makeEntitiesMigration "20190610"
|
||||
$(modelFile "migrations/2019_06_10.model")
|
||||
|
||||
makeEntitiesMigration "20190612"
|
||||
$(modelFile "migrations/2019_06_12.model")
|
||||
|
||||
makeEntitiesMigration "20190615"
|
||||
$(modelFile "migrations/2019_06_15.model")
|
||||
|
||||
makeEntitiesMigration "20190616"
|
||||
$(modelFile "migrations/2019_06_16.model")
|
||||
|
||||
makeEntitiesMigration "20190624"
|
||||
$(modelFile "migrations/2019_06_24.model")
|
||||
|
||||
makeEntitiesMigration "127"
|
||||
$(modelFile "migrations/2019_07_11.model")
|
||||
|
||||
makeEntitiesMigration "130"
|
||||
$(modelFile "migrations/2019_09_06.model")
|
||||
|
||||
makeEntitiesMigration "138"
|
||||
$(modelFile "migrations/2019_09_10.model")
|
||||
|
||||
makeEntitiesMigration "152"
|
||||
$(modelFile "migrations/2019_11_04_remote_activity_ident.model")
|
||||
|
||||
makeEntitiesMigration "159"
|
||||
$(modelFile "migrations/2019_11_05_remote_actor_ident.model")
|
192
src/Vervis/Migration/Model2020.hs
Normal file
192
src/Vervis/Migration/Model2020.hs
Normal file
|
@ -0,0 +1,192 @@
|
|||
{- This file is part of Vervis.
|
||||
-
|
||||
- Written in 2018, 2019, 2020, 2022, 2023, 2024
|
||||
- by fr33domlover <fr33domlover@riseup.net>.
|
||||
-
|
||||
- ♡ Copying is an act of love. Please copy, reuse and share.
|
||||
-
|
||||
- The author(s) have dedicated all copyright and related and neighboring
|
||||
- rights to this software to the public domain worldwide. This software is
|
||||
- distributed without any warranty.
|
||||
-
|
||||
- You should have received a copy of the CC0 Public Domain Dedication along
|
||||
- with this software. If not, see
|
||||
- <http://creativecommons.org/publicdomain/zero/1.0/>.
|
||||
-}
|
||||
|
||||
module Vervis.Migration.Model2020
|
||||
{-
|
||||
( EntityField (..)
|
||||
, Unique (..)
|
||||
, Ticket189
|
||||
, Ticket189Generic (..)
|
||||
, LocalTicket189Generic (..)
|
||||
, Sharer194Generic (..)
|
||||
, Outbox194Generic (..)
|
||||
, OutboxItem194Generic (..)
|
||||
, Inbox194Generic (..)
|
||||
, FollowerSet194Generic (..)
|
||||
, Project194Generic (..)
|
||||
, Workflow194Generic (..)
|
||||
, Ticket194Generic (..)
|
||||
, LocalTicket194Generic (..)
|
||||
, TicketAuthorLocal194
|
||||
, TicketAuthorLocal194Generic (..)
|
||||
, Discussion194Generic (..)
|
||||
, Ticket201
|
||||
, Ticket201Generic (..)
|
||||
, TicketProjectLocal201Generic (..)
|
||||
, Sharer205Generic (..)
|
||||
, Outbox205Generic (..)
|
||||
, OutboxItem205Generic (..)
|
||||
, Inbox205Generic (..)
|
||||
, FollowerSet205Generic (..)
|
||||
, Project205Generic (..)
|
||||
, Workflow205Generic (..)
|
||||
, Ticket205Generic (..)
|
||||
, TicketProjectLocal205Generic (..)
|
||||
, TicketAuthorRemote205
|
||||
, TicketAuthorRemote205Generic (..)
|
||||
, Instance215Generic (..)
|
||||
, RemoteObject215Generic (..)
|
||||
, RemoteDiscussion215
|
||||
, RemoteDiscussion215Generic (..)
|
||||
, TicketUnderProject223Generic (..)
|
||||
, Instance227Generic (..)
|
||||
, RemoteObject227Generic (..)
|
||||
, RemoteMessage227
|
||||
, RemoteMessage227Generic (..)
|
||||
, RemoteTicket238
|
||||
, RemoteTicket238Generic (..)
|
||||
, Instance238Generic (..)
|
||||
, RemoteObject238Generic (..)
|
||||
, Discussion238Generic (..)
|
||||
, RemoteDiscussion238Generic (..)
|
||||
, Forwarding241
|
||||
, Forwarding241Generic (..)
|
||||
, ForwarderProject241Generic (..)
|
||||
, TicketContextLocal247
|
||||
, TicketContextLocal247Generic (..)
|
||||
, TicketProjectLocal247Generic (..)
|
||||
, OutboxItem255Generic (..)
|
||||
, Person255Generic (..)
|
||||
, TicketDependency255
|
||||
, TicketDependency255Generic (..)
|
||||
, TicketDependencyAuthorLocal255Generic (..)
|
||||
, RemoteTicket260Generic (..)
|
||||
, LocalTicketDependency260
|
||||
, LocalTicketDependency260Generic (..)
|
||||
, TicketDependencyChildLocal260Generic (..)
|
||||
, TicketDependencyChildRemote260Generic (..)
|
||||
, Discussion263Generic (..)
|
||||
, FollowerSet263Generic (..)
|
||||
, Ticket263Generic (..)
|
||||
, LocalTicket263Generic (..)
|
||||
, LocalTicketDependency263
|
||||
, LocalTicketDependency263Generic (..)
|
||||
, Outbox266Generic (..)
|
||||
, OutboxItem266Generic (..)
|
||||
, LocalTicketDependency266
|
||||
, LocalTicketDependency266Generic (..)
|
||||
, LocalTicket266Generic (..)
|
||||
, TicketContextLocal266Generic (..)
|
||||
, TicketUnderProject266Generic (..)
|
||||
, TicketProjectLocal266Generic (..)
|
||||
, Project266Generic (..)
|
||||
, TicketResolve276Generic (..)
|
||||
, TicketResolveLocal276Generic (..)
|
||||
, Ticket276Generic (..)
|
||||
, LocalTicket276
|
||||
, LocalTicket276Generic (..)
|
||||
, Person276Generic (..)
|
||||
, OutboxItem276Generic (..)
|
||||
, TicketProjectLocal276Generic (..)
|
||||
, Project276Generic (..)
|
||||
, Ticket280Generic (..)
|
||||
, Bundle280Generic (..)
|
||||
, Patch280
|
||||
, Patch280Generic (..)
|
||||
, Repo282
|
||||
, Repo282Generic (..)
|
||||
)
|
||||
-}
|
||||
where
|
||||
|
||||
import Data.ByteString (ByteString)
|
||||
import Data.Text (Text)
|
||||
import Data.Time (UTCTime)
|
||||
import Database.Persist.Class (EntityField, Unique)
|
||||
import Database.Persist.EmailAddress ()
|
||||
import Database.Persist.Schema.Types (Entity)
|
||||
import Database.Persist.Schema.SQL ()
|
||||
import Database.Persist.Schema.TH (makeEntitiesMigration)
|
||||
import Database.Persist.Sql (SqlBackend)
|
||||
import Text.Email.Validate (EmailAddress)
|
||||
import Web.Text (HTML, PandocMarkdown)
|
||||
|
||||
import Crypto.ActorKey
|
||||
import Development.PatchMediaType
|
||||
import Development.PatchMediaType.Persist
|
||||
|
||||
import Vervis.FedURI
|
||||
import Vervis.Migration.TH (schema)
|
||||
import Vervis.Model.Group
|
||||
import Vervis.Model.Ident
|
||||
import Vervis.Model.Role
|
||||
import Vervis.Model.TH
|
||||
import Vervis.Model.Ticket
|
||||
import Vervis.Model.Workflow
|
||||
|
||||
-- For migrations 77, 114
|
||||
|
||||
import Data.Int
|
||||
|
||||
import Database.Persist.JSON
|
||||
import Network.FedURI
|
||||
import Web.ActivityPub
|
||||
|
||||
makeEntitiesMigration "189" $(modelFile "migrations/2020_02_05_mig.model")
|
||||
|
||||
makeEntitiesMigration "194"
|
||||
$(modelFile "migrations/2020_02_06_tal_point_to_lt.model")
|
||||
|
||||
makeEntitiesMigration "201"
|
||||
$(modelFile "migrations/2020_02_07_tpl_mig.model")
|
||||
|
||||
makeEntitiesMigration "205"
|
||||
$(modelFile "migrations/2020_02_08_tar_point_to_tpl.model")
|
||||
|
||||
makeEntitiesMigration "215"
|
||||
$(modelFile "migrations/2020_02_09_rd_point_to_ro.model")
|
||||
|
||||
makeEntitiesMigration "223"
|
||||
$(modelFile "migrations/2020_02_09_tup_mig.model")
|
||||
|
||||
makeEntitiesMigration "227"
|
||||
$(modelFile "migrations/2020_02_10_rm_point_to_ro.model")
|
||||
|
||||
makeEntitiesMigration "238" $(modelFile "migrations/2020_04_10_rt_rd.model")
|
||||
|
||||
makeEntitiesMigration "241"
|
||||
$(modelFile "migrations/2020_05_12_fwd_sender_mig.model")
|
||||
|
||||
makeEntitiesMigration "247"
|
||||
$(modelFile "migrations/2020_05_16_tcl_mig.model")
|
||||
|
||||
makeEntitiesMigration "255" $(modelFile "migrations/2020_05_28_tda_mig.model")
|
||||
|
||||
makeEntitiesMigration "260" $(modelFile "migrations/2020_06_01_tdc_mig.model")
|
||||
|
||||
makeEntitiesMigration "263" $(modelFile "migrations/2020_06_02_tdp.model")
|
||||
|
||||
makeEntitiesMigration "266"
|
||||
$(modelFile "migrations/2020_06_15_td_accept.model")
|
||||
|
||||
makeEntitiesMigration "276"
|
||||
$(modelFile "migrations/2020_07_27_ticket_resolve_mig.model")
|
||||
|
||||
makeEntitiesMigration "280"
|
||||
$(modelFile "migrations/2020_08_10_bundle_mig.model")
|
||||
|
||||
makeEntitiesMigration "282"
|
||||
$(modelFile "migrations/2020_08_13_vcs.model")
|
215
src/Vervis/Migration/Model2022.hs
Normal file
215
src/Vervis/Migration/Model2022.hs
Normal file
|
@ -0,0 +1,215 @@
|
|||
{- This file is part of Vervis.
|
||||
-
|
||||
- Written in 2018, 2019, 2020, 2022, 2023, 2024
|
||||
- by fr33domlover <fr33domlover@riseup.net>.
|
||||
-
|
||||
- ♡ Copying is an act of love. Please copy, reuse and share.
|
||||
-
|
||||
- The author(s) have dedicated all copyright and related and neighboring
|
||||
- rights to this software to the public domain worldwide. This software is
|
||||
- distributed without any warranty.
|
||||
-
|
||||
- You should have received a copy of the CC0 Public Domain Dedication along
|
||||
- with this software. If not, see
|
||||
- <http://creativecommons.org/publicdomain/zero/1.0/>.
|
||||
-}
|
||||
|
||||
module Vervis.Migration.Model2022
|
||||
{-
|
||||
( EntityField (..)
|
||||
, Unique (..)
|
||||
, Collab285Generic (..)
|
||||
, CollabRecipLocal285Generic (..)
|
||||
, CollabRoleLocal285Generic (..)
|
||||
, CollabSenderLocal285Generic (..)
|
||||
, CollabTopicLocalProject285Generic (..)
|
||||
, CollabTopicLocalRepo285Generic (..)
|
||||
, OutboxItem285Generic (..)
|
||||
, Project285Generic (..)
|
||||
, ProjectCollab285
|
||||
, ProjectCollab285Generic (..)
|
||||
, Repo285Generic (..)
|
||||
, RepoCollab285
|
||||
, RepoCollab285Generic (..)
|
||||
, Project289
|
||||
, Inbox289Generic (..)
|
||||
, Outbox289Generic (..)
|
||||
, FollowerSet289Generic (..)
|
||||
, Actor289Generic (..)
|
||||
, Project289Generic (..)
|
||||
, Outbox297Generic (..)
|
||||
, OutboxItem297Generic (..)
|
||||
, Project297
|
||||
, Project297Generic (..)
|
||||
, Person297Generic (..)
|
||||
, CollabTopicLocalProject300
|
||||
, CollabTopicLocalProject300Generic (..)
|
||||
, CollabTopicLocalRepo300
|
||||
, CollabTopicLocalRepo300Generic (..)
|
||||
, CollabRecipLocal300Generic (..)
|
||||
, Person300Generic (..)
|
||||
, Project300Generic (..)
|
||||
, Repo300Generic (..)
|
||||
, CollabFulfillsLocalTopicCreation300Generic (..)
|
||||
)
|
||||
-}
|
||||
where
|
||||
|
||||
import Data.ByteString (ByteString)
|
||||
import Data.Text (Text)
|
||||
import Data.Time (UTCTime)
|
||||
import Database.Persist.Class (EntityField, Unique)
|
||||
import Database.Persist.EmailAddress ()
|
||||
import Database.Persist.Schema.Types (Entity)
|
||||
import Database.Persist.Schema.SQL ()
|
||||
import Database.Persist.Schema.TH (makeEntitiesMigration)
|
||||
import Database.Persist.Sql (SqlBackend)
|
||||
import Text.Email.Validate (EmailAddress)
|
||||
import Web.Text (HTML, PandocMarkdown)
|
||||
|
||||
import Crypto.ActorKey
|
||||
import Development.PatchMediaType
|
||||
import Development.PatchMediaType.Persist
|
||||
|
||||
import Vervis.FedURI
|
||||
import Vervis.Migration.TH (schema)
|
||||
import Vervis.Model.Group
|
||||
import Vervis.Model.Ident
|
||||
import Vervis.Model.Role
|
||||
import Vervis.Model.TH
|
||||
import Vervis.Model.Ticket
|
||||
import Vervis.Model.Workflow
|
||||
|
||||
-- For migrations 77, 114
|
||||
|
||||
import Data.Int
|
||||
|
||||
import Database.Persist.JSON
|
||||
import Network.FedURI
|
||||
import Web.ActivityPub
|
||||
|
||||
makeEntitiesMigration "285"
|
||||
$(modelFile "migrations/2022_06_14_collab_mig.model")
|
||||
|
||||
makeEntitiesMigration "289"
|
||||
$(modelFile "migrations/2022_07_17_project_actor.model")
|
||||
|
||||
makeEntitiesMigration "297"
|
||||
$(modelFile "migrations/2022_07_24_project_create.model")
|
||||
|
||||
makeEntitiesMigration "300"
|
||||
$(modelFile "migrations/2022_07_25_collab_fulfills_mig.model")
|
||||
|
||||
makeEntitiesMigration "303"
|
||||
$(modelFile "migrations/303_2022-08-04_username.model")
|
||||
|
||||
makeEntitiesMigration "308"
|
||||
$(modelFile "migrations/308_2022-08-04_remove_tcr.model")
|
||||
|
||||
makeEntitiesMigration "310"
|
||||
$(modelFile "migrations/310_2022-08-04_move_ticket_discuss.model")
|
||||
|
||||
makeEntitiesMigration "312"
|
||||
$(modelFile "migrations/312_2022-08-04_move_ticket_followers.model")
|
||||
|
||||
makeEntitiesMigration "316"
|
||||
$(modelFile "migrations/316_2022-08-04_move_ticket_accept.model")
|
||||
|
||||
makeEntitiesMigration "318"
|
||||
$(modelFile "migrations/318_2022-08-04_tal_ticket.model")
|
||||
|
||||
makeEntitiesMigration "323"
|
||||
$(modelFile "migrations/323_2022-08-04_tar_ticket.model")
|
||||
|
||||
makeEntitiesMigration "328"
|
||||
$(modelFile "migrations/328_2022-08-04_tjl_ticket.model")
|
||||
|
||||
makeEntitiesMigration "332"
|
||||
$(modelFile "migrations/332_2022-08-04_trl_ticket.model")
|
||||
|
||||
makeEntitiesMigration "338"
|
||||
$(modelFile "migrations/338_2022-08-04_rtd_child.model")
|
||||
|
||||
makeEntitiesMigration "342"
|
||||
$(modelFile "migrations/342_2022-08-04_ltd_parent.model")
|
||||
|
||||
makeEntitiesMigration "345"
|
||||
$(modelFile "migrations/345_2022-08-04_tdcl_child.model")
|
||||
|
||||
makeEntitiesMigration "348"
|
||||
$(modelFile "migrations/348_2022-08-04_tr_ticket.model")
|
||||
|
||||
makeEntitiesMigration "356"
|
||||
$(modelFile "migrations/356_2022-08-04_person_actor.model")
|
||||
|
||||
makeEntitiesMigration "365"
|
||||
$(modelFile "migrations/365_2022-08-04_group_actor.model")
|
||||
|
||||
makeEntitiesMigration "367"
|
||||
$(modelFile "migrations/367_2022-08-04_repo_actor.model")
|
||||
|
||||
makeEntitiesMigration "388"
|
||||
$(modelFile "migrations/388_2022-08-04_ticket_loom.model")
|
||||
|
||||
makeEntitiesMigration "396"
|
||||
$(modelFile "migrations/396_2022-08-04_repo_dir.model")
|
||||
|
||||
makeEntitiesMigration "409"
|
||||
$(modelFile "migrations/409_2022-08-05_repo_create.model")
|
||||
|
||||
makeEntitiesMigration "414"
|
||||
$(modelFile "migrations/414_2022-08-05_followremote_actor.model")
|
||||
|
||||
makeEntitiesMigration "418"
|
||||
$(modelFile "migrations/418_2022-08-06_follow_actor.model")
|
||||
|
||||
makeEntitiesMigration "426"
|
||||
$(modelFile "migrations/426_2022-08-21_collab_accept_mig.model")
|
||||
|
||||
makeEntitiesMigration "429"
|
||||
$(modelFile "migrations/429_2022-08-30_collab_repo.model")
|
||||
|
||||
makeEntitiesMigration "430"
|
||||
$(modelFile "migrations/430_2022-08-30_collab_deck.model")
|
||||
|
||||
makeEntitiesMigration "431"
|
||||
$(modelFile "migrations/431_2022-08-30_collab_loom.model")
|
||||
|
||||
makeEntitiesMigration "447"
|
||||
$(modelFile "migrations/447_2022-08-30_collab_accept.model")
|
||||
|
||||
makeEntitiesMigration "466"
|
||||
$(modelFile "migrations/466_2022-09-04_collab_topic_repo.model")
|
||||
|
||||
makeEntitiesMigration "467"
|
||||
$(modelFile "migrations/467_2022-09-04_collab_topic_deck.model")
|
||||
|
||||
makeEntitiesMigration "468"
|
||||
$(modelFile "migrations/468_2022-09-04_collab_topic_loom.model")
|
||||
|
||||
makeEntitiesMigration "486"
|
||||
$(modelFile "migrations/486_2022-09-04_collab_enable.model")
|
||||
|
||||
makeEntitiesMigration "495"
|
||||
$(modelFile "migrations/495_2022-09-21_ticket_title.model")
|
||||
|
||||
makeEntitiesMigration "498"
|
||||
$(modelFile "migrations/498_2022-10-03_forwarder.model")
|
||||
|
||||
makeEntitiesMigration "504"
|
||||
$(modelFile "migrations/504_2022-10-16_message_author.model")
|
||||
|
||||
makeEntitiesMigration "507"
|
||||
$(modelFile "migrations/507_2022-10-16_workflow.model")
|
||||
|
||||
makeEntitiesMigration "515"
|
||||
$(modelFile "migrations/515_2022-10-19_inviter_local.model")
|
||||
|
||||
makeEntitiesMigration "520"
|
||||
$(modelFile "migrations/520_2022-10-19_inviter_remote.model")
|
||||
|
||||
makeEntitiesMigration "525"
|
||||
$(modelFile "migrations/525_2022-10-19_collab_accept_local.model")
|
||||
|
||||
makeEntitiesMigration "527"
|
||||
$(modelFile "migrations/527_2022-10-20_collab_accept_remote.model")
|
71
src/Vervis/Migration/Model2023.hs
Normal file
71
src/Vervis/Migration/Model2023.hs
Normal file
|
@ -0,0 +1,71 @@
|
|||
{- This file is part of Vervis.
|
||||
-
|
||||
- Written in 2018, 2019, 2020, 2022, 2023, 2024
|
||||
- by fr33domlover <fr33domlover@riseup.net>.
|
||||
-
|
||||
- ♡ Copying is an act of love. Please copy, reuse and share.
|
||||
-
|
||||
- The author(s) have dedicated all copyright and related and neighboring
|
||||
- rights to this software to the public domain worldwide. This software is
|
||||
- distributed without any warranty.
|
||||
-
|
||||
- You should have received a copy of the CC0 Public Domain Dedication along
|
||||
- with this software. If not, see
|
||||
- <http://creativecommons.org/publicdomain/zero/1.0/>.
|
||||
-}
|
||||
|
||||
module Vervis.Migration.Model2023
|
||||
{-
|
||||
( EntityField (..)
|
||||
, Unique (..)
|
||||
)
|
||||
-}
|
||||
where
|
||||
|
||||
import Data.ByteString (ByteString)
|
||||
import Data.Text (Text)
|
||||
import Data.Time (UTCTime)
|
||||
import Database.Persist.Class (EntityField, Unique)
|
||||
import Database.Persist.EmailAddress ()
|
||||
import Database.Persist.Schema.Types (Entity)
|
||||
import Database.Persist.Schema.SQL ()
|
||||
import Database.Persist.Schema.TH (makeEntitiesMigration)
|
||||
import Database.Persist.Sql (SqlBackend)
|
||||
import Text.Email.Validate (EmailAddress)
|
||||
import Web.Text (HTML, PandocMarkdown)
|
||||
|
||||
import Crypto.ActorKey
|
||||
import Development.PatchMediaType
|
||||
import Development.PatchMediaType.Persist
|
||||
|
||||
import Vervis.FedURI
|
||||
import Vervis.Migration.TH (schema)
|
||||
import Vervis.Model.Group
|
||||
import Vervis.Model.Ident
|
||||
import Vervis.Model.Role
|
||||
import Vervis.Model.TH
|
||||
import Vervis.Model.Ticket
|
||||
import Vervis.Model.Workflow
|
||||
|
||||
-- For migrations 77, 114
|
||||
|
||||
import Data.Int
|
||||
|
||||
import Database.Persist.JSON
|
||||
import Network.FedURI
|
||||
import Web.ActivityPub
|
||||
|
||||
makeEntitiesMigration "547"
|
||||
$(modelFile "migrations/547_2023-06-28_invite_accept.model")
|
||||
|
||||
makeEntitiesMigration "549"
|
||||
$(modelFile "migrations/549_2023-11-21_group_create.model")
|
||||
|
||||
makeEntitiesMigration "553"
|
||||
$(modelFile "migrations/553_2023-11-21_collab_deleg.model")
|
||||
|
||||
makeEntitiesMigration "554"
|
||||
$(modelFile "migrations/554_2023-11-21_further_local_deleg.model")
|
||||
|
||||
makeEntitiesMigration "565"
|
||||
$(modelFile "migrations/565_2023-12-09_collab_permit.model")
|
59
src/Vervis/Migration/Model2024.hs
Normal file
59
src/Vervis/Migration/Model2024.hs
Normal file
|
@ -0,0 +1,59 @@
|
|||
{- This file is part of Vervis.
|
||||
-
|
||||
- Written in 2018, 2019, 2020, 2022, 2023, 2024
|
||||
- by fr33domlover <fr33domlover@riseup.net>.
|
||||
-
|
||||
- ♡ Copying is an act of love. Please copy, reuse and share.
|
||||
-
|
||||
- The author(s) have dedicated all copyright and related and neighboring
|
||||
- rights to this software to the public domain worldwide. This software is
|
||||
- distributed without any warranty.
|
||||
-
|
||||
- You should have received a copy of the CC0 Public Domain Dedication along
|
||||
- with this software. If not, see
|
||||
- <http://creativecommons.org/publicdomain/zero/1.0/>.
|
||||
-}
|
||||
|
||||
module Vervis.Migration.Model2024
|
||||
{-
|
||||
( EntityField (..)
|
||||
, Unique (..)
|
||||
)
|
||||
-}
|
||||
where
|
||||
|
||||
import Data.ByteString (ByteString)
|
||||
import Data.Text (Text)
|
||||
import Data.Time (UTCTime)
|
||||
import Database.Persist.Class (EntityField, Unique)
|
||||
import Database.Persist.EmailAddress ()
|
||||
import Database.Persist.Schema.Types (Entity)
|
||||
import Database.Persist.Schema.SQL ()
|
||||
import Database.Persist.Schema.TH (makeEntitiesMigration)
|
||||
import Database.Persist.Sql (SqlBackend)
|
||||
import Text.Email.Validate (EmailAddress)
|
||||
import Web.Text (HTML, PandocMarkdown)
|
||||
|
||||
import Crypto.ActorKey
|
||||
import Development.PatchMediaType
|
||||
import Development.PatchMediaType.Persist
|
||||
|
||||
import Vervis.FedURI
|
||||
import Vervis.Migration.TH (schema)
|
||||
import Vervis.Model.Group
|
||||
import Vervis.Model.Ident
|
||||
import Vervis.Model.Role
|
||||
import Vervis.Model.TH
|
||||
import Vervis.Model.Ticket
|
||||
import Vervis.Model.Workflow
|
||||
|
||||
-- For migrations 77, 114
|
||||
|
||||
import Data.Int
|
||||
|
||||
import Database.Persist.JSON
|
||||
import Network.FedURI
|
||||
import Web.ActivityPub
|
||||
|
||||
makeEntitiesMigration "584"
|
||||
$(modelFile "migrations/584_2024-04-14_delete_gather.model")
|
14
th/models
14
th/models
|
@ -1451,7 +1451,7 @@ SourceThemDelegateRemote
|
|||
|
||||
SourceUsGather
|
||||
source SourceUsSendDelegatorId
|
||||
dest DestUsAcceptId
|
||||
dest DestUsStartId
|
||||
grant OutboxItemId
|
||||
|
||||
SourceUsGatherFromLocal
|
||||
|
@ -1466,18 +1466,6 @@ SourceUsGatherFromRemote
|
|||
|
||||
UniqueSourceUsGatherFromRemote gather
|
||||
|
||||
SourceUsGatherToLocal
|
||||
gather SourceUsGatherId
|
||||
to DestThemSendDelegatorLocalId
|
||||
|
||||
UniqueSourceUsGatherToLocal gather
|
||||
|
||||
SourceUsGatherToRemote
|
||||
gather SourceUsGatherId
|
||||
to DestThemSendDelegatorRemoteId
|
||||
|
||||
UniqueSourceUsGatherToRemote gather
|
||||
|
||||
-- Witnesses that, seeing the delegation from them, I've sent a leaf-Grant to a
|
||||
-- direct-collaborator of mine
|
||||
|
||||
|
|
|
@ -218,7 +218,13 @@ library
|
|||
Vervis.KeyFile
|
||||
Vervis.Migration
|
||||
Vervis.Migration.Entities
|
||||
Vervis.Migration.Model
|
||||
Vervis.Migration.Model2016
|
||||
Vervis.Migration.Model2018
|
||||
Vervis.Migration.Model2019
|
||||
Vervis.Migration.Model2020
|
||||
Vervis.Migration.Model2022
|
||||
Vervis.Migration.Model2023
|
||||
Vervis.Migration.Model2024
|
||||
Vervis.Migration.TH
|
||||
Vervis.Model
|
||||
Vervis.Model.Entity
|
||||
|
|
Loading…
Reference in a new issue