1
0
Fork 0
mirror of https://code.naskya.net/repos/ndqEd synced 2025-03-20 15:14:54 +09:00

DB: Add TicketProjectLocal table, pointing to Ticket but not in use yet

This commit is contained in:
fr33domlover 2020-02-06 04:18:19 +00:00
parent 813869755a
commit 7809512117
5 changed files with 62 additions and 0 deletions
src/Vervis

View file

@ -1325,6 +1325,17 @@ changes hLocal ctx =
"UniqueTicketAuthorLocal"
-- 199
, renameField "TicketAuthorLocal" "ticketNew" "ticket"
-- 200
, addEntities model_2020_02_07
-- 201
, unchecked $ lift $ do
ts <- selectList ([] :: [Filter Ticket201]) []
let makeTPL (Entity tid t) = TicketProjectLocal201
{ ticketProjectLocal201Ticket = tid
, ticketProjectLocal201Project = ticket201Project t
, ticketProjectLocal201Accept = ticket201Accept t
}
insertMany_ $ map makeTPL ts
]
migrateDB

View file

@ -155,6 +155,10 @@ module Vervis.Migration.Model
, TicketAuthorLocal194
, TicketAuthorLocal194Generic (..)
, Discussion194Generic (..)
, model_2020_02_07
, Ticket201
, Ticket201Generic (..)
, TicketProjectLocal201Generic (..)
)
where
@ -304,3 +308,9 @@ makeEntitiesMigration "189" $(modelFile "migrations/2020_02_05_mig.model")
makeEntitiesMigration "194"
$(modelFile "migrations/2020_02_06_tal_point_to_lt.model")
model_2020_02_07 :: [Entity SqlBackend]
model_2020_02_07 = $(schema "2020_02_07_tpl")
makeEntitiesMigration "201"
$(modelFile "migrations/2020_02_07_tpl_mig.model")