mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 17:29:21 +02:00
Add mising fields into spells table, fix some mysql errors
This commit is contained in:
parent
d8a70a3da6
commit
5a97e53e21
@ -27,7 +27,7 @@ session_start();
|
||||
|
||||
define('MYAAC', true);
|
||||
define('MYAAC_VERSION', '0.8-dev');
|
||||
define('DATABASE_VERSION', 25);
|
||||
define('DATABASE_VERSION', 26);
|
||||
define('TABLE_PREFIX', 'myaac_');
|
||||
define('START_TIME', microtime(true));
|
||||
define('MYAAC_OS', stripos(PHP_OS, 'WIN') === 0 ? 'WINDOWS' : (strtoupper(PHP_OS) === 'DARWIN' ? 'MAC' : 'LINUX'));
|
||||
|
@ -318,16 +318,18 @@ INSERT INTO `myaac_gallery` (`id`, `ordering`, `comment`, `image`, `thumb`, `aut
|
||||
CREATE TABLE `myaac_spells`
|
||||
(
|
||||
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
||||
`spell` VARCHAR(255) NOT NULL,
|
||||
`spell` VARCHAR(255) NOT NULL DEFAULT '',
|
||||
`name` VARCHAR(255) NOT NULL,
|
||||
`words` VARCHAR(255) NOT NULL,
|
||||
`words` VARCHAR(255) NOT NULL DEFAULT '',
|
||||
`category` TINYINT(1) NOT NULL DEFAULT 0 COMMENT '1 - attack, 2 - healing, 3 - summon, 4 - supply, 5 - support',
|
||||
`type` TINYINT(1) NOT NULL DEFAULT 0 COMMENT '1 - instant, 2 - conjure, 3 - rune',
|
||||
`level` INT(11) NOT NULL DEFAULT 0,
|
||||
`maglevel` INT(11) NOT NULL DEFAULT 0,
|
||||
`mana` INT(11) NOT NULL DEFAULT 0,
|
||||
`soul` TINYINT(3) NOT NULL DEFAULT 0,
|
||||
`conjure_id` INT(11) NOT NULL DEFAULT 0,
|
||||
`conjure_count` TINYINT(3) NOT NULL DEFAULT 0,
|
||||
`reagent` INT(11) NOT NULL DEFAULT 0,
|
||||
`item_id` INT(11) NOT NULL DEFAULT 0,
|
||||
`premium` TINYINT(1) NOT NULL DEFAULT 0,
|
||||
`vocations` VARCHAR(100) NOT NULL DEFAULT '',
|
||||
|
17
system/migrations/26.php
Normal file
17
system/migrations/26.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
if($db->hasColumn(TABLE_PREFIX . 'spells', 'spell')) {
|
||||
$db->exec('ALTER TABLE `' . TABLE_PREFIX . "spells` MODIFY `spell` VARCHAR(255) NOT NULL DEFAULT '';");
|
||||
}
|
||||
|
||||
if($db->hasColumn(TABLE_PREFIX . 'spells', 'words')) {
|
||||
$db->exec('ALTER TABLE `' . TABLE_PREFIX . "spells` MODIFY `words` VARCHAR(255) NOT NULL DEFAULT '';");
|
||||
}
|
||||
|
||||
if(!$db->hasColumn(TABLE_PREFIX . 'spells', 'conjure_id')) {
|
||||
$db->exec('ALTER TABLE `' . TABLE_PREFIX . 'spells` ADD `conjure_id` INT(11) NOT NULL DEFAULT 0 AFTER `soul`;');
|
||||
}
|
||||
|
||||
if(!$db->hasColumn(TABLE_PREFIX . 'spells', 'reagent')) {
|
||||
$db->exec('ALTER TABLE `' . TABLE_PREFIX . 'spells` ADD `reagent` INT(11) NOT NULL DEFAULT 0 AFTER `conjure_count`;');
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user