Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Documentation
data ColumnAction where Source #
AddColumn :: PgColumnName -> ColumnType -> Maybe (a, Params a) -> ColumnAction | |
RemoveColumn :: PgColumnName -> ColumnType -> ColumnAction | |
RenameColumn :: PgColumnName -> PgColumnName -> ColumnAction | |
RenameColumnType :: PgColumnName -> PgCompName -> ColumnAction |
Instances
Show ColumnAction Source # | |
Defined in Sqel.Data.Migration showsPrec :: Int -> ColumnAction -> ShowS # show :: ColumnAction -> String # showList :: [ColumnAction] -> ShowS # |
data TypeAction (table :: Bool) where Source #
ModifyAction :: PgTypeName table -> [ColumnAction] -> TypeAction table | |
RenameAction :: PgCompName -> [ColumnAction] -> TypeAction 'False | |
AddAction :: PgColumns -> TypeAction 'False |
type TableAction = TypeAction 'True Source #
type CompAction = TypeAction 'False Source #
data MigrationActions ext Source #
AutoActions | |
| |
CustomActions ext |
Instances
Generic (MigrationActions ext) Source # | |
Defined in Sqel.Data.Migration type Rep (MigrationActions ext) :: Type -> Type # from :: MigrationActions ext -> Rep (MigrationActions ext) x # to :: Rep (MigrationActions ext) x -> MigrationActions ext # | |
type Rep (MigrationActions ext) Source # | |
Defined in Sqel.Data.Migration type Rep (MigrationActions ext) = D1 ('MetaData "MigrationActions" "Sqel.Data.Migration" "sqel-0.0.1.0-5k4czMecwS553bFrfF1Jzu" 'False) (C1 ('MetaCons "AutoActions" 'PrefixI 'True) (S1 ('MetaSel ('Just "table") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TableAction) :*: S1 ('MetaSel ('Just "types") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map PgCompName CompAction))) :+: C1 ('MetaCons "CustomActions" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ext))) |
Instances
HoistMigrations m n ('[] :: [Mig]) ('[] :: [Mig]) Source # | |
Defined in Sqel.Data.Migration hoistMigrations :: (forall x. m x -> n x) -> Migrations m '[] -> Migrations n '[] Source # | |
(HoistMigration m n ext ext', HoistMigrations m n migs migs') => HoistMigrations m n ('Mig from to m ext ': migs) ('Mig from to n ext' ': migs') Source # | |
Defined in Sqel.Data.Migration hoistMigrations :: (forall x. m x -> n x) -> Migrations m ('Mig from to m ext ': migs) -> Migrations n ('Mig from to n ext' ': migs') Source # | |
MkMigrations (Migration ('Mig from to m ext)) '['Mig from to m ext] Source # | |
Defined in Sqel.Data.Migration | |
MkMigrations old (mig1 ': migs) => MkMigrations (Migration ('Mig from to m ext) :> old) ('Mig from to m ext ': (mig1 ': migs)) Source # | |
Defined in Sqel.Data.Migration |
data Migration t where Source #
Instances
MkMigrations (Migration ('Mig from to m ext)) '['Mig from to m ext] Source # | |
Defined in Sqel.Data.Migration | |
MkMigrations old (mig1 ': migs) => MkMigrations (Migration ('Mig from to m ext) :> old) ('Mig from to m ext ': (mig1 ': migs)) Source # | |
Defined in Sqel.Data.Migration |
type family UniMigList m ext as where ... Source #
UniMigList _ _ '[] = '[] | |
UniMigList m ext [new, old] = '['Mig old new m ext] | |
UniMigList m ext (new ': (old ': as)) = 'Mig old new m ext ': UniMigList m ext (old ': as) |
newtype Migrations m migs Source #
Migrations | |
|
type UniMigrations m ext old cur = Migrations m (UniMigs m ext old cur) Source #
type AutoMigrations m old cur = UniMigrations m Void old cur Source #
class MkMigrations arg migs | arg -> migs, migs -> arg where Source #
mkMigrations :: arg -> NP Migration migs Source #
Instances
MkMigrations (Migration ('Mig from to m ext)) '['Mig from to m ext] Source # | |
Defined in Sqel.Data.Migration | |
MkMigrations old (mig1 ': migs) => MkMigrations (Migration ('Mig from to m ext) :> old) ('Mig from to m ext ': (mig1 ': migs)) Source # | |
Defined in Sqel.Data.Migration |
migrate :: MkMigrations arg migs => arg -> Migrations m migs Source #
noMigrations :: Migrations m '[] Source #
class CustomMigration m mig where Source #
customTypeKeys :: MigExt mig -> m (Set (PgCompName, Bool)) Source #
customMigration :: PgTableName -> Set PgCompName -> MigExt mig -> m () Source #
Instances
CustomMigration m ('Mig from to m Void) Source # | |
Defined in Sqel.Data.Migration customTypeKeys :: MigExt ('Mig from to m Void) -> m (Set (PgCompName, Bool)) Source # customMigration :: PgTableName -> Set PgCompName -> MigExt ('Mig from to m Void) -> m () Source # | |
(Monad m, MigrationEffect m) => CustomMigration m ('Mig old new m (MigrateTransform m old new)) Source # | |
Defined in Sqel.Migration.Transform customTypeKeys :: MigExt ('Mig old new m (MigrateTransform m old new)) -> m (Set (PgCompName, Bool)) Source # customMigration :: PgTableName -> Set PgCompName -> MigExt ('Mig old new m (MigrateTransform m old new)) -> m () Source # |
class HoistMigration m n ext ext' | m n ext -> ext' where Source #
hoistMigration :: (forall x. m x -> n x) -> ext -> ext' Source #
Instances
HoistMigration (m :: k -> Type) (n :: k -> Type) Void Void Source # | |
Defined in Sqel.Data.Migration hoistMigration :: (forall (x :: k0). m x -> n x) -> Void -> Void Source # |
class HoistMigrations m n migs migs' | m n migs -> migs' where Source #
hoistMigrations :: (forall x. m x -> n x) -> Migrations m migs -> Migrations n migs' Source #
Instances
HoistMigrations m n ('[] :: [Mig]) ('[] :: [Mig]) Source # | |
Defined in Sqel.Data.Migration hoistMigrations :: (forall x. m x -> n x) -> Migrations m '[] -> Migrations n '[] Source # | |
(HoistMigration m n ext ext', HoistMigrations m n migs migs') => HoistMigrations m n ('Mig from to m ext ': migs) ('Mig from to n ext' ': migs') Source # | |
Defined in Sqel.Data.Migration hoistMigrations :: (forall x. m x -> n x) -> Migrations m ('Mig from to m ext ': migs) -> Migrations n ('Mig from to n ext' ': migs') Source # |