Mercurial > dive4elements > river
changeset 3946:948c7289fc42
Backend: Added 'official_number' column to rivers table to model the 'Bundeswasserstrassen Identnummer'.
flys-backend/trunk@5571 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Sat, 22 Sep 2012 13:45:51 +0000 |
parents | 26084ee6d352 |
children | 371e38af6f79 |
files | flys-backend/ChangeLog flys-backend/doc/schema/oracle.sql flys-backend/doc/schema/postgresql.sql flys-backend/src/main/java/de/intevation/flys/model/River.java |
diffstat | 4 files changed, 26 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-backend/ChangeLog Fri Sep 21 10:47:32 2012 +0000 +++ b/flys-backend/ChangeLog Sat Sep 22 13:45:51 2012 +0000 @@ -1,3 +1,12 @@ +2012-09-22 Sascha L. Teichmann <sascha.teichmann@intevation.de> + + * doc/schema/postgresql.sql, doc/schema/oracle.sql: + Addes column 'official_number' to rivers table. + This should contain the 'Bundeswasserstrassen Identnummer'. + + * src/main/java/de/intevation/flys/model/River.java: + Added new column to Hibernate model. + 2012-09-21 Björn Ricks <bjoern.ricks@intevation.de> * src/main/java/de/intevation/flys/model/River.java,
--- a/flys-backend/doc/schema/oracle.sql Fri Sep 21 10:47:32 2012 +0000 +++ b/flys-backend/doc/schema/oracle.sql Sat Sep 22 13:45:51 2012 +0000 @@ -249,6 +249,7 @@ CREATE TABLE rivers ( id NUMBER(38,0) NOT NULL, + official_number NUMBER(38,0), km_up NUMBER(38,0), name VARCHAR2(255), wst_unit_id NUMBER(38,0),
--- a/flys-backend/doc/schema/postgresql.sql Fri Sep 21 10:47:32 2012 +0000 +++ b/flys-backend/doc/schema/postgresql.sql Sat Sep 22 13:45:51 2012 +0000 @@ -11,10 +11,11 @@ CREATE SEQUENCE RIVERS_ID_SEQ; CREATE TABLE rivers ( - id int PRIMARY KEY NOT NULL, - name VARCHAR(256) NOT NULL UNIQUE, - km_up BOOLEAN NOT NULL DEFAULT true, - wst_unit_id int NOT NULL REFERENCES units(id) + id int PRIMARY KEY NOT NULL, + official_number int8 UNIQUE, + name VARCHAR(256) NOT NULL UNIQUE, + km_up BOOLEAN NOT NULL DEFAULT true, + wst_unit_id int NOT NULL REFERENCES units(id) ); -- Bruecke, Haefen, etc.
--- a/flys-backend/src/main/java/de/intevation/flys/model/River.java Fri Sep 21 10:47:32 2012 +0000 +++ b/flys-backend/src/main/java/de/intevation/flys/model/River.java Sat Sep 22 13:45:51 2012 +0000 @@ -48,6 +48,8 @@ private Integer id; + private Long officialNumber; + private String name; private boolean kmUp; @@ -73,6 +75,15 @@ this.id = id; } + @Column(name = "official_number") + public Long getOfficialNumber() { + return officialNumber; + } + + public void setOfficialNumber(Long officialNumber) { + this.officialNumber = officialNumber; + } + @Column(name = "name") public String getName() { return name;