mirror of
https://code.sup39.dev/repos/Wqawg
synced 2024-12-27 16:34:52 +09:00
DB: If no workflow exists, add a dummy one
This commit is contained in:
parent
e638ff4117
commit
7ddb79d78d
3 changed files with 14 additions and 0 deletions
5
migrations/507_2022-10-16_workflow.model
Normal file
5
migrations/507_2022-10-16_workflow.model
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
Workflow
|
||||||
|
ident WflIdent
|
||||||
|
name Text Maybe
|
||||||
|
desc Text Maybe
|
||||||
|
scope WorkflowScope
|
|
@ -2798,6 +2798,12 @@ changes hLocal ctx =
|
||||||
, removeField "LocalMessage" "author"
|
, removeField "LocalMessage" "author"
|
||||||
-- 506
|
-- 506
|
||||||
, renameField "LocalMessage" "authorNew" "author"
|
, renameField "LocalMessage" "authorNew" "author"
|
||||||
|
-- 507
|
||||||
|
, unchecked $ lift $ do
|
||||||
|
mw <- selectFirst ([] :: [Filter Workflow507]) []
|
||||||
|
when (isNothing mw) $
|
||||||
|
insert_ $
|
||||||
|
Workflow507 (text2wfl "dummy507") Nothing Nothing WSPublic
|
||||||
]
|
]
|
||||||
|
|
||||||
migrateDB
|
migrateDB
|
||||||
|
|
|
@ -679,3 +679,6 @@ makeEntitiesMigration "498"
|
||||||
|
|
||||||
makeEntitiesMigration "504"
|
makeEntitiesMigration "504"
|
||||||
$(modelFile "migrations/504_2022-10-16_message_author.model")
|
$(modelFile "migrations/504_2022-10-16_message_author.model")
|
||||||
|
|
||||||
|
makeEntitiesMigration "507"
|
||||||
|
$(modelFile "migrations/507_2022-10-16_workflow.model")
|
||||||
|
|
Loading…
Reference in a new issue