Revision 3937
Added by Aaron Marcuse-Kubitza over 12 years ago
schemas/vegbien.my.sql | ||
---|---|---|
2114 | 2114 |
-- |
2115 | 2115 |
|
2116 | 2116 |
CREATE TABLE specimenreplicate ( |
2117 |
taxonoccurrence_id int(11) NOT NULL, |
|
2118 | 2117 |
specimenreplicate_id int(11) NOT NULL, |
2119 | 2118 |
datasource_id int(11) NOT NULL, |
2120 | 2119 |
sourceaccessioncode text, |
... | ... | |
2127 | 2126 |
specimen_id int(11), |
2128 | 2127 |
accessioncode text |
2129 | 2128 |
); |
2130 |
ALTER TABLE specimenreplicate |
|
2131 |
ADD CONSTRAINT specimenreplicate_taxonoccurrence_id FOREIGN KEY (taxonoccurrence_id) REFERENCES taxonoccurrence(taxonoccurrence_id) ON UPDATE CASCADE ON DELETE CASCADE; |
|
2132 | 2129 |
|
2133 | 2130 |
|
2134 |
|
|
2135 | 2131 |
-- |
2136 | 2132 |
-- Name: TABLE specimenreplicate; Type: COMMENT; Schema: public; Owner: - |
2137 | 2133 |
-- |
... | ... | |
3524 | 3520 |
|
3525 | 3521 |
ALTER TABLE taxonoccurrence |
3526 | 3522 |
ADD CONSTRAINT taxonoccurrence_pkey PRIMARY KEY (taxonoccurrence_id); |
3527 |
ALTER TABLE taxondetermination |
|
3528 |
ADD CONSTRAINT taxondetermination_taxonoccurrence_id FOREIGN KEY (taxonoccurrence_id) REFERENCES taxonoccurrence(taxonoccurrence_id) ON UPDATE CASCADE ON DELETE CASCADE; |
|
3529 | 3523 |
|
3530 | 3524 |
|
3531 |
|
|
3532 | 3525 |
-- |
3533 | 3526 |
-- Name: telephone_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: |
3534 | 3527 |
-- |
schemas/filter_ERD.csv | ||
---|---|---|
2 | 2 |
,,"fkeys to heavily-linked tables" |
3 | 3 |
"^ALTER TABLE (?!reference)\b[^;]*\bFOREIGN KEY\b[^;]*\bREFERENCES reference\b[^;]*;",, |
4 | 4 |
"^ALTER TABLE (?!party|address|telephone)\b[^;]*\bFOREIGN KEY\b[^;]*\bREFERENCES party\b[^;]*;",, |
5 |
,,"specimenreplicate inheritance" |
|
6 |
"^(CREATE TABLE specimenreplicate \()([^;]*\)\s*;)","\1 |
|
7 |
taxonoccurrence_id int(11) NOT NULL,\2 |
|
8 |
ALTER TABLE specimenreplicate |
|
9 |
ADD CONSTRAINT specimenreplicate_taxonoccurrence_id FOREIGN KEY (taxonoccurrence_id) REFERENCES taxonoccurrence(taxonoccurrence_id) ON UPDATE CASCADE ON DELETE CASCADE; |
|
10 |
", |
|
11 |
"^ALTER TABLE taxonoccurrence |
|
12 |
ADD CONSTRAINT taxonoccurrence_pkey PRIMARY KEY \(taxonoccurrence_id\);","\g<0> |
|
13 |
ALTER TABLE taxondetermination |
|
14 |
ADD CONSTRAINT taxondetermination_taxonoccurrence_id FOREIGN KEY (taxonoccurrence_id) REFERENCES taxonoccurrence(taxonoccurrence_id) ON UPDATE CASCADE ON DELETE CASCADE; |
|
15 |
", |
Also available in: Unified diff
schemas/filter_ERD.csv: Removed no longer applicable specimenreplicate inheritance filters