Mercurial > dive4elements > river
comparison flys-backend/doc/schema/postgresql-migrate-dami.sql @ 5068:df090e461c30 dami
Add some missed changes to the migrate-dami.sql script
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Wed, 20 Feb 2013 18:30:05 +0100 |
parents | 2837b11cdb13 |
children | e4cc9aebfcf1 |
comparison
equal
deleted
inserted
replaced
5067:be27a2bb7ca2 | 5068:df090e461c30 |
---|---|
1 DROP table hws; | 1 DROP table hws; |
2 DROP sequence HWS_ID_SEQ; | 2 DROP sequence HWS_ID_SEQ; |
3 DROP table lines; | |
4 DROP sequence LINES_ID_SEQ; | |
5 DROP table catchment; | |
6 DROP sequence CATCHMENT_ID_SEQ; | |
7 | |
3 -- Static lookup tables for Hochwasserschutzanlagen | 8 -- Static lookup tables for Hochwasserschutzanlagen |
4 CREATE TABLE hws_kinds ( | 9 CREATE TABLE hws_kinds ( |
5 id int PRIMARY KEY NOT NULL, | 10 id int PRIMARY KEY NOT NULL, |
6 kind VARCHAR(64) NOT NULL | 11 kind VARCHAR(64) NOT NULL |
7 ); | 12 ); |
106 | 111 |
107 ALTER TABLE hws_points ALTER COLUMN id SET DEFAULT NEXTVAL('HWS_POINTS_ID_SEQ'); | 112 ALTER TABLE hws_points ALTER COLUMN id SET DEFAULT NEXTVAL('HWS_POINTS_ID_SEQ'); |
108 | 113 |
109 ALTER TABLE hydr_boundaries_poly ADD COLUMN sectie INT REFERENCES sectie_kinds(id); | 114 ALTER TABLE hydr_boundaries_poly ADD COLUMN sectie INT REFERENCES sectie_kinds(id); |
110 ALTER TABLE hydr_boundaries_poly ADD COLUMN sobek INT REFERENCES sobek_kinds(id); | 115 ALTER TABLE hydr_boundaries_poly ADD COLUMN sobek INT REFERENCES sobek_kinds(id); |
116 ALTER TABLE hydr_boundaries_poly ADD FOREIGN KEY (kind) REFERENCES boundary_kinds(id); | |
111 ALTER TABLE hydr_boundaries ADD COLUMN sectie INT REFERENCES sectie_kinds(id); | 117 ALTER TABLE hydr_boundaries ADD COLUMN sectie INT REFERENCES sectie_kinds(id); |
112 ALTER TABLE hydr_boundaries ADD COLUMN sobek INT REFERENCES sobek_kinds(id); | 118 ALTER TABLE hydr_boundaries ADD COLUMN sobek INT REFERENCES sobek_kinds(id); |
113 ALTER TABLE hydr_boundaries ADD FOREIGN KEY (kind) REFERENCES boundary_kinds(id); | 119 ALTER TABLE hydr_boundaries ADD FOREIGN KEY (kind) REFERENCES boundary_kinds(id); |
114 ALTER TABLE dem ADD COLUMN srid INT NOT NULL; | 120 ALTER TABLE dem ADD COLUMN srid INT NOT NULL; |
115 | 121 |