# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller@intevation.de>
# Date 1375261811 -7200
# Node ID df402b3e02810fe4a452380253c79de392eb6fee
# Parent  1e2dfd91274d8529b99d24141ea3cf22cc1fcc73
minfo-schema-change/issue1393: add kind column to sediment_yield table.

To change existing databases, issue following sql command:

ALTER TABLE sediment_yield ADD kind INT DEFAULT 0;

For oracles it might look like

ALTER TABLE sediment_yield ADD kind NUMBER(38,0) DEFAULT 0;

.

diff -r 1e2dfd91274d -r df402b3e0281 backend/doc/schema/oracle-minfo.sql
--- a/backend/doc/schema/oracle-minfo.sql	Wed Jul 31 11:07:48 2013 +0200
+++ b/backend/doc/schema/oracle-minfo.sql	Wed Jul 31 11:10:11 2013 +0200
@@ -260,6 +260,7 @@
     unit_id             NUMBER(38,0) NOT NULL,
     time_interval_id    NUMBER(38,0) NOT NULL,
     description         VARCHAR(256),
+    kind                NUMBER(38,0),
     PRIMARY KEY (id),
     CONSTRAINT fk_sy_river_id FOREIGN KEY (river_id) REFERENCES rivers(id) ON DELETE CASCADE,
     CONSTRAINT fk_sy_grain_fraction_id FOREIGN KEY (grain_fraction_id) REFERENCES grain_fraction(id),
diff -r 1e2dfd91274d -r df402b3e0281 backend/doc/schema/postgresql-minfo.sql
--- a/backend/doc/schema/postgresql-minfo.sql	Wed Jul 31 11:07:48 2013 +0200
+++ b/backend/doc/schema/postgresql-minfo.sql	Wed Jul 31 11:10:11 2013 +0200
@@ -260,6 +260,7 @@
     unit_id             int NOT NULL,
     time_interval_id    int NOT NULL,
     description         VARCHAR(256),
+    kind                int,
     PRIMARY KEY (id),
     CONSTRAINT fk_sy_river_id FOREIGN KEY (river_id) REFERENCES rivers(id) ON DELETE CASCADE,
     CONSTRAINT fk_sy_grain_fraction_id FOREIGN KEY (grain_fraction_id) REFERENCES grain_fraction(id),