-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinsert_views.sh
20 lines (17 loc) · 1.12 KB
/
insert_views.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env bash
# Exit on error
#set -e
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
PGSERVICE=$1
SRID=2056
# Insert views
psql service=$PGSERVICE -v ON_ERROR_STOP=1 -v SRID=$SRID -f ${DIR}/views/vw_edit_collecting_pipe.sql
psql service=$PGSERVICE -v ON_ERROR_STOP=1 -v SRID=$SRID -f ${DIR}/views/vw_edit_main_pipe_name.sql
psql service=$PGSERVICE -v ON_ERROR_STOP=1 -v SRID=$SRID -f ${DIR}/views/vw_batch_cleaning_agg.sql
psql service=$PGSERVICE -v ON_ERROR_STOP=1 -v SRID=$SRID -f ${DIR}/views/vw_batch_inspection_agg.sql
psql service=$PGSERVICE -v ON_ERROR_STOP=1 -v SRID=$SRID -f ${DIR}/views/vw_collecting_pipe_agg.sql
psql service=$PGSERVICE -v ON_ERROR_STOP=1 -v SRID=$SRID -f ${DIR}/views/vw_last_cleaning.sql
psql service=$PGSERVICE -v ON_ERROR_STOP=1 -v SRID=$SRID -f ${DIR}/views/vw_last_inspection.sql
psql service=$PGSERVICE -v ON_ERROR_STOP=1 -v SRID=$SRID -f ${DIR}/views/refoulement_replaced_by_pumping_reach.sql
psql service=$PGSERVICE -v ON_ERROR_STOP=1 -v SRID=$SRID -f ${DIR}/views/vw_pumping_reach.sql
psql service=$PGSERVICE -v ON_ERROR_STOP=1 -v SRID=$SRID -f ${DIR}/views/process_maintenance_event.sql