diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2021-09-05 16:28:21 +0200 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2021-09-05 16:28:21 +0200 |
commit | f1a062e5775eee57b982edf232b603812c5a996a (patch) | |
tree | ee2799b6a000b8a77e4255648f2c375b0b04ba2d /includes/admin/register_db_tables.php | |
parent | 30e7ddc5766aed311c7ea5571e63ae54386b3af1 (diff) | |
download | gigologadmin-f1a062e5775eee57b982edf232b603812c5a996a.tar.gz gigologadmin-f1a062e5775eee57b982edf232b603812c5a996a.tar.bz2 gigologadmin-f1a062e5775eee57b982edf232b603812c5a996a.zip |
Don't error if obsolete indexes or keys are already deleted.
Diffstat (limited to 'includes/admin/register_db_tables.php')
-rw-r--r-- | includes/admin/register_db_tables.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/admin/register_db_tables.php b/includes/admin/register_db_tables.php index 8080578..8b5f044 100644 --- a/includes/admin/register_db_tables.php +++ b/includes/admin/register_db_tables.php @@ -348,10 +348,10 @@ if ( !function_exists( "giglog_register_db_tables") ) ADD COLUMN IF NOT EXISTS `wpgconcert_type` INT NOT NULL DEFAULT '1' COMMENT '1 concert, 2 festival';"); $wpdb->query( - "ALTER TABLE `wpg_concerts` DROP INDEX `wpgconcert_band`;"); + "ALTER TABLE `wpg_concerts` DROP INDEX IF EXISTS `wpgconcert_band`;"); $wpdb->query( - "ALTER TABLE `wpg_concerts` DROP FOREIGN KEY `wpgconcert_band`;"); + "ALTER TABLE `wpg_concerts` DROP FOREIGN KEY IF EXISTS `wpgconcert_band`;"); } if ($db_version == NULL || $db_version < 6) |