From ab5e4eff76741327af1fa595595c5a94b9cee002 Mon Sep 17 00:00:00 2001 From: slawkens Date: Sat, 17 Feb 2024 16:43:33 +0100 Subject: [PATCH] Fix if hide already exists --- system/migrations/39.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/system/migrations/39.php b/system/migrations/39.php index 697dd751..d05d911f 100644 --- a/system/migrations/39.php +++ b/system/migrations/39.php @@ -3,7 +3,10 @@ // 2024-01-27 // change hidden to hide (Eloquent model reserved keyword) -$db->exec("ALTER TABLE `players` CHANGE `hidden` `hide` TINYINT(1) NOT NULL DEFAULT 0;"); +if (!$db->hasColumn('players', 'hide')) { + $db->exec("ALTER TABLE `players` CHANGE `hidden` `hide` TINYINT(1) NOT NULL DEFAULT 0;"); +} + $db->exec("ALTER TABLE `" . TABLE_PREFIX . "changelog` CHANGE `hidden` `hide` TINYINT(1) NOT NULL DEFAULT 0;"); $db->exec("ALTER TABLE `" . TABLE_PREFIX . "faq` CHANGE `hidden` `hide` TINYINT(1) NOT NULL DEFAULT 0;"); $db->exec("ALTER TABLE `" . TABLE_PREFIX . "forum_boards` CHANGE `hidden` `hide` TINYINT(1) NOT NULL DEFAULT 0;");