Eric Bower
·
2026-09-25
1CREATE TABLE IF NOT EXISTS invites (
2 id SERIAL PRIMARY KEY,
3 from_user_id uuid NOT NULL,
4 to_user_id uuid NOT NULL,
5 created_at timestamp without time zone NOT NULL DEFAULT NOW(),
6 CONSTRAINT fk_invites_from_app_users
7 FOREIGN KEY(from_user_id)
8 REFERENCES app_users(id)
9 ON DELETE CASCADE
10 ON UPDATE CASCADE,
11 CONSTRAINT fk_invites_to_app_users
12 FOREIGN KEY(to_user_id)
13 REFERENCES app_users(id)
14 ON DELETE CASCADE
15 ON UPDATE CASCADE
16);