# HG changeset patch # User Sascha L. Teichmann # Date 1348321551 0 # Node ID 948c7289fc4239d967487fe1bce49317a0537dbf # Parent 26084ee6d352917690399787b5478687aa20443c Backend: Added 'official_number' column to rivers table to model the 'Bundeswasserstrassen Identnummer'. flys-backend/trunk@5571 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 26084ee6d352 -r 948c7289fc42 flys-backend/ChangeLog --- 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 + + * 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 * src/main/java/de/intevation/flys/model/River.java, diff -r 26084ee6d352 -r 948c7289fc42 flys-backend/doc/schema/oracle.sql --- 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), diff -r 26084ee6d352 -r 948c7289fc42 flys-backend/doc/schema/postgresql.sql --- 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. diff -r 26084ee6d352 -r 948c7289fc42 flys-backend/src/main/java/de/intevation/flys/model/River.java --- 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;