Skip to content

Commit

Permalink
Merge pull request #59 from Indicia-Team/hotfix-licences
Browse files Browse the repository at this point in the history
Hotfix licences
  • Loading branch information
johnvanbreda committed Dec 3, 2015
2 parents 976db85 + ed287db commit f3841e7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
ALTER TABLE groups ADD COLUMN licence_id integer;
COMMENT ON COLUMN groups.licence_id IS 'ID of the licence that is associated with this group and the records submitted to it.';

ALTER TABLE groups
ADD CONSTRAINT fk_group_licence FOREIGN KEY (licence_id) REFERENCES licences (id)
ON UPDATE NO ACTION ON DELETE NO ACTION;
COMMENT ON CONSTRAINT fk_groups_licence ON groups
IS 'The records submitted to each group are licenced according to the linked record.';
CREATE INDEX ix_group_licence
ON groups(licence_id);
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ ALTER TABLE samples
ON UPDATE NO ACTION ON DELETE NO ACTION;
COMMENT ON CONSTRAINT fk_sample_licence ON samples
IS 'The records within each sample are licenced according to the linked record.';
CREATE INDEX fki_sample_licence
CREATE INDEX ix_sample_licence
ON samples(licence_id);

0 comments on commit f3841e7

Please sign in to comment.