Safe Haskell | None |
---|---|
Language | Haskell2010 |
- resolveDependencyOrder :: [Change a] -> [Change a]
- changeSequence :: [Change a] -> [Change a]
- migrate :: Drifter a => DBConnection a -> [Change a] -> IO (Either String ())
- class Drifter a where
- migrateSingle :: DBConnection a -> Change a -> IO (Either String ())
- newtype ChangeName = ChangeName {}
- data Change a = Change {}
- type Description = Text
- data family Method a
- data family DBConnection a
Managing Migrations
resolveDependencyOrder :: [Change a] -> [Change a] Source
Take an unordered list of changes and put them in dependency
order. migrate
will do this automatically.
changeSequence :: [Change a] -> [Change a] Source
This is a helper for the common case of where you just want dependencies to run in list order. This will take the input list and set their dependencies to run in the given sequence.
migrate :: Drifter a => DBConnection a -> [Change a] -> IO (Either String ()) Source
Runs a list of changes. They will automatically be sorted and run in dependency order. Will terminate early on error.
Types
migrateSingle :: DBConnection a -> Change a -> IO (Either String ()) Source
How to run a single, isolated migration.
newtype ChangeName Source
type Description = Text Source
data family DBConnection a Source