Skip to content

Commit 3e62eb0

Browse files
committed
new script
1 parent d415a5f commit 3e62eb0

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

database/cfc_script.sql

+10-3
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ create table tbl_menu(
4848
cd_prod int primary key auto_increment,
4949
img_prod varchar(100) not null,
5050
nm_prod varchar(100) not null,
51-
price_prod decimal(10, 2) not null,
51+
price_prod decimal(12, 2) not null,
5252
qntd_prod int not null,
5353
size varchar(110),
5454
bonusDesc varchar(210),
@@ -58,6 +58,7 @@ create table tbl_menu(
5858
FOREIGN KEY(cd_cat) REFERENCES tbl_category (cd_cat)
5959
)DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
6060

61+
6162
update tbl_menu set size = "Frappuccino de chocolate\nCroissant e Torada" where cd_prod = 24;
6263
update tbl_menu set nm_prod = "Dunkin Donuts" where cd_prod = 14;
6364
update tbl_menu set nm_prod = "Combo happy" where cd_prod = 24;
@@ -72,6 +73,14 @@ select * from tbl_menu;
7273

7374
DROP table tbl_menu;
7475

76+
create table tbl_shoppingcart(
77+
cd_cart int primary key auto_increment,
78+
email_user varchar(256) not null,
79+
cd_prod int not null,
80+
qt_prod int not null,
81+
FOREIGN KEY(cd_prod) REFERENCES tbl_menu (cd_prod)
82+
)DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
83+
7584
create table tbl_purchase(
7685
cd_purchase int primary key auto_increment,
7786
cpf_user varchar(14),
@@ -119,8 +128,6 @@ create table tbl_partners(
119128
descr_parc varchar(2000)
120129
); */
121130

122-
123-
124131
/******************** Inserts ********************/
125132
insert into tbl_category (nm_cat) values ("Café");
126133
insert into tbl_category (nm_cat) values ("Chocolate");

0 commit comments

Comments
 (0)