Sha256: 0c9de7b9abd11b7e1b4e16ce3694e149651e1d200cbdfd39cb537f207b6e8da5
Contents?: true
Size: 961 Bytes
Versions: 1
Compression:
Stored size: 961 Bytes
Contents
-- beginning pg_migrate header, migration=<%= migration_def.name %> \set ON_ERROR_STOP 1 BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE; -- we want to ensure no one else is running this migration concurrently LOCK TABLE pg_migrations IN ACCESS EXCLUSIVE MODE; SELECT verify_against_existing_migrations('<%= migration_def.name %>', <%= migration_def.ordinal %>); -- to allow exception in CHECK_IF_MIGRATED to cause rollback, not failure \set ON_ERROR_STOP 0 SELECT bypass_existing_migration('<%= migration_def.name %>'); -- if the content of the migration is bad, we want psql to stop. \set ON_ERROR_STOP 1 -- beginning user sql, migration=<%= migration_def.name %> <%= migration_content %> -- beginning pg_migrate footer, migration=<%= migration_def.name %> SELECT record_migration('<%= migration_def.name %>', <%= migration_def.ordinal %>, '0.0.1', '<%= builder_version %>'); COMMIT; -- end pg_migrate migration, migration=<%= migration_def.name %>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pg_migrate-0.0.1 | lib/pg_migrate/templates/up.erb |