From 665845a7e5050a57e6dee05a3055e2a973e1e108 Mon Sep 17 00:00:00 2001 From: Thibaut Horel Date: Tue, 13 Jun 2017 21:45:15 -0400 Subject: Migrations --- migrations/20170613212553_op-constraint.sql | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 migrations/20170613212553_op-constraint.sql (limited to 'migrations/20170613212553_op-constraint.sql') diff --git a/migrations/20170613212553_op-constraint.sql b/migrations/20170613212553_op-constraint.sql new file mode 100644 index 0000000..1ef1ec1 --- /dev/null +++ b/migrations/20170613212553_op-constraint.sql @@ -0,0 +1,8 @@ + +-- +goose Up +-- SQL in section 'Up' is executed when this migration is applied +ALTER TABLE users ADD CONSTRAINT op UNIQUE (type, op_id); + +-- +goose Down +-- SQL section 'Down' is executed when this migration is rolled back +ALTER TABLE users DROP CONSTRAINT op; -- cgit v1.2.3-70-g09d2