diff --git a/system/init.php b/system/init.php index 090abe50..7fef463a 100644 --- a/system/init.php +++ b/system/init.php @@ -27,7 +27,7 @@ require_once(SYSTEM . 'libs/cache.php'); $cache = Cache::getInstance($config['cache_engine'], $config['cache_prefix']); // twig -require_once LIBS . 'twig/Autoloader.php'; +require_once LIBS . 'Twig/Autoloader.php'; Twig_Autoloader::register(); $loader = new Twig_Loader_Filesystem(SYSTEM . 'templates'); diff --git a/system/migrations/4.php b/system/migrations/4.php index 774b2d5f..fbe17b12 100644 --- a/system/migrations/4.php +++ b/system/migrations/4.php @@ -1,3 +1,4 @@ query("ALTER TABLE `" . TABLE_PREFIX . "monsters` ADD `id` int(11) NOT NULL AUTO_INCREMENT primary key FIRST;"); + if(!fieldExist('id', TABLE_PREFIX . 'monsters')) + $db->query("ALTER TABLE `" . TABLE_PREFIX . "monsters` ADD `id` int(11) NOT NULL AUTO_INCREMENT primary key FIRST;"); ?> \ No newline at end of file diff --git a/system/migrations/6.php b/system/migrations/6.php index 1356dd05..6f1fed1a 100644 --- a/system/migrations/6.php +++ b/system/migrations/6.php @@ -1,3 +1,4 @@ query("ALTER TABLE `" . TABLE_PREFIX . "hooks` ADD `enabled` INT(1) NOT NULL DEFAULT 1;"); + if(!fieldExist('enabled', TABLE_PREFIX . 'hooks')) + $db->query("ALTER TABLE `" . TABLE_PREFIX . "hooks` ADD `enabled` INT(1) NOT NULL DEFAULT 1;"); ?> \ No newline at end of file