From 1207ac90429385f487abdd3bf1951b30d72a207e Mon Sep 17 00:00:00 2001 From: Irina Peshinskaya Date: Wed, 29 May 2019 04:56:19 +0200 Subject: [PATCH] TT#57959 Fix NULL field in the unique index Change-Id: I00f8f5604b99c831ff737156a24aecf39c6d88c5 (cherry picked from commit dc68e3a35ae2242d31c04c19070926eb44980bf7) --- db_scripts/diff/15548.down | 9 +++++++++ db_scripts/diff/15548.up | 9 +++++++++ 2 files changed, 18 insertions(+) create mode 100644 db_scripts/diff/15548.down create mode 100644 db_scripts/diff/15548.up diff --git a/db_scripts/diff/15548.down b/db_scripts/diff/15548.down new file mode 100644 index 00000000..6f8734cd --- /dev/null +++ b/db_scripts/diff/15548.down @@ -0,0 +1,9 @@ +SET autocommit=0; + +USE billing; + +alter table billing.billing_profiles modify terminate_timestamp timestamp null default null; + +update billing.billing_profiles set terminate_timestamp = null where terminate_timestamp = '0000-00-00 00:00:00'; + +commit; diff --git a/db_scripts/diff/15548.up b/db_scripts/diff/15548.up new file mode 100644 index 00000000..c00fa86e --- /dev/null +++ b/db_scripts/diff/15548.up @@ -0,0 +1,9 @@ +set autocommit=0; + +use billing; + +update billing.billing_profiles set terminate_timestamp = '0000-00-00 00:00:00' where terminate_timestamp is null; + +alter table billing.billing_profiles modify terminate_timestamp timestamp not null default '0000-00-00 00:00:00'; + +commit;