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/00007_AddStrainsObservations_up.sql
2014-10-23 16:14:34 -08:00

17 lines
462 B
SQL

-- bactdb
-- Matthew R Dillon
CREATE TABLE strainsobservations (
id BIGSERIAL NOT NULL,
strain_id BIGINT NOT NULL,
observations_id BIGINT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE,
updated_at TIMESTAMP WITH TIME ZONE,
deleted_at TIMESTAMP WITH TIME ZONE,
CONSTRAINT strainsobservations_pkey PRIMARY KEY (id),
FOREIGN KEY (strain_id) REFERENCES strains(id),
FOREIGN KEY (observations_id) REFERENCES observations(id)
);