From 96aa0680c7189ac05f65e1d401b4ad3d63bd3867 Mon Sep 17 00:00:00 2001 From: zmd50 <2531977234@qq.com> Date: Tue, 16 Jun 2020 11:41:28 +0800 Subject: [PATCH] 10 --- databases/book_list.sql | 2 +- databases/order_details.sql | 7 +++---- databases/user_cart.sql | 4 ++-- databases/user_list.sql | 2 +- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/databases/book_list.sql b/databases/book_list.sql index 7aa148f..b7b7a20 100644 --- a/databases/book_list.sql +++ b/databases/book_list.sql @@ -18,7 +18,7 @@ SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for book_list -- ---------------------------- -DROP TABLE IF EXISTS `book_list`; +DROP TABLE IF EXISTS `book`; CREATE TABLE `book_list` ( `bookname` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `kind` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, diff --git a/databases/order_details.sql b/databases/order_details.sql index 1241365..1648f40 100644 --- a/databases/order_details.sql +++ b/databases/order_details.sql @@ -18,14 +18,13 @@ SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for order_details -- ---------------------------- -DROP TABLE IF EXISTS `order_details`; +DROP TABLE IF EXISTS `order`; CREATE TABLE `order_details` ( `id` int(11) NOT NULL AUTO_INCREMENT, - `userId` int(11) NOT NULL, - `orderNum` int(11) NOT NULL, - `ISBN` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, + `bookname` varchar(100) NOT NULL, `count` int(11) NOT NULL, `price` float(10,2) NOT NULL, + `username` int(40) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; diff --git a/databases/user_cart.sql b/databases/user_cart.sql index e5d3f62..6cdfb97 100644 --- a/databases/user_cart.sql +++ b/databases/user_cart.sql @@ -18,9 +18,9 @@ SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for user_cart -- ---------------------------- -DROP TABLE IF EXISTS `user_cart`; +DROP TABLE IF EXISTS `cart`; CREATE TABLE `user_cart` ( - `username` varchar(11) COLLATE utf8_unicode_ci NOT NULL, + `username` varchar(40) COLLATE utf8_unicode_ci NOT NULL, `bookname` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `price` float(10,2) NOT NULL, `count` int(11) NOT NULL diff --git a/databases/user_list.sql b/databases/user_list.sql index cb291a2..bc39eb6 100644 --- a/databases/user_list.sql +++ b/databases/user_list.sql @@ -19,7 +19,7 @@ SET FOREIGN_KEY_CHECKS=0; -- Table structure for user_list -- ---------------------------- DROP TABLE IF EXISTS `user_list`; -CREATE TABLE `user_list` ( +CREATE TABLE `user` ( `username` varchar(40) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `password` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `userstatus` int(11) NOT NULL,