enforce unique content generator names in database
Set a uniqueness constraint on the content generator name in the database. Prior to this change, we were only enforcing this in the hub application layer. Configure this in postgres for safety.
This commit is contained in:
parent
ee47301987
commit
f5a845be14
2 changed files with 5 additions and 1 deletions
|
|
@ -257,7 +257,7 @@ INSERT INTO volume (id, name) VALUES (0, 'DEFAULT');
|
|||
-- data for content generators
|
||||
CREATE TABLE content_generator (
|
||||
id SERIAL PRIMARY KEY,
|
||||
name TEXT
|
||||
name TEXT UNIQUE NOT NULL
|
||||
) WITHOUT OIDS;
|
||||
|
||||
-- here we track the built packages
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue