From 69e9497686a05c8b27d5496e5ff66664c785c25b Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 15 May 2018 18:11:56 -0700 Subject: set correct primary keys on many-to-many tables --- rust/migrations/2018-05-12-001226_init/up.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'rust') diff --git a/rust/migrations/2018-05-12-001226_init/up.sql b/rust/migrations/2018-05-12-001226_init/up.sql index 7d236f80..a517d788 100644 --- a/rust/migrations/2018-05-12-001226_init/up.sql +++ b/rust/migrations/2018-05-12-001226_init/up.sql @@ -189,15 +189,15 @@ CREATE TABLE release_contrib ( ); CREATE TABLE release_ref ( - id BIGSERIAL PRIMARY KEY, release_rev BIGSERIAL REFERENCES release_rev(id) NOT NULL, target_release_ident_id UUID REFERENCES creator_ident(id), index INTEGER, stub TEXT + PRIMARY KEY (release_rev, target_release_ident_id) ); CREATE TABLE file_release ( - id BIGSERIAL PRIMARY KEY, file_rev BIGSERIAL REFERENCES file_rev(id) NOT NULL, - target_release_ident_id UUID REFERENCES creator_ident(id) NOT NULL + target_release_ident_id UUID REFERENCES creator_ident(id) NOT NULL, + PRIMARY KEY (file_rev, target_release_ident_id) ); -- cgit v1.2.3