Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V1.3.3.012 - Add contact_dbxref table #131

Open
wants to merge 4 commits into
base: 1.4
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions chado/migrations/V1.3.3.012_add_contact_dbxref_table.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
CREATE TABLE contact_dbxref (
contact_dbxref_id BIGSERIAL NOT NULL,
contact_id BIGINT NOT NULL,
dbxref_id BIGINT NOT NULL,
is_current INT NOT NULL,
PRIMARY KEY (contact_dbxref_id),
FOREIGN KEY (dbxref_id) REFERENCES dbxref (dbxref_id) ON DELETE CASCADE INITIALLY DEFERRED,
CONSTRAINT contact_dbxref_contact_id_fkey FOREIGN KEY (contact_id) REFERENCES contact (contact_id) ON DELETE CASCADE INITIALLY DEFERRED,
);

create index contact_dbxref_idx1 on contact_dbxref (contact_id);
create index contact_dbxref_idx2 on contact_dbxref (dbxref_id);

COMMENT ON TABLE contact_dbxref IS 'A contact_dbxref is a dbxref associated with a contact.
A contact can have many dbxrefs associated with it, and a dbxref can be associated with many contacts.'
Loading