-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Simple schema management for arbitrary databases.
--
-- Simple support for migrating database schemas, which allows haskell
-- functions to be run as a part of the migration. Note that this library
-- isn't meant to be used directly, but rather as a base library for a
-- specific driver. For an example of a functioning driver, you should
-- check out drifter-postgresql.
@package drifter
@version 0.2.4
module Drifter
-- | Take an unordered list of changes and put them in dependency order.
-- migrate will do this automatically.
resolveDependencyOrder :: [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.
changeSequence :: [Change a] -> [Change a]
-- | Runs a list of changes. They will automatically be sorted and run in
-- dependency order. Will terminate early on error.
migrate :: Drifter a => DBConnection a -> [Change a] -> IO (Either String ())
class Drifter a
-- | How to run a single, isolated migration.
migrateSingle :: Drifter a => DBConnection a -> Change a -> IO (Either String ())
newtype ChangeName
ChangeName :: Text -> ChangeName
[changeNameText] :: ChangeName -> Text
data Change a
Change :: ChangeName -> Maybe Description -> [ChangeName] -> Method a -> Change a
[changeName] :: Change a -> ChangeName
[changeDescription] :: Change a -> Maybe Description
[changeDependencies] :: Change a -> [ChangeName]
[changeMethod] :: Change a -> Method a
type Description = Text
data family Method a
data family DBConnection a