From 14997bb700d5bc30d69a48294ae26a7e566939c5 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Mon, 8 May 2023 12:56:10 +0200 Subject: dummy data --- db/data.sql | 36 +++++++++++++++++++++++++++++++++++- db/init.sql | 2 +- 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/db/data.sql b/db/data.sql index 4ba2805..4fb248e 100644 --- a/db/data.sql +++ b/db/data.sql @@ -1 +1,35 @@ --- +insert into webs.category (`name`) values + ("Verse fruit en groenten"), + ("Boeken"), + ("Overig"); + +insert into webs.product (`name`, `price`, `category`) values + ("Appel", 0.90, 1), + ("Banaan", 1.10, 1), + ("Peer", 0.99, 1), + ("ハリネズミのハリー 第1巻", 5.99, 1), + ("ハリネズミのハリー 第2巻", 5.99, 1), + ("ハリネズミのハリー 第3巻", 5.99, 1), + ("イジらないで、長瀞さん 第1巻", 5.49, 1), + ("イジらないで、長瀞さん 第2巻", 5.49, 1), + ("Kip", 9.95, 3), + ("Kikker", 19.95, 3); + +insert into webs.customer (`name`) values + ("loek"), + ("bert"), + ("niels"), + ("joshua"), + ("willem"); + +insert into webs.cart (`product`, `customer`) values + (4, 1), + (5, 1), + (6, 1), + (7, 1), + (8, 1); + +insert into webs.promotion (`product`, `price_buff`) values + (1, 0.80), -- 20% korting + (2, 0.80), + (3, 0.80); diff --git a/db/init.sql b/db/init.sql index f1c3506..c842e52 100644 --- a/db/init.sql +++ b/db/init.sql @@ -8,7 +8,7 @@ create table if not exists webs.category ( create table if not exists webs.product ( `ID` int not null auto_increment, - `name` varchar(45) not null, + `name` varchar(255) not null, `price` decimal(5, 2) not null, `image` mediumblob null default null, `category` int not null, -- cgit v1.2.3