packages feed

beam-migrate 0.3.2.1 → 0.3.2.2

raw patch · 3 files changed

+9/−7 lines, 3 filesdep ~containersPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: containers

API changes (from Hackage documentation)

+ Database.Beam.Migrate.Types: -- <a>DatabasePredicate</a>s.
+ Database.Beam.Migrate.Types: -- <a>IsDatabaseEntity</a>, along with some mechanism for generating
+ Database.Beam.Migrate.Types: -- the corresponding <a>DatabaseEntityDescriptor</a> from
+ Database.Beam.Migrate.Types: -- | Like <a>DatabaseEntityDefaultRequirements</a> but for checked entities
- Database.Beam.Haskell.Syntax: HsBackendConstraint :: Type () -> Asst () -> HsBackendConstraint
+ Database.Beam.Haskell.Syntax: HsBackendConstraint :: (Type () -> Asst ()) -> HsBackendConstraint
- Database.Beam.Haskell.Syntax: HsColumnSchema :: Text -> HsExpr -> HsType -> HsColumnSchema
+ Database.Beam.Haskell.Syntax: HsColumnSchema :: (Text -> HsExpr) -> HsType -> HsColumnSchema
- Database.Beam.Haskell.Syntax: HsDbField :: Type () -> Type () -> HsDbField
+ Database.Beam.Haskell.Syntax: HsDbField :: (Type () -> Type ()) -> HsDbField
- Database.Beam.Haskell.Syntax: HsFieldLookup :: Text -> Maybe (Text, Type ()) -> HsFieldLookup
+ Database.Beam.Haskell.Syntax: HsFieldLookup :: (Text -> Maybe (Text, Type ())) -> HsFieldLookup
- Database.Beam.Haskell.Syntax: HsImportSome :: (Set (ImportSpec ())) -> HsImport
+ Database.Beam.Haskell.Syntax: HsImportSome :: Set (ImportSpec ()) -> HsImport
- Database.Beam.Haskell.Syntax: HsImports :: (Map (ModuleName ()) HsImport) -> HsImports
+ Database.Beam.Haskell.Syntax: HsImports :: Map (ModuleName ()) HsImport -> HsImports
- Database.Beam.Migrate.Actions: DatabaseState :: !(HashMap SomeDatabasePredicate DatabaseStateSource) -> !(HashSet SomeDatabasePredicate) -> !(Seq (MigrationCommand cmd)) -> DatabaseState cmd
+ Database.Beam.Migrate.Actions: DatabaseState :: !HashMap SomeDatabasePredicate DatabaseStateSource -> !HashSet SomeDatabasePredicate -> !Seq (MigrationCommand cmd) -> DatabaseState cmd
- Database.Beam.Migrate.Actions: PotentialAction :: !(HashSet SomeDatabasePredicate) -> !(HashSet SomeDatabasePredicate) -> !(Seq (MigrationCommand cmd)) -> !Text -> {-# UNPACK #-} !Int -> PotentialAction cmd
+ Database.Beam.Migrate.Actions: PotentialAction :: !HashSet SomeDatabasePredicate -> !HashSet SomeDatabasePredicate -> !Seq (MigrationCommand cmd) -> !Text -> {-# UNPACK #-} !Int -> PotentialAction cmd
- Database.Beam.Migrate.Actions: [ChooseActions] :: {choosingActionsAtState :: !(DatabaseState cmd) The current node we're searching at, getPotentialActionChoice :: f -> PotentialAction cmd Convert the opaque @f@ type to a 'PotentialAction'. This can be used to present the actions to the user or to inspect the action to make a more informed choice on exploration strategies., potentialActionChoices :: [f] The possible actions that we can take, presented as an opaque list. Use the 'getPotentialActionChoice' function to get the corresponding 'PotentialAction'., continueSearch :: [f] -> Solver cmd Continue the search and get the next 'Solver'} -> Solver cmd
+ Database.Beam.Migrate.Actions: [ChooseActions] :: {choosingActionsAtState :: !DatabaseState cmd " The current node we're searching at", getPotentialActionChoice :: f -> PotentialAction cmd " Convert the opaque @f@ type to a 'PotentialAction'. This can be used to present the actions to the user or to inspect the action to make a more informed choice on exploration strategies.", potentialActionChoices :: [f] " The possible actions that we can take, presented as an opaque list. Use the 'getPotentialActionChoice' function to get the corresponding 'PotentialAction'.", continueSearch :: [f] -> Solver cmd " Continue the search and get the next 'Solver'"} -> Solver cmd
- Database.Beam.Migrate.Actions: [actionCommands] :: PotentialAction cmd -> !(Seq (MigrationCommand cmd))
+ Database.Beam.Migrate.Actions: [actionCommands] :: PotentialAction cmd -> !Seq (MigrationCommand cmd)
- Database.Beam.Migrate.Actions: [actionPostConditions] :: PotentialAction cmd -> !(HashSet SomeDatabasePredicate)
+ Database.Beam.Migrate.Actions: [actionPostConditions] :: PotentialAction cmd -> !HashSet SomeDatabasePredicate
- Database.Beam.Migrate.Actions: [actionPreConditions] :: PotentialAction cmd -> !(HashSet SomeDatabasePredicate)
+ Database.Beam.Migrate.Actions: [actionPreConditions] :: PotentialAction cmd -> !HashSet SomeDatabasePredicate
- Database.Beam.Migrate.Actions: [dbStateCmdSequence] :: DatabaseState cmd -> !(Seq (MigrationCommand cmd))
+ Database.Beam.Migrate.Actions: [dbStateCmdSequence] :: DatabaseState cmd -> !Seq (MigrationCommand cmd)
- Database.Beam.Migrate.Actions: [dbStateCurrentState] :: DatabaseState cmd -> !(HashMap SomeDatabasePredicate DatabaseStateSource)
+ Database.Beam.Migrate.Actions: [dbStateCurrentState] :: DatabaseState cmd -> !HashMap SomeDatabasePredicate DatabaseStateSource
- Database.Beam.Migrate.Actions: [dbStateKey] :: DatabaseState cmd -> !(HashSet SomeDatabasePredicate)
+ Database.Beam.Migrate.Actions: [dbStateKey] :: DatabaseState cmd -> !HashSet SomeDatabasePredicate
- Database.Beam.Migrate.Checks: [TableHasColumn] :: Typeable (Sql92ColumnSchemaColumnTypeSyntax syntax) => {hasColumn_table :: Text Table name , hasColumn_column :: Text Column name , hasColumn_type :: Sql92ColumnSchemaColumnTypeSyntax syntax Data type } -> TableHasColumn syntax
+ Database.Beam.Migrate.Checks: [TableHasColumn] :: Typeable (Sql92ColumnSchemaColumnTypeSyntax syntax) => {hasColumn_table :: Text " Table name ", hasColumn_column :: Text " Column name ", hasColumn_type :: Sql92ColumnSchemaColumnTypeSyntax syntax " Data type "} -> TableHasColumn syntax
- Database.Beam.Migrate.SQL: TableFieldSchema :: Text -> (FieldSchema fieldSchemaSyntax a) -> [FieldCheck] -> TableFieldSchema fieldSchemaSyntax a
+ Database.Beam.Migrate.SQL: TableFieldSchema :: Text -> FieldSchema fieldSchemaSyntax a -> [FieldCheck] -> TableFieldSchema fieldSchemaSyntax a
- Database.Beam.Migrate.SQL.Tables: Constraint :: (Sql92ColumnConstraintDefinitionConstraintSyntax (Sql92ColumnSchemaColumnConstraintDefinitionSyntax syntax)) -> Constraint syntax
+ Database.Beam.Migrate.SQL.Tables: Constraint :: Sql92ColumnConstraintDefinitionConstraintSyntax (Sql92ColumnSchemaColumnConstraintDefinitionSyntax syntax) -> Constraint syntax
- Database.Beam.Migrate.SQL.Tables: TableMigration :: (WriterT [Sql92DdlCommandAlterTableSyntax syntax] (State (Text, [TableCheck])) a) -> TableMigration syntax a
+ Database.Beam.Migrate.SQL.Tables: TableMigration :: WriterT [Sql92DdlCommandAlterTableSyntax syntax] (State (Text, [TableCheck])) a -> TableMigration syntax a
- Database.Beam.Migrate.SQL.Tables: field :: (IsSql92ColumnSchemaSyntax syntax) => FieldReturnType 'False 'False syntax resTy a => Text -> DataType (Sql92ColumnSchemaColumnTypeSyntax syntax) resTy -> a
+ Database.Beam.Migrate.SQL.Tables: field :: IsSql92ColumnSchemaSyntax syntax => FieldReturnType 'False 'False syntax resTy a => Text -> DataType (Sql92ColumnSchemaColumnTypeSyntax syntax) resTy -> a
- Database.Beam.Migrate.Simple: BringUpToDateHooks :: m Bool -> Int -> Text -> m () -> Int -> Text -> m () -> Int -> String -> m () -> m () -> Int -> m () -> Int -> Text -> Text -> m () -> Int -> m () -> BringUpToDateHooks m
+ Database.Beam.Migrate.Simple: BringUpToDateHooks :: m Bool -> (Int -> Text -> m ()) -> (Int -> Text -> m ()) -> (Int -> String -> m ()) -> m () -> (Int -> m ()) -> (Int -> Text -> Text -> m ()) -> (Int -> m ()) -> BringUpToDateHooks m
- Database.Beam.Migrate.Types: MigrationSteps :: (Kleisli (F (MigrationStep syntax)) from to) -> MigrationSteps syntax from to
+ Database.Beam.Migrate.Types: MigrationSteps :: Kleisli (F (MigrationStep syntax)) from to -> MigrationSteps syntax from to
- Database.Beam.Migrate.Types: [MigrationRunCommand] :: {_migrationUpCommand :: syntax What to execute when applying the migration , _migrationDownCommand :: Maybe syntax What to execute when unapplying the migration , _migrationNext :: next} -> MigrationF syntax next
+ Database.Beam.Migrate.Types: [MigrationRunCommand] :: {_migrationUpCommand :: syntax " What to execute when applying the migration ", _migrationDownCommand :: Maybe syntax " What to execute when unapplying the migration ", _migrationNext :: next} -> MigrationF syntax next

Files

Database/Beam/Migrate/Generics/Types.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE UndecidableInstances #-}+ module Database.Beam.Migrate.Generics.Types where  import           Database.Beam.Migrate.Types
Database/Beam/Migrate/SQL/Tables.hs view
@@ -76,11 +76,12 @@                Text -> TableSchema (Sql92CreateTableColumnSchemaSyntax (Sql92DdlCommandCreateTableSyntax syntax)) table             -> Migration syntax (CheckedDatabaseEntity be db (TableEntity table)) createTable newTblName tblSettings =-  do let createTableCommand =+  do let pkFields = allBeamValues (\(Columnar' (TableFieldSchema name _ _)) -> name) (primaryKey tblSettings)+         tblConstraints = if null pkFields then [] else [ primaryKeyConstraintSyntax pkFields ]+         createTableCommand =            createTableSyntax Nothing newTblName                              (allBeamValues (\(Columnar' (TableFieldSchema name (FieldSchema schema) _)) -> (name, schema)) tblSettings)-                             [ primaryKeyConstraintSyntax (allBeamValues (\(Columnar' (TableFieldSchema name _ _)) -> name) (primaryKey tblSettings)) ]-+                             tblConstraints          command = createTableCmd createTableCommand           tbl' = changeBeamRep (\(Columnar' (TableFieldSchema name _ _)) -> Columnar' (TableField name)) tblSettings
beam-migrate.cabal view
@@ -1,5 +1,5 @@ name:                beam-migrate-version:             0.3.2.1+version:             0.3.2.2 synopsis:            SQL DDL support and migrations support library for Beam description:         This package provides type classes to allow backends to implement                      SQL DDL support for beam. This allows you to use beam syntax to@@ -64,18 +64,17 @@                        text                 >=1.2     && <1.3,                        aeson                >=0.11    && <1.5,                        bytestring           >=0.10    && <0.11,-                       free                 >=4.12    && <5.1,+                       free                 >=4.12    && <5.2,                        time                 >=1.6     && <1.10,                        mtl                  >=2.2     && <2.3,                        scientific           >=0.3     && <0.4,                        vector               >=0.11    && <0.13,-                       containers           >=0.5     && <0.6,                        unordered-containers >=0.2     && <0.3,                        hashable             >=1.2     && <1.3,                        parallel             >=3.2     && <3.3,                        deepseq              >=1.4     && <1.5,                        ghc-prim             >=0.5     && <0.6,-                       containers           >=0.5     && <0.6,+                       containers           >=0.5     && <0.7,                        haskell-src-exts     >=1.18    && <1.21,                        pretty               >=1.1     && <1.2,                        dependent-map        >=0.2     && <0.3,