Revision 2624
Added by Aaron Marcuse-Kubitza over 12 years ago
Makefile | ||
---|---|---|
164 | 164 |
psqlOpts := --set ON_ERROR_STOP=1 --quiet |
165 | 165 |
psqlAsAdmin := sudo -E -u postgres psql $(psqlOpts) |
166 | 166 |
# -E preserves env vars so PGOPTIONS is passed to psql |
167 |
psqlAsAdminVegbien := $(psqlAsAdmin) vegbien |
|
167 | 168 |
psqlAsBien := bin/psql_vegbien $(psqlOpts) |
168 | 169 |
bienPassword := $(shell cat config/bien_password) |
169 | 170 |
|
... | ... | |
181 | 182 |
|
182 | 183 |
rmPublicSchema := $(call rmSchemaCmd,public) |
183 | 184 |
|
184 |
db: mk_db rm_initial_public schemas/functions/reset schemas/install _always ; |
|
185 |
db: mk_db rm_initial_public schemas/functions/reset schemas/py_functions/reset\ |
|
186 |
schemas/install _always ;e |
|
185 | 187 |
|
186 | 188 |
mk_db: _always |
187 | 189 |
-echo "CREATE USER bien PASSWORD '$(bienPassword)';"|$(psqlAsAdmin) |
... | ... | |
191 | 193 |
|
192 | 194 |
rm_initial_public: _always |
193 | 195 |
@$(confirmRmPublicSchema) |
194 |
echo $(rmPublicSchema)|$(psqlAsAdmin) vegbien
|
|
196 |
echo $(rmPublicSchema)|$(psqlAsAdminVegbien)
|
|
195 | 197 |
# drop public schema *as admin* because it starts out owned by postgres |
196 | 198 |
|
197 | 199 |
rm_db: _always |
... | ... | |
228 | 230 |
echo $(call rmSchemaCmd,functions)|$(psqlAsBien) |
229 | 231 |
<$< $(psqlAsBien) |
230 | 232 |
|
233 |
#### py_functions schema |
|
234 |
|
|
235 |
schemas/py_functions/reset: schemas/py_functions.sql _always |
|
236 |
@$(call confirmRmSchema,py_functions) |
|
237 |
echo $(call rmSchemaCmd,py_functions)|$(psqlAsBien) |
|
238 |
<$< $(psqlAsAdminVegbien) |
|
239 |
|
|
231 | 240 |
##### MySQL |
232 | 241 |
|
233 | 242 |
mysql: _always $(call forOs,mysql) mysql_user |
Also available in: Unified diff
main Makefile: VegBIEN DB: DB and bien user: Added schemas/py_functions/reset. db: Create py_functions schema.