From 4b8de0bcf0ca598804a9d462933d492232b4b314 Mon Sep 17 00:00:00 2001 From: Jakob L. Kreuze Date: Sun, 12 Feb 2023 14:50:42 -0500 Subject: Merge branch 'self-hosted-comments' It's been working well enough. I think it's time to get the initial version of this on `master'. --- haunt/jakob/dynamic/schema-rsvp.sql | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 haunt/jakob/dynamic/schema-rsvp.sql (limited to 'haunt/jakob/dynamic/schema-rsvp.sql') diff --git a/haunt/jakob/dynamic/schema-rsvp.sql b/haunt/jakob/dynamic/schema-rsvp.sql new file mode 100644 index 0000000..3e6a21f --- /dev/null +++ b/haunt/jakob/dynamic/schema-rsvp.sql @@ -0,0 +1,34 @@ +CREATE TABLE IF NOT EXISTS events ( + id SERIAL, + title varchar(128) NOT NULL, + description varchar(16384) NOT NULL, + datetime timestamp with time zone NOT NULL, + location varchar(128) NOT NULL, + PRIMARY KEY (id) +); + +CREATE TABLE IF NOT EXISTS invitations ( + id SERIAL, + vanity char(12) NOT NULL, + comments varchar(1024) NOT NULL, + created_on timestamp with time zone default current_timestamp, + capabilities bigint NOT NULL, + event_id integer NOT NULL, + PRIMARY KEY (id) +); + +CREATE TABLE IF NOT EXISTS rsvps ( + id SERIAL, + vanity char(12) NOT NULL, + invitation_id char(12) NOT NULL, + event_id bigint NOT NULL, + fullname varchar(128) NOT NULL, + email varchar(256) NOT NULL, + guests varchar(1024) NOT NULL, + attending varchar(32) NOT NULL, + PRIMARY KEY (id) +); + +-- `rsvps` contains the bare minimum. If we later decide we need additional +-- fields, we'll have an additional table mapping events.id to attribute names +-- and rsvps.id to attribute values. -- cgit v1.3