Skip to content

Commit

Permalink
Merge branch 'master' into disclaimer
Browse files Browse the repository at this point in the history
  • Loading branch information
fieranmason committed Dec 12, 2017
2 parents ca61ee2 + b704a62 commit b2299e2
Show file tree
Hide file tree
Showing 7 changed files with 76 additions and 13,953 deletions.
130 changes: 48 additions & 82 deletions database/code-tables/clear-tables.sql
Original file line number Diff line number Diff line change
@@ -1,122 +1,88 @@
\echo 'Starting to clear tables procedure...'

-- Reset tables

\echo '... clearing gwells_screen data table'
TRUNCATE TABLE gwells_screen CASCADE;

\echo '... clearing gwells_activity_submission data table'
TRUNCATE TABLE gwells_activity_submission CASCADE;

\echo '... clearing gwells_well data table'
TRUNCATE TABLE gwells_well CASCADE;

\echo '... clearing gwells_casing data table'
TRUNCATE TABLE gwells_casing;

\echo '... clearing gwells_lithology_description data table'
TRUNCATE TABLE gwells_lithology_description;

\echo '... clearing gwells_lithology_colour data table'
TRUNCATE TABLE gwells_lithology_colour CASCADE;

\echo '... clearing gwells_lithology_hardness data table'
TRUNCATE TABLE gwells_lithology_hardness CASCADE;

\echo '... clearing gwells_activity_submission data table'
TRUNCATE TABLE gwells_activity_submission CASCADE;
\echo '... clearing gwells_screen data table'
TRUNCATE TABLE gwells_screen CASCADE;
\echo '... clearing gwells_intended_water_use data table'
TRUNCATE TABLE gwells_intended_water_use CASCADE;

\echo '... clearing gwells_well_class data table'
TRUNCATE TABLE gwells_well_class CASCADE;

\echo '... clearing gwells_well_subclass data table'
TRUNCATE TABLE gwells_well_subclass CASCADE;

\echo '... clearing gwells_province_state data table'
TRUNCATE TABLE gwells_province_state CASCADE;

\echo '... clearing gwells_well_yield_unit data table'
TRUNCATE TABLE gwells_well_yield_unit CASCADE;

\echo '... clearing gwells_drilling_method data table'
TRUNCATE TABLE gwells_drilling_method CASCADE;

\echo '... clearing gwells_ground_elevation_method data table'
TRUNCATE TABLE gwells_ground_elevation_method CASCADE;

\echo '...clearing gwells_decommission_method'
TRUNCATE TABLE gwells_decommission_method CASCADE;
\echo '... clearing gwells_lithology_description data table'
TRUNCATE TABLE gwells_lithology_description;
\echo '... clearing gwells_lithology_colour data table'
TRUNCATE TABLE gwells_lithology_colour CASCADE;
\echo '... clearing gwells_lithology_hardness data table'
TRUNCATE TABLE gwells_lithology_hardness CASCADE;
\echo '... clearing gwells_land_district data table'
TRUNCATE TABLE gwells_land_district CASCADE;
\echo '...clearing gwells_lithology_material'
TRUNCATE TABLE gwells_lithology_material CASCADE;
\echo '...clearing gwells_lithology_description_code'
TRUNCATE TABLE gwells_lithology_description_code CASCADE;
\echo '...clearing gwells_liner_material'
TRUNCATE TABLE gwells_liner_material CASCADE;
\echo '...clearing gwells_surface_seal_material'
TRUNCATE TABLE gwells_surface_seal_material CASCADE;
\echo '...clearing gwells_surface_seal_method'
TRUNCATE TABLE gwells_surface_seal_method CASCADE;
\echo '...clearing gwells_surface_seal_method'
TRUNCATE TABLE gwells_surface_seal_method CASCADE;
\echo '...clearing gwells_surface_seal_material'
TRUNCATE TABLE gwells_surface_seal_material CASCADE;
\echo '... clearing gwells_casing_material'
TRUNCATE TABLE gwells_casing_material CASCADE;
\echo '... clearing gwells_yield_estimation_method'
TRUNCATE TABLE gwells_yield_estimation_method CASCADE;
\echo '... clearing gwells_screen_assembly_type'
TRUNCATE TABLE gwells_screen_assembly_type CASCADE;
\echo '... clearing gwells_bcgs_number'
TRUNCATE TABLE gwells_bcgs_number CASCADE;
\echo '... clearing gwells_development_method'
TRUNCATE TABLE gwells_development_method CASCADE;

\echo '... clearing gwells_well_yield_unit data table'
TRUNCATE TABLE gwells_well_yield_unit CASCADE;
\echo '... clearing gwells_ground_elevation_method data table'
TRUNCATE TABLE gwells_ground_elevation_method CASCADE;
\echo '... clearing gwells_well_status data table'
TRUNCATE TABLE gwells_well_status CASCADE;

\echo '... clearing gwells_licenced_status data table'
TRUNCATE TABLE gwells_licenced_status CASCADE;

\echo '... clearing gwells_drilling_company data table'
TRUNCATE TABLE gwells_drilling_company CASCADE;

\echo '... clearing gwells_screen_intake_method'
TRUNCATE TABLE gwells_screen_intake_method CASCADE;

\echo '... clearing gwells_drilling_company data table'
TRUNCATE TABLE gwells_drilling_company CASCADE;
\echo '... clearing gwells_screen_type'
TRUNCATE TABLE gwells_screen_type CASCADE;

\echo '... clearing gwells_screen_material'
TRUNCATE TABLE gwells_screen_material CASCADE;

\echo '... clearing gwells_screen_opening'
TRUNCATE TABLE gwells_screen_opening CASCADE;

\echo '... clearing gwells_screen_bottom'
TRUNCATE TABLE gwells_screen_bottom CASCADE;

\echo '... clearing gwells_screen_assembly_type'
TRUNCATE TABLE gwells_screen_assembly_type CASCADE;

\echo '... clearing gwells_bcgs_number'
TRUNCATE TABLE gwells_bcgs_number CASCADE;

\echo '... clearing gwells_development_method'
TRUNCATE TABLE gwells_development_method CASCADE;

\echo '... clearing gwells_yield_estimation_method'
TRUNCATE TABLE gwells_yield_estimation_method CASCADE;

/*
\echo '... clearing gwells_casing data table'
TRUNCATE TABLE gwells_casing;
\echo '... clearing gwells_well_subclass data table'
TRUNCATE TABLE gwells_well_subclass CASCADE;
\echo '... clearing gwells_production_data'
TRUNCATE TABLE gwells_production_data CASCADE;

\echo '... clearing gwells_casing_material'
TRUNCATE TABLE gwells_casing_material CASCADE;

\echo '... clearing gwells_casing'
TRUNCATE TABLE gwells_casing CASCADE;

\echo '...clearing gwells_surface_seal_method'
TRUNCATE TABLE gwells_surface_seal_method CASCADE;

\echo '...clearing gwells_surface_seal_material'
TRUNCATE TABLE gwells_surface_seal_material CASCADE;

\echo '...clearing gwells_liner_material'
TRUNCATE TABLE gwells_liner_material CASCADE;

\echo '...clearing gwells_perforation'
TRUNCATE TABLE gwells_perforation CASCADE;
\echo '...clearing gwells_surface_seal_material'
TRUNCATE TABLE gwells_surface_seal_material CASCADE;

\echo '...clearing gwells_surface_seal_method'
TRUNCATE TABLE gwells_surface_seal_method CASCADE;

\echo '...clearing gwells_lithology_material'
TRUNCATE TABLE gwells_lithology_material CASCADE;

\echo '...clearing gwells_lithology_description_code'
TRUNCATE TABLE gwells_lithology_description_code CASCADE;

\echo '...clearing gwells_decommission_method'
TRUNCATE TABLE gwells_decommission_method CASCADE;
*/

\echo 'Finished clearing tables.'
4 changes: 0 additions & 4 deletions database/code-tables/data-load-static-codes.sql
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,6 @@
\echo '... loading gwells_screen_assembly_type code table'
\copy gwells_screen_assembly_type (who_created,when_created,who_updated,when_updated,screen_assembly_type_guid,screen_assembly_type_code,description,is_hidden,sort_order) from 'gwells_screen_assembly_type.csv' with header delimiter ',' CSV ;

--BCGS NUMBER
\echo '... loading gwells_bcgs_number code table'
\copy gwells_bcgs_number (who_created,when_created,who_updated,when_updated,bcgs_id,bcgs_number) from 'gwells_bcgs_number.csv' with header delimiter ',' CSV ;

--DEVELOPMENT METHOD
\echo '... loading gwells_development_method code table'
\copy gwells_development_method (who_created,when_created,who_updated,when_updated,development_method_guid,development_method_code,description,is_hidden,sort_order ) from 'gwells_development_method.csv' with header delimiter ',' CSV ;
Expand Down
Loading

0 comments on commit b2299e2

Please sign in to comment.