Skip to content
This repository has been archived by the owner on Apr 19, 2022. It is now read-only.

Commit

Permalink
Bug fix on sql files
Browse files Browse the repository at this point in the history
  • Loading branch information
daviderill committed Jan 31, 2017
1 parent 4abe5d0 commit d08b537
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
8 changes: 6 additions & 2 deletions sql/example/ud/ud_98_sample_other.sql
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ INSERT INTO "inp_selector_sector" VALUES ('sector_01');
--INSERT INTO "plan_selector_psector" VALUES ('psector_01');




-- ----------------------------
-- Default values of rpt selectors
-- ----------------------------
INSERT INTO rpt_selector_result VALUES (1, 'ud_sample', 'postgres');
INSERT INTO rpt_selector_compare VALUES (1, 'ud_sample_hy', 'postgres');
SELECT pg_catalog.setval('"SCHEMA_NAME".rpt_selector_result_id_seq', 1, true);

6 changes: 4 additions & 2 deletions sql/example/ws/ws_98_sample_other.sql
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,7 @@ INSERT INTO inp_selector_sector VALUES ('sector_01');
-- ----------------------------
-- Default values of rpt selectors
-- ----------------------------
INSERT INTO rpt_selector_result VALUES (1, 'sample_epanet', 'postgres');
INSERT INTO rpt_selector_compare VALUES (1, 'sample_epanet_hy', 'postgres');
INSERT INTO rpt_selector_result VALUES (1, 'ws_sample', 'postgres');
INSERT INTO rpt_selector_compare VALUES (1, 'ws_sample_hy', 'postgres');
SELECT pg_catalog.setval('"SCHEMA_NAME".rpt_selector_result_id_seq', 1, true);

2 changes: 1 addition & 1 deletion sql/ud/ud_09_cuore_sys_fk.sql
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ ALTER TABLE "element_x_gully" ADD CONSTRAINT "element_x_gully_gully_id_fkey" FOR
--LTER TABLE "db_cat_table" DROP CONSTRAINT IF EXISTS "db_cat_table_db_cat_clientlayer_id_fkey";
--ALTER TABLE db_cat_table ADD CONSTRAINT "db_cat_table_db_cat_clientlayer_id_fkey" FOREIGN KEY ("db_cat_clientlayer_id") REFERENCES db_cat_clientlayer ("qgis_layer_id") ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE "db_cat_table_x_column" DROP CONSTRAINT IF EXISTS "db_cat_table_x_column_db_cat_table_fkey";
ALTER TABLE db_cat_table_x_column ADD CONSTRAINT db_cat_table_x_column_db_cat_table_fkey FOREIGN KEY (table_id) REFERENCES sample_epaswmm.db_cat_table (id) ON UPDATE CASCADE ON DELETE RESTRICT;
ALTER TABLE db_cat_table_x_column ADD CONSTRAINT db_cat_table_x_column_db_cat_table_fkey FOREIGN KEY (table_id) REFERENCES db_cat_table (id) ON UPDATE CASCADE ON DELETE RESTRICT;

ALTER TABLE "samplepoint" DROP CONSTRAINT IF EXISTS "samplepoint_featurecat_id_fkey";
ALTER TABLE "samplepoint" ADD CONSTRAINT "samplepoint_featurecat_id_fkey" FOREIGN KEY ("featurecat_id") REFERENCES "cat_feature" ("id") ON DELETE RESTRICT ON UPDATE CASCADE;
2 changes: 1 addition & 1 deletion sql/ws/ws_09_cuore_sys_fk.sql
Original file line number Diff line number Diff line change
Expand Up @@ -225,4 +225,4 @@ ALTER TABLE "samplepoint" DROP CONSTRAINT IF EXISTS "samplepoint_workcat_id_end_
ALTER TABLE "samplepoint" ADD CONSTRAINT "samplepoint_workcat_id_end_fkey" FOREIGN KEY ("workcat_id_end") REFERENCES "cat_work" ("id") ON DELETE RESTRICT ON UPDATE CASCADE;

ALTER TABLE "db_cat_table_x_column" DROP CONSTRAINT IF EXISTS db_cat_table_x_column_db_cat_table_fkey;
ALTER TABLE db_cat_table_x_column ADD CONSTRAINT db_cat_table_x_column_db_cat_table_fkey FOREIGN KEY (table_id) REFERENCES sample_epanet.db_cat_table (id) ON UPDATE CASCADE ON DELETE RESTRICT;
ALTER TABLE db_cat_table_x_column ADD CONSTRAINT db_cat_table_x_column_db_cat_table_fkey FOREIGN KEY (table_id) REFERENCES db_cat_table (id) ON UPDATE CASCADE ON DELETE RESTRICT;

0 comments on commit d08b537

Please # to comment.