
router/routes.go router/api.go models/species_test.go models/species.go models/client.go datastore/migrations/addspecies.sql datastore/migrations/dropspecies.sql datastore/species_test.go datastore/species.go datastore/datastore.go api/species_test.go api/species.go api/handler.go
15 lines
358 B
SQL
15 lines
358 B
SQL
-- bactdb
|
|
-- Matthew Dillon
|
|
|
|
CREATE TABLE species (
|
|
id BIGSERIAL NOT NULL,
|
|
genusid BIGINT,
|
|
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)
|
|
);
|