changeset 4628:28999c7c0c18

Fill single and multi into survey type table.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 10 Oct 2019 17:10:14 +0200
parents 8f38a1bb9b79
children 7acb03e8a737
files schema/gemma.sql schema/updates/1301/01.fill-survey-types.sql schema/version.sql
diffstat 3 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/schema/gemma.sql	Thu Oct 10 16:13:11 2019 +0200
+++ b/schema/gemma.sql	Thu Oct 10 17:10:14 2019 +0200
@@ -325,6 +325,8 @@
     survey_type varchar PRIMARY KEY
 );
 
+INSERT INTO survey_types (survey_type) VALUES ('single'), ('multi');
+
 CREATE TABLE coverage_types (
     coverage_type varchar PRIMARY KEY
 );
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/schema/updates/1301/01.fill-survey-types.sql	Thu Oct 10 17:10:14 2019 +0200
@@ -0,0 +1,3 @@
+INSERT INTO survey_types (survey_type) VALUES ('single'), ('multi')
+  ON CONFLICT (survey_type) DO NOTHING;
+
--- a/schema/version.sql	Thu Oct 10 16:13:11 2019 +0200
+++ b/schema/version.sql	Thu Oct 10 17:10:14 2019 +0200
@@ -1,1 +1,1 @@
-INSERT INTO gemma_schema_version(version) VALUES (1300);
+INSERT INTO gemma_schema_version(version) VALUES (1301);