Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- checkDatabase :: forall m. (MonadDB m, MonadLog m, MonadThrow m) => ExtrasOptions -> [Domain] -> [Table] -> m ()
- checkDatabaseAllowUnknownTables :: forall m. (MonadDB m, MonadLog m, MonadThrow m) => ExtrasOptions -> [Domain] -> [Table] -> m ()
- createTable :: MonadDB m => Bool -> Table -> m ()
- createDomain :: MonadDB m => Domain -> m ()
- data ExtrasOptions = ExtrasOptions {}
- migrateDatabase :: (MonadDB m, MonadLog m, MonadThrow m) => ExtrasOptions -> [Extension] -> [Domain] -> [Table] -> [Migration m] -> m ()
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.
createDomain :: MonadDB m => Domain -> m () Source #
Options
data ExtrasOptions Source #
ExtrasOptions | |
|
Instances
Eq ExtrasOptions Source # | |
Defined in Database.PostgreSQL.PQTypes.ExtrasOptions (==) :: ExtrasOptions -> ExtrasOptions -> Bool # (/=) :: ExtrasOptions -> ExtrasOptions -> Bool # | |
Default ExtrasOptions Source # | |
Defined in Database.PostgreSQL.PQTypes.ExtrasOptions def :: ExtrasOptions # |
Migrations
migrateDatabase :: (MonadDB m, MonadLog m, MonadThrow m) => ExtrasOptions -> [Extension] -> [Domain] -> [Table] -> [Migration m] -> m () Source #
Run migrations and check the database structure.