Modulepostgresql-migration-0.2.1.8Haskell2010
Database.PostgreSQL.Simple.Migration.V1Compat
A migration library for postgresql-simple.
For usage, see Readme.markdown.
- 6 types
- 4 values
- Packagepostgresql-migration-0.2.1.8
- Exports10
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceV1Compat.hs
Migration actions
3 declarationsrunMigrations :: BoolRun in verbose mode
-> ConnectionThe postgres connection to use
-> [MigrationCommand]The commands to run
-> IO (MigrationResult String)
Run a sequence of contexts, stopping on the first failure
Migration types
5 declarationsThe MigrationContext provides an execution context for migrations.
Constructors
MigrationContextmigrationContextCommand :: MigrationCommandThe action that will be performed by runMigration
migrationContextVerbose :: BoolVerbosity of the library.
migrationContextConnection :: ConnectionThe PostgreSQL connection to use for migrations.
MigrationCommand determines the action of the runMigration script.
Constructors
MigrationInitializationInitializes the database with a helper table containing meta information.
MigrationDirectory FilePathExecutes migrations based on SQL scripts in the provided FilePath in alphabetical order.
MigrationFile ScriptName FilePathExecutes a migration based on script located at the provided FilePath.
MigrationScript ScriptName ByteStringExecutes a migration based on the provided bytestring.
MigrationValidation MigrationCommandValidates that the provided MigrationCommand has been executed.
MigrationCommands [MigrationCommand]Performs a series of MigrationCommands in sequence.
Instances6Eq, Ord, Read, Show, Semigroup, Monoid
Eq MigrationCommandDefined in postgresql-migration-0.2.1.8 · Database.PostgreSQL.Simple.MigrationOrd MigrationCommandDefined in postgresql-migration-0.2.1.8 · Database.PostgreSQL.Simple.MigrationRead MigrationCommandDefined in postgresql-migration-0.2.1.8 · Database.PostgreSQL.Simple.MigrationShow MigrationCommandDefined in postgresql-migration-0.2.1.8 · Database.PostgreSQL.Simple.MigrationSemigroup MigrationCommandDefined in postgresql-migration-0.2.1.8 · Database.PostgreSQL.Simple.MigrationMonoid MigrationCommandDefined in postgresql-migration-0.2.1.8 · Database.PostgreSQL.Simple.Migration
A sum-type denoting the result of a migration.
Constructors
MigrationError aThere was an error in script migration.
MigrationSuccessAll scripts have been executed successfully.
Instances7Functor, Foldable, Traversable, Eq, Ord, Read, …
Functor MigrationResultDefined in postgresql-migration-0.2.1.8 · Database.PostgreSQL.Simple.MigrationFoldable MigrationResultDefined in postgresql-migration-0.2.1.8 · Database.PostgreSQL.Simple.MigrationTraversable MigrationResultDefined in postgresql-migration-0.2.1.8 · Database.PostgreSQL.Simple.MigrationEq a => Eq (MigrationResult a)Defined in postgresql-migration-0.2.1.8 · Database.PostgreSQL.Simple.MigrationOrd a => Ord (MigrationResult a)Defined in postgresql-migration-0.2.1.8 · Database.PostgreSQL.Simple.MigrationRead a => Read (MigrationResult a)Defined in postgresql-migration-0.2.1.8 · Database.PostgreSQL.Simple.MigrationShow a => Show (MigrationResult a)Defined in postgresql-migration-0.2.1.8 · Database.PostgreSQL.Simple.Migration
The name of a script. Typically the filename or a custom name when using Haskell migrations.
The checksum type of a migration script.
Migration result actions
1 declarationProduces a list of all executed SchemaMigrations in the default schema_migrations table
Migration result types
1 declarationA product type representing a single, executed SchemaMigration.
Constructors
SchemaMigrationschemaMigrationName :: ByteStringThe name of the executed migration.
schemaMigrationChecksum :: ChecksumThe calculated MD5 checksum of the executed script.
schemaMigrationExecutedAt :: LocalTimeA timestamp without timezone of the date of execution of the script.
Instances6Eq, Ord, Read, Show, FromRow, ToRow
Eq SchemaMigrationDefined in postgresql-migration-0.2.1.8 · Database.PostgreSQL.Simple.MigrationOrd SchemaMigrationDefined in postgresql-migration-0.2.1.8 · Database.PostgreSQL.Simple.MigrationRead SchemaMigrationDefined in postgresql-migration-0.2.1.8 · Database.PostgreSQL.Simple.MigrationShow SchemaMigrationDefined in postgresql-migration-0.2.1.8 · Database.PostgreSQL.Simple.MigrationFromRow SchemaMigrationDefined in postgresql-migration-0.2.1.8 · Database.PostgreSQL.Simple.MigrationToRow SchemaMigrationDefined in postgresql-migration-0.2.1.8 · Database.PostgreSQL.Simple.Migration