dinner_vote/db/ddl.sql

39 lines
652 B
MySQL
Raw Normal View History

2024-09-12 10:37:29 +08:00
create table main.menu
(
name text
constraint menu_pk
primary key,
label text,
order_num integer,
expression text
);
create table main.roll_result
(
datestr text
constraint roll_result_pk
primary key,
value text
);
create table main.user_menu
(
user text,
menu text,
datestr text,
nickname text,
2024-09-14 17:34:37 +08:00
dislike text,
2024-09-12 10:37:29 +08:00
constraint user_menu_pk
2024-09-14 17:34:37 +08:00
primary key (user, datestr),
constraint user_menu_uk
2024-09-12 10:37:29 +08:00
unique (nickname, datestr)
);
create table main.users
(
nickname text
constraint users_pk
primary key
);