module Database.Beam.Migrate.SQL.Types
( TableSchema, TableFieldSchema(..)
, FieldSchema(..), DataType(..)
) where
import Database.Beam.Migrate.Types.Predicates
import Database.Beam.Migrate.SQL.SQL92
import Data.Text (Text)
type TableSchema fieldSchemaSyntax tbl =
tbl (TableFieldSchema fieldSchemaSyntax)
data TableFieldSchema fieldSchemaSyntax a
= TableFieldSchema Text (FieldSchema fieldSchemaSyntax a) [FieldCheck]
newtype FieldSchema syntax a = FieldSchema syntax
deriving (Show, Eq)
newtype DataType syntax a = DataType syntax
instance Sql92DisplaySyntax syntax => Show (DataType syntax a) where
show (DataType syntax) = "DataType (" ++ displaySyntax syntax ++ ")"
instance Eq syntax => Eq (DataType syntax a) where
DataType a == DataType b = a == b