Sha256: 498008d440021a3177aedd84b70968335d71866330f09558d67de0a7c28dc3e5

Contents?: true

Size: 1.05 KB

Versions: 11

Compression:

Stored size: 1.05 KB

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 pgmigrate.pg_migrations IN ACCESS EXCLUSIVE MODE;

SELECT pgmigrate.verify_manifest_is_not_old(<%= manifest_version %>);

SELECT pgmigrate.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 pgmigrate.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 pgmigrate.record_migration('<%= migration_def.name %>', <%= migration_def.ordinal %>, '0.1.0', '<%= builder_version %>');

COMMIT;
-- end pg_migrate migration, migration=<%= migration_def.name %>

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
pg_migrate-0.1.14 lib/pg_migrate/templates/up.erb
pg_migrate-0.1.13 lib/pg_migrate/templates/up.erb
pg_migrate-0.1.12 lib/pg_migrate/templates/up.erb
pg_migrate-0.1.7 lib/pg_migrate/templates/up.erb
pg_migrate-0.1.6 lib/pg_migrate/templates/up.erb
pg_migrate-0.1.5 lib/pg_migrate/templates/up.erb
pg_migrate-0.1.4 lib/pg_migrate/templates/up.erb
pg_migrate-0.1.3 lib/pg_migrate/templates/up.erb
pg_migrate-0.1.2 lib/pg_migrate/templates/up.erb
pg_migrate-0.1.1 lib/pg_migrate/templates/up.erb
pg_migrate-0.1.0 lib/pg_migrate/templates/up.erb