-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
10 additions
and
0 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
web/backend/migrations/2024-02-12-153940_create_individuals_table/down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
-- This file should undo anything in `up.sql` | ||
DROP TABLE individuals; |
8 changes: 8 additions & 0 deletions
8
web/backend/migrations/2024-02-12-153940_create_individuals_table/up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
-- Your SQL goes here | ||
-- A migration to create the individuals table. | ||
-- An individual is a physically identifiable member of a given species. | ||
|
||
CREATE TABLE individuals ( | ||
id SERIAL PRIMARY KEY, | ||
item_id INTEGER NOT NULL REFERENCES items(id) ON DELETE CASCADE | ||
); |