-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathall.sh
42 lines (40 loc) · 1.05 KB
/
all.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
PGPASSWORD=$POSTGRES_PASSWORD \
psql --host=localhost \
--port=5432 \
-U $POSTGRES_USER \
-d $POSTGRES_DB \
--single-transaction \
--file ./flow/model-create/all.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 borough \
-t city_council_district \
-t community_district \
-t land_use \
-t tax_lot \
-t zoning_district \
-t zoning_district_class \
-t zoning_district_zoning_district_class \
-t managing_code \
-t agency \
-t capital_project \
-t capital_project_fund \
-t capital_commitment_type \
-t capital_project_checkbook \
-t agency_budget \
-t budget_line \
-t capital_commitment \
-t capital_commitment_fund \
--file ./data/all_dump.sql
PGPASSWORD=$POSTGRES_PASSWORD \
psql --host=localhost \
--port=5432 \
-U $POSTGRES_USER \
-d $POSTGRES_DB \
--single-transaction \
--file ./data/all_dump.sql