Revision 12139
Added by Aaron Marcuse-Kubitza almost 11 years ago
Makefile | ||
---|---|---|
63 | 63 |
|
64 | 64 |
%/uninstall: vegbien.sql _always |
65 | 65 |
$(call confirmRmPublicSchema,$*) |
66 |
echo $(call rmSchemaCmd,$*_validation)$(call rmSchemaCmd,$*)\
|
|
67 |
|$(psqlNoSearchPath)
|
|
66 |
-$(psqlNoSearchPath) <<<'SELECT "$*".rm();'
|
|
67 |
# ignore errors if schema doesn't exist
|
|
68 | 68 |
|
69 | 69 |
# Replaces the current public schema with the given version |
70 | 70 |
# usage: make schemas/r#/publish |
71 | 71 |
%/publish: _always |
72 | 72 |
@$(call confirmRmPublicSchema,public,To save it: make schemas/rotate) |
73 |
echo $(call rmSchemaCmd,public)'ALTER SCHEMA "$*" RENAME TO public; \ |
|
74 |
ALTER SCHEMA "$*_validation" RENAME TO public_validation;'\ |
|
75 |
|$(psqlNoSearchPath) --file - --single-transaction |
|
73 |
-$(psqlNoSearchPath) <<<'SELECT "$*".publish();' |
|
76 | 74 |
@echo $(emph)'In your shell, run:'$(endEmph)'unset version' |
75 |
# ignore errors if schema doesn't exist |
|
77 | 76 |
|
78 | 77 |
#### py_util |
79 | 78 |
|
Also available in: Unified diff
schemas/Makefile: %/uninstall, %/publish: use new public.rm(), publish(), which encapsulate the process of renaming multiple related schemas and also allow additional auxiliary schemas beyond just *_validation