Add room assignment solver with prefer_not_multiple setting

This commit is contained in:
Ian Gulliver
2026-02-15 21:30:32 -08:00
parent 9a121f0bc0
commit 3497842899
4 changed files with 408 additions and 25 deletions

View File

@@ -10,11 +10,11 @@ END $$;
CREATE TABLE IF NOT EXISTS trips (
id BIGSERIAL PRIMARY KEY,
name TEXT NOT NULL
name TEXT NOT NULL,
room_size INTEGER NOT NULL DEFAULT 2,
prefer_not_multiple INTEGER NOT NULL DEFAULT 5
);
ALTER TABLE trips ADD COLUMN IF NOT EXISTS room_size INTEGER NOT NULL DEFAULT 2;
CREATE TABLE IF NOT EXISTS trip_admins (
id BIGSERIAL PRIMARY KEY,
trip_id BIGINT NOT NULL REFERENCES trips(id) ON DELETE CASCADE,