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

Safe HaskellNone
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 fieldSchemaSyntax tbl = tbl (TableFieldSchema fieldSchemaSyntax) Source #

A table schema, produced by createTable

newtype FieldSchema syntax a Source #

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

Constructors

FieldSchema syntax 

Instances

Eq syntax => Eq (FieldSchema syntax a) Source # 

Methods

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

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

Show syntax => Show (FieldSchema syntax a) Source # 

Methods

showsPrec :: Int -> FieldSchema syntax a -> ShowS #

show :: FieldSchema syntax a -> String #

showList :: [FieldSchema syntax a] -> ShowS #

newtype DataType syntax a Source #

A data type in a given IsSql92DataTypeSyntax which describes a SQL type mapping to the Haskell type a

Constructors

DataType syntax 

Instances

(FieldReturnType defaultGiven collationGiven syntax resTy a, TypeError Constraint (Text "Only one type declaration allowed per 'field' invocation")) => FieldReturnType defaultGiven collationGiven syntax resTy (DataType syntax' x -> a) Source # 
Eq syntax => Eq (DataType syntax a) Source # 

Methods

(==) :: DataType syntax a -> DataType syntax a -> Bool #

(/=) :: DataType syntax a -> DataType syntax a -> Bool #

Sql92DisplaySyntax syntax => Show (DataType syntax a) Source # 

Methods

showsPrec :: Int -> DataType syntax a -> ShowS #

show :: DataType syntax a -> String #

showList :: [DataType syntax a] -> ShowS #