1
0
Fork 0
mirror of https://code.sup39.dev/repos/Wqawg synced 2024-12-27 16:04:52 +09:00

In migration code, rename Apply to Run to avoid confusion with Apply activity

This commit is contained in:
fr33domlover 2022-06-22 07:45:35 +00:00
parent 1e759698c1
commit bc7806b100

View file

@ -83,16 +83,16 @@ import Yesod.RenderSource
instance PersistDefault ByteString where
pdef = def
type Apply m = SchemaT SqlBackend m ()
type Mig m = Migration SqlBackend m
type Run m = SchemaT SqlBackend m ()
type Mig m = Migration SqlBackend m
defaultTime :: UTCTime
defaultTime = UTCTime (ModifiedJulianDay 0) 0
withPrepare :: Monad m => Mig m -> Apply m -> Mig m
withPrepare :: Monad m => Mig m -> Run m -> Mig m
withPrepare (validate, apply) prepare = (validate, prepare >> apply)
--withPrePost :: Monad m => Apply m -> Mig m -> Apply m -> Mig m
--withPrePost :: Monad m => Run m -> Mig m -> Run m -> Mig m
--withPrePost pre (validate, apply) post = (validate, pre >> apply >> post)
changes :: (MonadSite m, SiteEnv m ~ App) => Host -> HashidsContext -> [Mig m]