Replace id column with natural PK

This commit is contained in:
2022-03-04 21:56:12 +00:00
parent 442e87234c
commit fd6b77f154
4 changed files with 34 additions and 4 deletions

View File

@ -0,0 +1,6 @@
-- +goose Up
ALTER TABLE assignments DROP id;
ALTER TABLE assignments ADD PRIMARY KEY (category_id, date);
-- +goose Down
ALTER TABLE assignments ADD COLUMN id uuid DEFAULT uuid_generate_v4() PRIMARY KEY;