From 0aed705a6abab49d60a7f83cff50fc0998812a73 Mon Sep 17 00:00:00 2001 From: Lee <42119604+Leesneaks@users.noreply.github.com> Date: Tue, 29 Dec 2020 17:43:17 +0000 Subject: [PATCH] migration 31 fix. Some mysql dbs won't allow text to have a default value. --- system/migrations/31.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/migrations/31.php b/system/migrations/31.php index b51e7421..f63fc394 100644 --- a/system/migrations/31.php +++ b/system/migrations/31.php @@ -1,7 +1,7 @@ hasColumn(TABLE_PREFIX . 'monsters', 'elements')) { - $db->exec("ALTER TABLE `" . TABLE_PREFIX . "monsters` ADD `elements` TEXT NOT NULL DEFAULT '' AFTER `immunities`;"); + $db->exec("ALTER TABLE `" . TABLE_PREFIX . "monsters` ADD `elements` TEXT AFTER `immunities`;"); $db->exec("ALTER TABLE `" . TABLE_PREFIX . "monsters` ADD `pushable` TINYINT(1) NOT NULL DEFAULT '0' AFTER `convinceable`;"); $db->exec("ALTER TABLE `" . TABLE_PREFIX . "monsters` ADD `canpushitems` TINYINT(1) NOT NULL DEFAULT '0' AFTER `pushable`;"); $db->exec("ALTER TABLE `" . TABLE_PREFIX . "monsters` ADD `canpushcreatures` TINYINT(1) NOT NULL DEFAULT '0' AFTER `canpushitems`;"); @@ -14,5 +14,5 @@ if(!$db->hasColumn(TABLE_PREFIX . 'monsters', 'elements')) { $db->exec("ALTER TABLE `" . TABLE_PREFIX . "monsters` ADD `rewardboss` TINYINT(1) NOT NULL DEFAULT '0' AFTER `attackable`;"); $db->exec("ALTER TABLE `" . TABLE_PREFIX . "monsters` ADD `defense` INT(11) NOT NULL DEFAULT '0' AFTER `rewardboss`;"); $db->exec("ALTER TABLE `" . TABLE_PREFIX . "monsters` ADD `armor` INT(11) NOT NULL DEFAULT '0' AFTER `defense`;"); - $db->exec("ALTER TABLE `" . TABLE_PREFIX . "monsters` ADD `summons` TEXT NOT NULL DEFAULT '' AFTER `loot`;"); + $db->exec("ALTER TABLE `" . TABLE_PREFIX . "monsters` ADD `summons` TEXT AFTER `loot`;"); }