diff --git a/src/Vervis/Migration.hs b/src/Vervis/Migration.hs index d8f720e..aaa7e88 100644 --- a/src/Vervis/Migration.hs +++ b/src/Vervis/Migration.hs @@ -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]