Revision 12849
Added by Aaron Marcuse-Kubitza almost 11 years ago
trunk/lib/runscripts/datasrc_dir.run | ||
---|---|---|
9 | 9 |
|
10 | 10 |
# to reinstall staging tables: rm=1 .../run import |
11 | 11 |
|
12 |
schema/rm() |
|
13 |
{ |
|
14 |
begin_target |
|
15 |
psql <<EOF |
|
16 |
DROP SCHEMA IF EXISTS "$schema" CASCADE; |
|
17 |
EOF |
|
18 |
} |
|
19 |
|
|
20 |
schema/make() |
|
21 |
{ |
|
22 |
begin_target |
|
23 |
if remaking; then schema/rm; fi |
|
24 |
pattern='schema .* already exists' ignore_e=3 ignore_err_msg psql <<EOF |
|
25 |
CREATE SCHEMA "$schema"; |
|
26 |
EOF |
|
27 |
} |
|
28 |
|
|
12 | 29 |
import() |
13 | 30 |
{ |
14 | 31 |
begin_target |
Also available in: Unified diff
lib/runscripts/datasrc_dir.run: added schema/rm(), schema/make()