Switch from in-memory to SQLite storage

This commit is contained in:
bronku 2025-03-19 11:59:08 +01:00
parent e55ca30d20
commit 23647d74fc
6 changed files with 288 additions and 40 deletions

24
schema.sql Normal file
View file

@ -0,0 +1,24 @@
create table cake (
id integer primary key autoincrement,
name text not null unique,
price integer not null
);
create table customer_order (
id integer primary key autoincrement,
name text,
surname text,
phone text,
location text,
order_date string not null,
delivery_date string not null,
status text,
paid integer
);
create table ordered_cake (
customer_order integer references customer_order (id) not null,
cake integer references cake (id) not null,
amount integer not null,
primary key (customer_order, cake)
)