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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ spring-test/test-output/

# Maven artifacts
/target/
target_test*/

# Eclipse artifacts, including WTP generated manifests
bin
Expand Down
3 changes: 2 additions & 1 deletion db/migration/V0001__Create_members_table.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
CREATE TABLE IF NOT EXISTS "members" (
id UUID PRIMARY KEY,
full_name TEXT NOT NULL,
first_name TEXT NOT NULL,
last_name TEXT NOT NULL,
email TEXT UNIQUE NOT NULL,
linked_url TEXT,
bio TEXT,
Expand Down
2 changes: 1 addition & 1 deletion db/migration/V0002__Create_match_cycles_table.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CREATE TABLE IF NOT EXISTS "match_cycles" (
id UUID PRIMARY KEY,
id INT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
period TEXT,
run_at TIMESTAMPTZ NOT NULL,
total_members INT,
Expand Down
6 changes: 3 additions & 3 deletions db/migration/V0003__Create_matches_table.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ CREATE TABLE IF NOT EXISTS "matches" (
id UUID PRIMARY KEY,
member_a_id UUID NOT NULL,
member_b_id UUID NOT NULL,
cycle_id UUID NOT NULL,
cycle_id INT NOT NULL,
CONSTRAINT fk_member_a FOREIGN KEY (member_a_id) REFERENCES members(id) ON DELETE CASCADE ON UPDATE CASCADE,
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 TEXT,
feedback_a INT,
feedback_b INT,
feedback_a TEXT,
feedback_b TEXT,
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);
Loading