From 9868624bd7dda2a0700bb25bc5442e6659901f36 Mon Sep 17 00:00:00 2001 From: Martin Klepsch Date: Thu, 19 Apr 2018 15:53:34 +0200 Subject: [PATCH] migration: add unique constraint on transaction_hash column --- .../migrations/20180419153800-enforce-unique-tx-hash.down.sql | 1 + .../migrations/20180419153800-enforce-unique-tx-hash.up.sql | 1 + 2 files changed, 2 insertions(+) create mode 100644 resources/migrations/20180419153800-enforce-unique-tx-hash.down.sql create mode 100644 resources/migrations/20180419153800-enforce-unique-tx-hash.up.sql diff --git a/resources/migrations/20180419153800-enforce-unique-tx-hash.down.sql b/resources/migrations/20180419153800-enforce-unique-tx-hash.down.sql new file mode 100644 index 0000000..7f1994f --- /dev/null +++ b/resources/migrations/20180419153800-enforce-unique-tx-hash.down.sql @@ -0,0 +1 @@ +ALTER TABLE issues DROP CONSTRAINT transaction_hash_uniq; diff --git a/resources/migrations/20180419153800-enforce-unique-tx-hash.up.sql b/resources/migrations/20180419153800-enforce-unique-tx-hash.up.sql new file mode 100644 index 0000000..ff92e04 --- /dev/null +++ b/resources/migrations/20180419153800-enforce-unique-tx-hash.up.sql @@ -0,0 +1 @@ +ALTER TABLE issues ADD CONSTRAINT transaction_hash_uniq UNIQUE (transaction_hash);