diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2018-05-15 18:11:56 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2018-05-15 18:11:56 -0700 |
commit | 69e9497686a05c8b27d5496e5ff66664c785c25b (patch) | |
tree | 6742da072fb1e6a94e82258a2a06dd78f58b8a93 /rust/migrations/2018-05-12-001226_init/up.sql | |
parent | 3dad2832c8d481bff03fd4f2e6baa9f76ed0f588 (diff) | |
download | fatcat-69e9497686a05c8b27d5496e5ff66664c785c25b.tar.gz fatcat-69e9497686a05c8b27d5496e5ff66664c785c25b.zip |
set correct primary keys on many-to-many tables
Diffstat (limited to 'rust/migrations/2018-05-12-001226_init/up.sql')
-rw-r--r-- | rust/migrations/2018-05-12-001226_init/up.sql | 6 |
1 files changed, 3 insertions, 3 deletions
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) ); |