From 71917c7f63a5865ee1425dead225c50def836ccd Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 23 Oct 2017 12:27:33 -0300 Subject: [PATCH] Bug 10021: Update DB changes Content-Type: text/plain; charset=utf-8 Signed-off-by: Josef Moravec Signed-off-by: Marcel de Rooy --- installer/data/mysql/atomicupdate/bug_10021.perl | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_10021.perl diff --git a/installer/data/mysql/atomicupdate/bug_10021.perl b/installer/data/mysql/atomicupdate/bug_10021.perl new file mode 100644 index 0000000..74b1c43 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_10021.perl @@ -0,0 +1,14 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + + $dbh->do(q|DROP TABLE IF EXISTS notifys|); + + if( column_exists( 'accountlines', 'notify_id' ) ) { + $dbh->do(q|ALTER TABLE accountlines DROP COLUMN notify_id|); + $dbh->do(q|ALTER TABLE accountlines DROP COLUMN notify_level|); + } + + # Always end with this (adjust the bug info) + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 10021 - Drop notifys-related table and columns)\n"; +} -- 2.1.4