beam-migrate-0.5.2.0: SQL DDL support and migrations support library for Beam
Safe HaskellSafe-Inferred
LanguageHaskell2010

Database.Beam.Migrate.SQL

Description

Manual alternative to the CheckedDatabaseSettings mechanism.

Database schemas are given as sequences of DDL commands expressed in a beam-migrate DSL. The runMigrationSilenced function can be used to recover the CheckedDatabaseSettings that represents the database settings as well as the database predicates corresponding to the sequence of DDL commands.

This is often a more concise way of specifying a database schema when your database names are wildly different from the defaults beam assigns or you multiple constraints that make modifying the auto-generated schema too difficult.

Synopsis

Documentation

type TableSchema be tbl = tbl (TableFieldSchema be) Source #

A table schema, produced by createTable

data TableFieldSchema be a Source #

A schema for a field within a given table

Instances

Instances details
(BeamMigrateSqlBackend be, HasDataTypeCreatedCheck (BeamMigrateSqlBackendDataTypeSyntax be)) => FieldReturnType defaultGiven collationGiven be resTy (TableFieldSchema be resTy) Source # 
Instance details

Defined in Database.Beam.Migrate.SQL.Tables

Methods

field' :: Proxy defaultGiven -> Proxy collationGiven -> Text -> BeamMigrateSqlBackendDataTypeSyntax be -> Maybe (BeamSqlBackendExpressionSyntax be) -> Maybe Text -> [BeamSqlBackendColumnConstraintDefinitionSyntax be] -> TableFieldSchema be resTy Source #

newtype FieldSchema be a Source #

A schema for a field which hasn't been named yet

Instances

Instances details
BeamMigrateOnlySqlBackend be => Eq (FieldSchema be a) Source # 
Instance details

Defined in Database.Beam.Migrate.SQL.Types

Methods

(==) :: FieldSchema be a -> FieldSchema be a -> Bool #

(/=) :: FieldSchema be a -> FieldSchema be a -> Bool #

type BeamMigrateSqlBackend be = (BeamMigrateOnlySqlBackend be, Sql92SaneDdlCommandSyntax (BeamSqlBackendSyntax be), BeamSqlBackend be) Source #

type BeamMigrateSql99Backend be = (BeamMigrateSqlBackend be, IsSql99DataTypeSyntax (BeamSqlBackendDataTypeSyntax be)) Source #