diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/sql/mysql/createTables.sql | 12 | ||||
-rw-r--r-- | src/sql/mysql/updates/update_10_to_11.sql | 12 |
2 files changed, 12 insertions, 12 deletions
diff --git a/src/sql/mysql/createTables.sql b/src/sql/mysql/createTables.sql index a76cc337..84a35308 100644 --- a/src/sql/mysql/createTables.sql +++ b/src/sql/mysql/createTables.sql @@ -181,14 +181,14 @@ AUTO_INCREMENT=1 ; -- table: `mana_char_equips` -- CREATE TABLE IF NOT EXISTS `mana_char_equips` ( - id int(10) unsigned NOT NULL auto_increment, - owner_id int(10) unsigned NOT NULL, - slot_type tinyint(3) unsigned NOT NULL, - inventory_slot tinyint(3) unsigned NOT NULL, + `id` int(10) unsigned NOT NULL auto_increment, + `owner_id` int(10) unsigned NOT NULL, + `slot_type` tinyint(3) unsigned NOT NULL, + `inventory_slot` tinyint(3) unsigned NOT NULL, -- PRIMARY KEY (`id`), - UNIQUE KEY `owner_id` (`owner_id`, ) - FOREIGN KEY (owner_id) REFERENCES mana_characters(id) + UNIQUE KEY `owner_id` (`owner_id`, `inventory_slot`), + FOREIGN KEY (`owner_id`) REFERENCES `mana_characters` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/src/sql/mysql/updates/update_10_to_11.sql b/src/sql/mysql/updates/update_10_to_11.sql index 16408f45..5541b1da 100644 --- a/src/sql/mysql/updates/update_10_to_11.sql +++ b/src/sql/mysql/updates/update_10_to_11.sql @@ -35,14 +35,14 @@ DEFAULT CHARSET=utf8; -- table: `mana_char_equips` -- CREATE TABLE IF NOT EXISTS `mana_char_equips` ( - id int(10) unsigned NOT NULL auto_increment, - owner_id int(10) unsigned NOT NULL, - slot_type tinyint(3) unsigned NOT NULL, - inventory_slot tinyint(3) unsigned NOT NULL, + `id` int(10) unsigned NOT NULL auto_increment, + `owner_id` int(10) unsigned NOT NULL, + `slot_type` tinyint(3) unsigned NOT NULL, + `inventory_slot` tinyint(3) unsigned NOT NULL, -- PRIMARY KEY (`id`), - UNIQUE KEY `owner_id` (`owner_id`, ) - FOREIGN KEY (owner_id) REFERENCES mana_characters(id) + UNIQUE KEY `owner_id` (`owner_id`, `inventory_slot`), + FOREIGN KEY (`owner_id`) REFERENCES `mana_characters` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; |