hpqtypes-extras-1.6.1.0: Extra utilities for hpqtypes library

Safe HaskellNone
LanguageHaskell2010

Database.PostgreSQL.PQTypes.Checks

Contents

Synopsis

Checks

checkDatabase :: forall m. (MonadDB m, MonadLog m, MonadThrow m) => ExtrasOptions -> [Domain] -> [Table] -> m () Source #

Run checks on the database structure and whether the database needs to be migrated. Will do a full check of DB structure.

checkDatabaseAllowUnknownTables :: forall m. (MonadDB m, MonadLog m, MonadThrow m) => ExtrasOptions -> [Domain] -> [Table] -> m () Source #

Same as checkDatabase, but will not failed if there are additional tables in database.

createTable :: MonadDB m => Bool -> Table -> m () Source #

Options

data ExtrasOptions Source #

Constructors

ExtrasOptions 

Fields

Migrations

migrateDatabase :: (MonadDB m, MonadLog m, MonadThrow m) => ExtrasOptions -> [Extension] -> [Domain] -> [Table] -> [Migration m] -> m () Source #

Run migrations and check the database structure.