-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | PostgreSQL support for the drifter schema migration tool
--   
--   Support for postgresql-simple Query migrations as well as arbitrary
--   Haskell IO functions. Be sure to check the examples dir for a usage
--   example.
@package drifter-postgresql
@version 0.1.0

module Drifter.PostgreSQL
data PGMigration
data ChangeHistory
ChangeHistory :: ChangeId -> ChangeName -> Maybe Description -> UTCTime -> ChangeHistory
[histId] :: ChangeHistory -> ChangeId
[histName] :: ChangeHistory -> ChangeName
[histDescription] :: ChangeHistory -> Maybe Description
[histTime] :: ChangeHistory -> UTCTime

-- | Takes the list of all migrations, removes the ones that have already
--   run and runs them. Use this instead of <a>migrate</a>.
runMigrations :: Connection -> [Change PGMigration] -> IO (Either String ())

-- | Get all changes from schema_migrations table for all the migrations
--   that have previously run.
getChangeHistory :: Connection -> IO [ChangeHistory]

-- | Get just the names of all changes from schema_migrations for
--   migrations that have previously run.
getChangeNameHistory :: Connection -> IO [ChangeName]
instance GHC.Show.Show Drifter.PostgreSQL.ChangeHistory
instance Database.PostgreSQL.Simple.FromField.FromField Drifter.PostgreSQL.ChangeId
instance GHC.Show.Show Drifter.PostgreSQL.ChangeId
instance GHC.Classes.Ord Drifter.PostgreSQL.ChangeId
instance GHC.Classes.Eq Drifter.PostgreSQL.ChangeId
instance Drifter.Graph.Drifter Drifter.PostgreSQL.PGMigration
instance GHC.Classes.Eq Drifter.PostgreSQL.ChangeHistory
instance GHC.Classes.Ord Drifter.PostgreSQL.ChangeHistory
instance Database.PostgreSQL.Simple.FromRow.FromRow Drifter.PostgreSQL.ChangeHistory
