Skip to content

Commit

Permalink
Alter table, add missing columns #4
Browse files Browse the repository at this point in the history
  • Loading branch information
4lm committed Jan 31, 2019
1 parent bd57ac0 commit 8e0fa4d
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions database_setup/reeem_db_setup_times_paneu.sql
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ COMMENT ON TABLE model_draft.reeem_times_paneu_input IS
{"name": "Ludee", "email": "none", "date": "2017-11-02", "comment": "Update structure"},
{"name": "Ludee", "email": "none", "date": "2017-11-06", "comment": "Include pathway"},
{"name": "Ludee", "email": "none", "date": "2018-01-30", "comment": "New naming structure"},
{"name": "Ludee", "email": "none", "date": "2018-02-27", "comment": "Simplify structure"} ],
{"name": "Ludee", "email": "none", "date": "2018-02-27", "comment": "Simplify structure"},
{"name": "4lm", "email": "none", "date": "2019-01-31", "comment": "Alter table, add missing columns"} ],
"resources": [
{"name": "model_draft.reeem_times_paneu_input",
"format": "PostgreSQL",
Expand All @@ -97,6 +98,11 @@ COMMENT ON TABLE model_draft.reeem_times_paneu_input IS
{"name": "source", "description": "Data source", "unit": "none"} ] } ],
"metadata_version": "1.3"}';

-- Add missing columns
ALTER TABLE model_draft.reeem_times_paneu_input
ADD COLUMN "schema" text,
ADD COLUMN "field" text;

-- scenario log (project,version,io,schema_name,table_name,script_name,comment)
SELECT scenario_log('REEEM','v0.2.0','setup','model_draft','reeem_times_paneu_input','reeem_db_setup_times_paneu.sql',' ');

Expand Down Expand Up @@ -157,7 +163,8 @@ COMMENT ON TABLE model_draft.reeem_times_paneu_output IS
{"name": "Ludee", "email": "none", "date": "2018-01-30", "comment": "New naming structure"},
{"name": "Ludee", "email": "none", "date": "2018-02-27", "comment": "Simplify structure"},
{"name": "Ludee", "email": "none", "date": "2018-03-15", "comment": "Add license"},
{"name": "Ludee", "email": "none", "date": "2018-10-08", "comment": "Add source"}],
{"name": "Ludee", "email": "none", "date": "2018-10-08", "comment": "Add source"},
{"name": "4lm", "email": "none", "date": "2019-01-31", "comment": "Alter table, add missing columns"}],
"resources": [
{"name": "model_draft.reeem_times_paneu_output",
"format": "PostgreSQL",
Expand All @@ -179,5 +186,10 @@ COMMENT ON TABLE model_draft.reeem_times_paneu_output IS
{"name": "updated", "description": "Timestamp", "unit": "none"} ] } ],
"metadata_version": "1.3"}';

-- Add missing columns
ALTER TABLE model_draft.reeem_times_paneu_output
ADD COLUMN "schema" text,
ADD COLUMN "field" text;

-- scenario log (project,version,io,schema_name,table_name,script_name,comment)
SELECT scenario_log('REEEM','v0.2.0','setup','model_draft','reeem_times_paneu_output','reeem_db_setup_times_paneu.sql',' ');

0 comments on commit 8e0fa4d

Please sign in to comment.