-﻿-- Table: calc_renpass_gis.renpass_gis_source
-
+﻿/* renpass_gis Datamodel V1
+
+
+
+
+*/
+
+
+-- Sequence: calc_renpass_gis.renpass_gis_results_id_seq
+-- DROP SEQUENCE calc_renpass_gis.renpass_gis_results_id_seq;
+
+CREATE SEQUENCE calc_renpass_gis.renpass_gis_results_id_seq START 1;
+
+-- Sequence: calc_renpass_gis.renpass_gis_scenario_id_seq
+-- DROP SEQUENCE calc_renpass_gis.renpass_gis_scenario_id_seq;
+
+CREATE SEQUENCE calc_renpass_gis.renpass_gis_scenario_id_seq START 1;
+
+-- Sequence: calc_renpass_gis.renpass_gis_storage_id_seq
+-- DROP SEQUENCE calc_renpass_gis.renpass_gis_storage_id_seq;
+
+CREATE SEQUENCE calc_renpass_gis.renpass_gis_storage_id_seq START 1;
+
+-- Sequence: calc_renpass_gis.renpass_gis_linear_transformer_id_seq
+-- DROP SEQUENCE calc_renpass_gis.renpass_gis_linear_transformer_id_seq;
+
+CREATE SEQUENCE calc_renpass_gis.renpass_gis_linear_transformer_id_seq START 1;
+
+-- Sequence: calc_renpass_gis.renpass_gis_sink_id_seq
+-- DROP SEQUENCE calc_renpass_gis.renpass_gis_sink_id_seq;
+CREATE SEQUENCE calc_renpass_gis.renpass_gis_sink_id_seq START 1;
+
+-- Sequence: calc_renpass_gis.renpass_gis_source_id_seq
+-- DROP SEQUENCE calc_renpass_gis.renpass_gis_source_id_seq;
+CREATE SEQUENCE calc_renpass_gis.renpass_gis_source_id_seq START 1;
+
+
+     
+-- Table: calc_renpass_gis.renpass_gis_source
 -- DROP TABLE calc_renpass_gis.renpass_gis_source;
 
 CREATE TABLE calc_renpass_gis.renpass_gis_source
 (
-  id bigint NOT NULL,
+  id bigint NOT NULL DEFAULT nextval('calc_renpass_gis.renpass_gis_source_id_seq'),
   scenario_id integer,
   label character varying(250),
   source character varying(250),

CREATE TABLE calc_renpass_gis.renpass_gis_scenario
(

  id integer,
  name character varying(250)  UNIQUE NOT NULL,
  CONSTRAINT renpass_gis_scenario_pkey PRIMARY KEY (id)
)


CREATE TABLE calc_renpass_gis.renpass_gis_sink
(
  id bigint NOT NULL DEFAULT nextval('calc_renpass_gis.renpass_gis_sink_id_seq'),
  scenario_id integer,
  label character varying(250),
  source character varying(250),
