Skip to content

Commit

Permalink
Create DB schemas before loading the data
Browse files Browse the repository at this point in the history
  • Loading branch information
mpaivinen-bcgov committed Sep 27, 2023
1 parent cb28d87 commit d12ba64
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ clean_db:
$(PSQL_CMD) -c "CREATE EXTENSION IF NOT EXISTS ltree"
$(PSQL_CMD) -c "CREATE EXTENSION IF NOT EXISTS intarray"
$(PSQL_CMD) -c "CREATE SCHEMA IF NOT EXISTS whse_basemapping"
$(PSQL_CMD) -c "CREATE SCHEMA IF NOT EXISTS WHSE_WATER_MANAGEMENT"
$(PSQL_CMD) -c "CREATE SCHEMA IF NOT EXISTS nr_water_notations"
$(PSQL_CMD) -c 'CREATE SCHEMA IF NOT EXISTS usgs'
$(PSQL_CMD) -c 'CREATE SCHEMA IF NOT EXISTS hydrosheds'
$(PSQL_CMD) -c "CREATE SCHEMA IF NOT EXISTS postgisftw" # for fwapg featureserv functions
Expand Down Expand Up @@ -65,7 +67,7 @@ clean_db:
touch $@

.make/gw_aquifers_classification_svw: .make/db data/fwa.gpkg
$(PSQL_CMD) -c "drop table if exists whse_water_management.gw_aquifers_classification_svw"
$(PSQL_CMD) -c "drop table if exists WHSE_WATER_MANAGEMENT.GW_AQUIFERS_CLASSIFICATION_SVW"
ogr2ogr \
-f PostgreSQL \
PG:$(DATABASE_URL_OGR) \
Expand Down

0 comments on commit d12ba64

Please sign in to comment.