packages feed

beam-migrate 0.5.0.0 → 0.5.1.0

raw patch · 5 files changed

+21/−10 lines, 5 filesdep ~aesonnew-uploaderPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: aeson

API changes (from Hackage documentation)

- Database.Beam.Migrate.Log: instance GHC.Show.Show (Database.Beam.Migrate.Log.BeamMigrateVersionT Data.Functor.Identity.Identity)
- Database.Beam.Migrate.Log: instance GHC.Show.Show (Database.Beam.Migrate.Log.LogEntryT Data.Functor.Identity.Identity)
- Database.Beam.Migrate.Log: instance GHC.Show.Show (Database.Beam.Schema.Tables.PrimaryKey Database.Beam.Migrate.Log.BeamMigrateVersionT Data.Functor.Identity.Identity)
- Database.Beam.Migrate.Log: instance GHC.Show.Show (Database.Beam.Schema.Tables.PrimaryKey Database.Beam.Migrate.Log.LogEntryT Data.Functor.Identity.Identity)
+ Database.Beam.Migrate.Log: instance GHC.Show.Show Database.Beam.Migrate.Log.BeamMigrateVersion
+ Database.Beam.Migrate.Log: instance GHC.Show.Show Database.Beam.Migrate.Log.BeamMigrateVersionKey
+ Database.Beam.Migrate.Log: instance GHC.Show.Show Database.Beam.Migrate.Log.LogEntry
+ Database.Beam.Migrate.Log: instance GHC.Show.Show Database.Beam.Migrate.Log.LogEntryKey
+ Database.Beam.Migrate.SQL.Tables: type family IsNotNull (x :: *) :: Constraint
- Database.Beam.Migrate.SQL.BeamExtensions: genericSerial :: (BeamSqlBackendHasSerial be, FieldReturnType 'True 'False be (SqlSerial Int) a) => Text -> a
+ Database.Beam.Migrate.SQL.BeamExtensions: genericSerial :: (BeamSqlBackendHasSerial be, FieldReturnType 'True 'False be (SqlSerial Int) a) => Text -> a
- Database.Beam.Migrate.SQL.Tables: field :: (BeamMigrateSqlBackend be, FieldReturnType 'False 'False be resTy a) => Text -> DataType be resTy -> a
+ Database.Beam.Migrate.SQL.Tables: field :: (BeamMigrateSqlBackend be, FieldReturnType 'False 'False be resTy a) => Text -> DataType be resTy -> a

Files

ChangeLog.md view
@@ -1,3 +1,13 @@+# 0.5.1.0++## Added features++ * Expose `IsNotNull` class++## Bug fixes++ * Order log entries when verifying migration status+ # 0.5.0.0  ## Interface changes
Database/Beam/Migrate.hs view
@@ -11,20 +11,20 @@ -- == Checked databases -- -- A checked database is similar to the 'DatabaseSettings' type from--- @beam-core@. Whereas a 'DatabaseSettings' object consists of a set of+-- @beam-core@ except it comes with a set of /predicates/.+-- Whereas a 'DatabaseSettings' object consists of a set of -- database entities, a checked database (represented by the -- 'CheckedDatabaseSettings' type) consists of a set of database entities along -- with a set of /predicates/ (represented by types implementing--- 'DatabasePredicate').except it comes with a set of /predicates/.The--- /predicates/ are facts about a given database schema. For example, a checked--- database with a table named "Customers", would have a 'TableExistsPredicate'--- in its predicate set.+-- 'DatabasePredicate'). The /predicates/ are facts about a given+-- database schema. For example, a checked database with a table named+-- "Customers", would have a 'TableExistsPredicate' in its predicate set. -- -- Predicates can be used to verify that a given beam schema is compatible with -- a backend database or to generate migrations from a schema satisfying one set -- of predicates to a schema satisfying another. Beam migrate provides a solver -- for figuring out the exact sequence of steps needed to accomplish this. Beam--- backends can provide additioqnal predicates and solvers to implement+-- backends can provide additional predicates and solvers to implement -- backend-specific migrations. For example, the @beam-postgres@ backend -- provides predicates to assert that extensions have been loaded, and solvers -- for emitting proper @CREATE EXTENSION@ statements where appropriate.@@ -36,7 +36,7 @@ -- SQL DDL syntax. The @beam-migrate@ module provides a DDL syntax for Haskell -- in "Database.Beam.Haskell.Syntax". This allows @beam-migrate@ to translate -- predicate sets into the corresponding Haskell schema and the corresponding--- Haskell migration script. This reflection allows tool based off of+-- Haskell migration script. This reflection allows tools based off of -- @beam-migrate@ to support schema generation from an existing database. -- -- For more information on checked databases, see the
Database/Beam/Migrate/SQL/Tables.hs view
@@ -29,6 +29,7 @@     -- ** Internal classes     --    Provided without documentation for use in type signatures   , FieldReturnType(..)+  , IsNotNull(..)   ) where  import Database.Beam
Database/Beam/Migrate/Simple.hs view
@@ -129,7 +129,7 @@ bringUpToDateWithHooks hooks be@(BeamMigrationBackend { backendRenderSyntax = renderSyntax' }) steps = do   ensureBackendTables be -  entries <- runSelectReturningList $ select $+  entries <- runSelectReturningList $ select $ orderBy_ (asc_ . _logEntryId) $              all_ (_beamMigrateLogEntries (beamMigrateDb @be @m))   let verifyMigration :: Int -> T.Text -> Migration be a -> StateT [LogEntry] (WriterT (Max Int) m) a       verifyMigration stepIx stepNm step =
beam-migrate.cabal view
@@ -1,5 +1,5 @@ name:                beam-migrate-version:             0.5.0.0+version:             0.5.1.0 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@@ -62,7 +62,7 @@   build-depends:       base                 >=4.9     && <5.0,                        beam-core            >=0.9     && <0.10,                        text                 >=1.2     && <1.3,-                       aeson                >=0.11    && <1.5,+                       aeson                >=0.11    && <1.6,                        bytestring           >=0.10    && <0.11,                        free                 >=4.12    && <5.2,                        time                 >=1.6     && <1.10,