Project

General

Profile

1
#!/bin/bash -e
2
# syncs validations queries with the DB
3
. "$(dirname "${BASH_SOURCE[0]}")"/file.pg.sql.run
4
.rel subdir.run
5

    
6
if self_not_included; then
7

    
8
func_override export___schema.pg.sql.run
9
export_() # usage: rm=1 .../file.run export_ # resulting export is idempotent
10
{
11
	echo_func
12
	#need explicit schema so matching tables from other schemas are not included
13
	export___schema.pg.sql.run --table="\"$schema\"._[[:alpha:]]+_\d*" "$@"
14
	# make export idempotent
15
	in_place "$top_file" sed 's/CREATE VIEW/CREATE OR REPLACE VIEW/g'
16
}
17

    
18
fi
(16-16/17)