This repository has been archived on 2025-03-30. You can view files and clone it, but cannot push or open issues or pull requests.
bactdb/datastore/migrations/00003_AddSpecies_up.sql
Matthew Dillon 7fe5566edf Create species, cleanup schema.
- create species
- species genus_id not null
2014-10-15 16:43:09 -08:00

15 lines
367 B
SQL

-- bactdb
-- Matthew Dillon
CREATE TABLE species (
id BIGSERIAL NOT NULL,
genusid BIGINT NOT NULL,
speciesname CHARACTER VARYING(100),
createdat TIMESTAMP WITH TIME ZONE,
updatedat TIMESTAMP WITH TIME ZONE,
deletedat TIMESTAMP WITH TIME ZONE,
CONSTRAINT species_pkey PRIMARY KEY (id),
FOREIGN KEY (genusid) REFERENCES genera(id)
);