From 9e36d0178447397e197c969fc7e03b95098d46c9 Mon Sep 17 00:00:00 2001 From: g-div Date: Fri, 23 Feb 2018 13:15:31 +0100 Subject: [PATCH] fix(migrations): add unique index on user(provider,provider_id) --- migrations/005-unique-provider_id.sql | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 migrations/005-unique-provider_id.sql diff --git a/migrations/005-unique-provider_id.sql b/migrations/005-unique-provider_id.sql new file mode 100644 index 0000000..2e4fb3a --- /dev/null +++ b/migrations/005-unique-provider_id.sql @@ -0,0 +1,5 @@ +-- Up +CREATE UNIQUE INDEX idx_user_provider_id ON user(provider, provider_id); + +-- Down +DROP INDEX idx_user_provider_id;