Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions db/migration/V0001__Create_members_table.sql
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
CREATE TYPE match_prefs AS ENUM ('mentor', 'mentee', 'both');
CREATE TYPE industries AS ENUM (
'technology', 'finance', 'healthcare', 'education',
'consulting', 'government', 'nonprofit', 'other'
);


CREATE TABLE IF NOT EXISTS "members" (
id UUID PRIMARY KEY,
full_name TEXT NOT NULL,
Expand All @@ -13,10 +6,10 @@ CREATE TABLE IF NOT EXISTS "members" (
bio TEXT,
referral_source TEXT,
active BOOLEAN,
match_pref match_prefs,
industry industries,
match_pref TEXT,
industry TEXT,
role TEXT,
topics TEXT[],
topics TEXT,
extra_notes TEXT,
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
Expand Down
12 changes: 1 addition & 11 deletions db/migration/V0003__Create_matches_table.sql
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
CREATE TYPE match_status AS ENUM (
'pending',
'accepted',
'declined',
'active',
'paused',
'completed',
'cancelled'
);

CREATE TABLE IF NOT EXISTS "matches" (
id UUID PRIMARY KEY,
member_a_id UUID NOT NULL,
Expand All @@ -17,7 +7,7 @@ CREATE TABLE IF NOT EXISTS "matches" (
CONSTRAINT fk_member_b FOREIGN KEY (member_b_id) REFERENCES members(id) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT fk_cycle FOREIGN KEY (cycle_id) REFERENCES match_cycles(id) ON DELETE CASCADE ON UPDATE CASCADE,
match_score REAL,
status match_status,
status TEXT,
feedback_a INT,
feedback_b INT,
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
Expand Down
Loading