Skip to content

Commit

Permalink
Add UNIQUE constraint to deny duplicates.
Browse files Browse the repository at this point in the history
  • Loading branch information
emmiegit committed Jan 13, 2024
1 parent a3a3272 commit b4a67f5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion migrations/20240112_01_Njk7j-create-initial-tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,7 @@ CREATE TABLE job (
job_id SERIAL PRIMARY KEY,
job_type TEXT NOT NULL,
job_object TEXT NOT NULL,
data JSON NOT NULL
data JSON NOT NULL,

UNIQUE (job_type, job_object)
);

0 comments on commit b4a67f5

Please sign in to comment.