Permalink
Browse files

fix #78: already wrapped by github.com/rubenv/sql-migrate

  • Loading branch information...
kamilsk committed Dec 20, 2018
1 parent 132b5ac commit b39f912eee413bef1adfeaf23f0692f69d1a2cbd
@@ -1,7 +1,5 @@
-- +migrate Up

BEGIN;

CREATE EXTENSION IF NOT EXISTS "uuid-ossp";

-- +migrate StatementBegin
@@ -32,16 +30,10 @@ LANGUAGE plpgsql;

CREATE TYPE ACTION AS ENUM ('create', 'update', 'delete', 'restore');

COMMIT;

-- +migrate Down

BEGIN;

DROP FUNCTION ignore_update();

DROP FUNCTION update_timestamp();

DROP TYPE ACTION;

COMMIT;
@@ -1,7 +1,5 @@
-- +migrate Up

BEGIN;

CREATE TABLE "account" (
"id" UUID NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
"name" VARCHAR(128) NOT NULL,
@@ -39,12 +37,8 @@ CREATE TRIGGER "user_updated"
ON "user"
FOR EACH ROW EXECUTE PROCEDURE update_timestamp();

COMMIT;

-- +migrate Down

BEGIN;

DROP TRIGGER "user_updated" ON "user";

DROP TRIGGER "account_updated" ON "account";
@@ -54,5 +48,3 @@ DROP TABLE "token";
DROP TABLE "user";

DROP TABLE "account";

COMMIT;
@@ -1,7 +1,5 @@
-- +migrate Up

BEGIN;

CREATE TABLE "license" (
"id" UUID NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),
"account_id" UUID NOT NULL,
@@ -31,18 +29,12 @@ CREATE TRIGGER "immutable_license_audit"
ON "license_audit"
FOR EACH ROW EXECUTE PROCEDURE ignore_update();

COMMIT;

-- +migrate Down

BEGIN;

DROP TRIGGER "immutable_license_audit" ON "license_audit";

DROP TRIGGER "license_updated" ON "license";

DROP TABLE "license_audit";

DROP TABLE "license";

COMMIT;
@@ -2,8 +2,6 @@

-- +migrate Up

BEGIN;

CREATE TABLE "license_employee" (
"license" UUID NOT NULL,
"employee" UUID NOT NULL,
@@ -21,16 +19,10 @@ CREATE TABLE "license_workplace" (
-- UNIQUE ("license", "workplace")
);

COMMIT;

-- +migrate Down

BEGIN;

DROP TABLE "license_workplace";

DROP TABLE "license_employee";

COMMIT;

-- issue#draft }

0 comments on commit b39f912

Please sign in to comment.