drifter-0.2.2: Simple schema management for arbitrary databases.

Safe HaskellNone
LanguageHaskell2010

Drifter

Contents

Synopsis

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

class Drifter a where Source

Methods

migrateSingle :: DBConnection a -> Change a -> IO (Either String ()) Source

How to run a single, isolated migration.

data family Method a Source

data family DBConnection a Source