beam-migrate-0.5.0.0: SQL DDL support and migrations support library for Beam

Safe HaskellNone
LanguageHaskell2010

Database.Beam.Migrate.Checks

Contents

Description

Defines common DatabasePredicates that are shared among backends

Synopsis

Table checks

data TableExistsPredicate Source #

Asserts that a table with the given name exists in a database

Constructors

TableExistsPredicate QualifiedName

Table name

Instances
Eq TableExistsPredicate Source # 
Instance details

Defined in Database.Beam.Migrate.Checks

Ord TableExistsPredicate Source # 
Instance details

Defined in Database.Beam.Migrate.Checks

Show TableExistsPredicate Source # 
Instance details

Defined in Database.Beam.Migrate.Checks

Generic TableExistsPredicate Source # 
Instance details

Defined in Database.Beam.Migrate.Checks

Associated Types

type Rep TableExistsPredicate :: Type -> Type #

Hashable TableExistsPredicate Source # 
Instance details

Defined in Database.Beam.Migrate.Checks

DatabasePredicate TableExistsPredicate Source # 
Instance details

Defined in Database.Beam.Migrate.Checks

type Rep TableExistsPredicate Source # 
Instance details

Defined in Database.Beam.Migrate.Checks

type Rep TableExistsPredicate = D1 (MetaData "TableExistsPredicate" "Database.Beam.Migrate.Checks" "beam-migrate-0.5.0.0-Amkz3hN0o3M2sLj2AmgBqU" False) (C1 (MetaCons "TableExistsPredicate" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 QualifiedName)))

class HasDataTypeCreatedCheck dataType where Source #

A class that can check whether a particular data type is present in a set of preconditions.

Methods

dataTypeHasBeenCreated :: dataType -> (forall preCondition. Typeable preCondition => [preCondition]) -> Bool Source #

Instances
HasDataTypeCreatedCheck HsDataType Source # 
Instance details

Defined in Database.Beam.Haskell.Syntax

Methods

dataTypeHasBeenCreated :: HsDataType -> (forall preCondition. Typeable preCondition => [preCondition]) -> Bool Source #

data TableColumnHasConstraint be Source #

Asserts that a particular column of a table has a given constraint. The syntax type parameter should be an instance of IsSql92ColumnSchemaSyntax

Instances
Eq (BeamSqlBackendColumnConstraintDefinitionSyntax be) => Eq (TableColumnHasConstraint be) Source # 
Instance details

Defined in Database.Beam.Migrate.Checks

Generic (TableColumnHasConstraint be) Source # 
Instance details

Defined in Database.Beam.Migrate.Checks

Associated Types

type Rep (TableColumnHasConstraint be) :: Type -> Type #

Hashable (BeamSqlBackendColumnConstraintDefinitionSyntax be) => Hashable (TableColumnHasConstraint be) Source # 
Instance details

Defined in Database.Beam.Migrate.Checks

(Typeable be, BeamMigrateOnlySqlBackend be, Hashable (BeamSqlBackendColumnConstraintDefinitionSyntax be)) => DatabasePredicate (TableColumnHasConstraint be) Source # 
Instance details

Defined in Database.Beam.Migrate.Checks

type Rep (TableColumnHasConstraint be) Source # 
Instance details

Defined in Database.Beam.Migrate.Checks

type Rep (TableColumnHasConstraint be) = D1 (MetaData "TableColumnHasConstraint" "Database.Beam.Migrate.Checks" "beam-migrate-0.5.0.0-Amkz3hN0o3M2sLj2AmgBqU" False) (C1 (MetaCons "TableColumnHasConstraint" PrefixI True) (S1 (MetaSel (Just "hasConstraint_table") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 QualifiedName) :*: (S1 (MetaSel (Just "hasConstraint_column") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text) :*: S1 (MetaSel (Just "hasConstraint_defn") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (BeamSqlBackendColumnConstraintDefinitionSyntax be)))))

data TableHasPrimaryKey Source #

Asserts that the given table has a primary key made of the given columns. The order of the columns is significant.

Constructors

TableHasPrimaryKey 

Fields

Instances
Eq TableHasPrimaryKey Source # 
Instance details

Defined in Database.Beam.Migrate.Checks

Show TableHasPrimaryKey Source # 
Instance details

Defined in Database.Beam.Migrate.Checks

Generic TableHasPrimaryKey Source # 
Instance details

Defined in Database.Beam.Migrate.Checks

Associated Types

type Rep TableHasPrimaryKey :: Type -> Type #

Hashable TableHasPrimaryKey Source # 
Instance details

Defined in Database.Beam.Migrate.Checks

DatabasePredicate TableHasPrimaryKey Source # 
Instance details

Defined in Database.Beam.Migrate.Checks

type Rep TableHasPrimaryKey Source # 
Instance details

Defined in Database.Beam.Migrate.Checks

type Rep TableHasPrimaryKey = D1 (MetaData "TableHasPrimaryKey" "Database.Beam.Migrate.Checks" "beam-migrate-0.5.0.0-Amkz3hN0o3M2sLj2AmgBqU" False) (C1 (MetaCons "TableHasPrimaryKey" PrefixI True) (S1 (MetaSel (Just "hasPrimaryKey_table") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 QualifiedName) :*: S1 (MetaSel (Just "hasPrimaryKey_cols") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Text])))

Deserialization