Safe Haskell | None |
---|---|
Language | Haskell2010 |
Drifter
Contents
- resolveDependencyOrder :: [Change a] -> [Change a]
- changeSequence :: [Change a] -> [Change a]
- migrate :: Drifter a => DBConnection a -> [Change a] -> IO (Either String ())
- class Drifter a where
- 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] #
Take an unordered list of changes and put them in dependency
order. migrate
will do this automatically.
changeSequence :: [Change a] -> [Change a] #
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 ()) #
Runs a list of changes. They will automatically be sorted and run in dependency order. Will terminate early on error.
Types
Minimal complete definition
Methods
migrateSingle :: DBConnection a -> Change a -> IO (Either String ()) #
How to run a single, isolated migration.
Constructors
Change | |
Fields |
type Description = Text #
data family DBConnection a #