forked from lix-project/hydra
e00030563b
A postgresql column which is non-null and unique is treated with the same optimisations as a primary key, so we have no need to try and recreate the `id` as the primary key. No read paths are impacted by this change, and the database will automatically create an ID for each insert. Thus, no code needs to change.
4 lines
150 B
SQL
4 lines
150 B
SQL
-- will automatically add unique IDs to Jobsets.
|
|
ALTER TABLE Jobsets
|
|
ADD COLUMN id SERIAL NOT NULL,
|
|
ADD CONSTRAINT Jobsets_id_unique UNIQUE (id);
|