From eecd1c3b81ad483af2c116591bf4b30371cbd010 Mon Sep 17 00:00:00 2001 From: "kacaii.dev" Date: Mon, 24 Aug 2026 20:40:29 -0300 Subject: [PATCH] sql: remove "id" field from "startup_membership" --- postgres/init.sql | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/postgres/init.sql b/postgres/init.sql index f1eca21..f4132ef 100644 --- a/postgres/init.sql +++ b/postgres/init.sql @@ -22,14 +22,14 @@ CREATE TABLE startup ( description text, city text NOT NULL, state text NOT NULL, + created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id) ); CREATE TABLE startup_membership ( - id uuid UNIQUE NOT NULL DEFAULT uuidv7(), - user_id uuid REFERENCES user_account(id), - startup_id uuid REFERENCES startup(id), - PRIMARY KEY (id) + user_id uuid REFERENCES user_account(id) ON DELETE CASCADE, + startup_id uuid REFERENCES startup(id) ON DELETE CASCADE, + PRIMARY KEY (user_id, startup_id) ); CREATE TYPE investor_kind AS enum ( -- 2.51.2