Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions db/pg/model-create/all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ pg_dump --host=$TARGET_DATABASE_HOST \
-t budget_line \
-t capital_commitment \
-t capital_commitment_fund \
-t census_tract \
--file ./data/all_dump.sql

PGPASSWORD=$POSTGRES_PASSWORD \
Expand Down
3 changes: 2 additions & 1 deletion db/pg/model-create/all.sql
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@ DROP TABLE IF EXISTS
agency_budget,
budget_line,
capital_commitment,
capital_commitment_fund
capital_commitment_fund,
census_tract
CASCADE
25 changes: 25 additions & 0 deletions db/pg/model-create/census-tracts.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
PGPASSWORD=$POSTGRES_PASSWORD \
psql --host=localhost \
--port=5432 \
-U $POSTGRES_USER \
-d $POSTGRES_DB \
--single-transaction \
--file ./flow/model-create/census-tracts.sql

PGPASSWORD=$TARGET_DATABASE_PASSWORD \
pg_dump --host=$TARGET_DATABASE_HOST \
--port=$TARGET_DATABASE_PORT \
-U $TARGET_DATABASE_USER \
-d $TARGET_DATABASE_NAME \
-s \
--no-owner \
-t census_tract \
--file ./data/census-tracts_dump.sql

PGPASSWORD=$POSTGRES_PASSWORD \
psql --host=localhost \
--port=5432 \
-U $POSTGRES_USER \
-d $POSTGRES_DB \
--single-transaction \
--file ./data/census-tracts_dump.sql
3 changes: 3 additions & 0 deletions db/pg/model-create/census-tracts.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
DROP TABLE IF EXISTS
census_tract
CASCADE