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

17 lines
457 B
SQL

-- bactdb
-- Matthew R Dillon
CREATE TABLE numerical_measurements (
id BIGSERIAL NOT NULL,
measurement_value NUMERIC(6, 4) NOT NULL,
confidence_interval NUMERIC(6,4) NULL,
unit_type_id BIGINT,
created_at TIMESTAMP WITH TIME ZONE,
updated_at TIMESTAMP WITH TIME ZONE,
deleted_at TIMESTAMP WITH TIME ZONE,
CONSTRAINT numerical_measurements_pkey PRIMARY KEY (id),
FOREIGN KEY (unit_type_id) REFERENCES unit_types(id)
);