Skip to content

Commit

Permalink
Merge pull request #447 from OBOAcademy/linking-data-fk
Browse files Browse the repository at this point in the history
Linking Data fixes
  • Loading branch information
jamesaoverton authored Oct 4, 2023
2 parents 42c2ca4 + d9d9539 commit 7adc671
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions docs/tutorial/linking-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ The next thing is to tackle the terminology.
First I'll just make a list of the terms I'm using
from the relevant columns in `build/term.tsv`:

```sh #collect
```sh
$ sqlite3 build/data.db << EOF > build/term.tsv
SELECT investigator FROM data
UNION SELECT species FROM data
Expand Down Expand Up @@ -580,14 +580,14 @@ CREATE TABLE data(
disease TEXT,
qualifier TEXT,
comment TEXT,
FOREIGN KEY(investigator) REFERENCES term(investigator),
FOREIGN KEY(species) REFERENCES term(species),
FOREIGN KEY(strain) REFERENCES term(strain),
FOREIGN KEY(sex) REFERENCES term(sex),
FOREIGN KEY(protocol) REFERENCES term(protocol),
FOREIGN KEY(organ) REFERENCES term(organ),
FOREIGN KEY(disease) REFERENCES term(disease),
FOREIGN KEY(qualifier) REFERENCES term(qualifier)
FOREIGN KEY(investigator) REFERENCES term(id),
FOREIGN KEY(species) REFERENCES term(id),
FOREIGN KEY(strain) REFERENCES term(id),
FOREIGN KEY(sex) REFERENCES term(id),
FOREIGN KEY(protocol) REFERENCES term(id),
FOREIGN KEY(organ) REFERENCES term(id),
FOREIGN KEY(disease) REFERENCES term(id),
FOREIGN KEY(qualifier) REFERENCES term(id)
);

-- copy from data_csv to data
Expand Down

0 comments on commit 7adc671

Please sign in to comment.