From: Roland Haeder Date: Wed, 23 Sep 2015 15:01:16 +0000 (+0200) Subject: fixed sql X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=5de1501708609a01d796ed47355aaa28226d1ef4;p=pizzaservice-core.git fixed sql Signed-off-by:Roland Häder --- diff --git a/install/install.sql b/install/install.sql index 2f14be7..3ab7e23 100644 --- a/install/install.sql +++ b/install/install.sql @@ -56,7 +56,7 @@ CREATE TABLE `ordered_items` ( `item_type` VARCHAR(20) NOT NULL COMMENT 'Item type', `amount` bigint(20) unsigned NOT NULL COMMENT 'Ordered amount', `added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Record inserted', - PRIMARY KEY (`id), + PRIMARY KEY (`id`), INDEX (`order_id`), INDEX (`product_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Ordered items'; @@ -77,7 +77,7 @@ CREATE TABLE `products` ( `title` varchar(100) NOT NULL COMMENT 'Title of product', `price` decimal(20,2) unsigned NOT NULL COMMENT 'Product price', `available` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Whether product is available', - PRIMARY (`id`), + PRIMARY KEY (`id`), INDEX (`category`) ) ENGINE=InnoDBDEFAULT CHARSET=utf8 COMMENT='Products';