· 8 years ago · Feb 12, 2018, 09:34 PM
1DROP TABLE IF EXISTS `user_inventory`;
2CREATE TABLE `user_inventory` (
3 `user_id` varchar(255) NOT NULL DEFAULT '',
4 `item_id` int(11) unsigned NOT NULL,
5 `quantity` int(11) DEFAULT NULL,
6 PRIMARY KEY (`user_id`,`item_id`),
7 KEY `item_id` (`item_id`),
8 CONSTRAINT `user_inventory_ibfk_2` FOREIGN KEY (`item_id`) REFERENCES `items` (`id`)
9) ENGINE=InnoDB DEFAULT CHARSET=utf8;