summaryrefslogtreecommitdiff
path: root/server/schema.sql
diff options
context:
space:
mode:
authorMichael Hunteman <michael@huntm.net>2024-10-20 18:52:16 -0700
committerMichael Hunteman <michael@huntm.net>2024-10-20 18:52:16 -0700
commit5a65b3a653eb4a9ca62332fa65c8d352e6dc782f (patch)
tree6f2fabb06936a7290a2f5e94a1b3aaf4534bf87c /server/schema.sql
parent5c8f0ca091ff7f962260c75a0ffe4c99e7cdca3c (diff)
Use UUID
Diffstat (limited to 'server/schema.sql')
-rw-r--r--server/schema.sql8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/schema.sql b/server/schema.sql
index 809d8c9..44881c8 100644
--- a/server/schema.sql
+++ b/server/schema.sql
@@ -1,21 +1,21 @@
create table guest (
- id serial PRIMARY KEY,
+ id uuid primary key default gen_random_uuid(),
first_name varchar(64),
last_name varchar(64),
- attendance varchar(8) DEFAULT 'no' NOT NULL,
+ attendance varchar(8) not null,
email varchar(64),
message varchar(128),
party_size integer
);
create table party (
- guest_id integer NOT NULL references guest(id) ON DELETE CASCADE,
+ guest_id uuid not null references guest(id) on delete cascade,
first_name varchar(64),
last_name varchar(64)
);
create table admin (
- id serial PRIMARY KEY,
+ id uuid primary key default gen_random_uuid(),
username varchar(64),
password varchar(64)
) \ No newline at end of file