summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2021-09-05 16:28:21 +0200
committerHarald Eilertsen <haraldei@anduin.net>2021-09-05 16:28:21 +0200
commitf1a062e5775eee57b982edf232b603812c5a996a (patch)
treeee2799b6a000b8a77e4255648f2c375b0b04ba2d
parent30e7ddc5766aed311c7ea5571e63ae54386b3af1 (diff)
downloadgigologadmin-f1a062e5775eee57b982edf232b603812c5a996a.tar.gz
gigologadmin-f1a062e5775eee57b982edf232b603812c5a996a.tar.bz2
gigologadmin-f1a062e5775eee57b982edf232b603812c5a996a.zip
Don't error if obsolete indexes or keys are already deleted.
-rw-r--r--includes/admin/register_db_tables.php4
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)