Mercurial > dive4elements > river
comparison flys-backend/doc/schema/postgresql.sql @ 4776:20b6ebf23916
!!! FLYS backend schema change !!! Add column bfg_id column to discharge_tables.
Alter existing databases with
alter table discharge_tables add column bfg_id varchar(50);
This column is now used to synchronize FLYS with the AFT database.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Sat, 05 Jan 2013 15:05:51 +0100 |
parents | 83a42e6a562d |
children | b79eb203032d |
comparison
equal
deleted
inserted
replaced
4775:d9f1202cef78 | 4776:20b6ebf23916 |
---|---|
143 | 143 |
144 CREATE TABLE discharge_tables ( | 144 CREATE TABLE discharge_tables ( |
145 id int PRIMARY KEY NOT NULL, | 145 id int PRIMARY KEY NOT NULL, |
146 gauge_id int NOT NULL REFERENCES gauges(id), | 146 gauge_id int NOT NULL REFERENCES gauges(id), |
147 description VARCHAR(256) NOT NULL, | 147 description VARCHAR(256) NOT NULL, |
148 bfg_id VARCHAR(50), | |
148 kind int NOT NULL DEFAULT 0, | 149 kind int NOT NULL DEFAULT 0, |
149 time_interval_id int REFERENCES time_intervals(id) | 150 time_interval_id int REFERENCES time_intervals(id) |
150 | 151 |
151 -- TODO: better checks | 152 -- TODO: better checks |
152 -- UNIQUE (gauge_id, kind, time_interval_id) | 153 -- UNIQUE (gauge_id, kind, time_interval_id) |