From 735bada4e0d6f436c1e7c5896cc75d7cc146bb9d Mon Sep 17 00:00:00 2001 From: Irina Peshinskaya Date: Tue, 28 May 2019 09:42:55 +0200 Subject: [PATCH] TT#57959 Add terminate_timestamp to unique bp indexes Change-Id: Ia6a4cccc88e36775a6931d7da73a52639c1fbc39 (cherry picked from commit d87cb7c25a651e832151e5f4a0c7236e120364b7) --- db_scripts/diff/15547.down | 11 +++++++++++ db_scripts/diff/15547.up | 10 ++++++++++ 2 files changed, 21 insertions(+) create mode 100644 db_scripts/diff/15547.down create mode 100644 db_scripts/diff/15547.up diff --git a/db_scripts/diff/15547.down b/db_scripts/diff/15547.down new file mode 100644 index 00000000..7686dab0 --- /dev/null +++ b/db_scripts/diff/15547.down @@ -0,0 +1,11 @@ +SET autocommit=0; + +USE provisioning + +DROP INDEX IF EXISTS resnam_idx ON `billing`.`billing_profiles`; +CREATE UNIQUE INDEX IF NOT EXISTS resnam_idx ON `billing`.`billing_profiles`(`reseller_id`,`name`); + +DROP INDEX IF EXISTS reshand_idx ON `billing`.`billing_profiles`; +CREATE UNIQUE INDEX IF NOT EXISTS reshand_idx ON `billing`.`billing_profiles`(`reseller_id`, `handle`); + +commit; diff --git a/db_scripts/diff/15547.up b/db_scripts/diff/15547.up new file mode 100644 index 00000000..faaf0963 --- /dev/null +++ b/db_scripts/diff/15547.up @@ -0,0 +1,10 @@ +use provisioning; +set autocommit=0; + +DROP INDEX IF EXISTS resnam_idx ON `billing`.`billing_profiles`; +CREATE UNIQUE INDEX IF NOT EXISTS resnam_idx ON `billing`.`billing_profiles`(`reseller_id`,`name`,`terminate_timestamp`); + +DROP INDEX IF EXISTS reshand_idx ON `billing`.`billing_profiles`; +CREATE UNIQUE INDEX IF NOT EXISTS reshand_idx ON `billing`.`billing_profiles`(`reseller_id`, `handle`,`terminate_timestamp`); + +commit;