init: adding additional script
Signed-off-by: Alexis Pentori <alexis@status.im>
This commit is contained in:
parent
8d8b9fbbae
commit
5650471d72
|
@ -24,12 +24,14 @@ postgres_ha_databases:
|
||||||
- name: my-db
|
- name: my-db
|
||||||
user: my-user
|
user: my-user
|
||||||
pass: my-pass
|
pass: my-pass
|
||||||
|
script: 'CREATE SCHEMA IF NOT EXIST example;'
|
||||||
|
|
||||||
- name: my-other-db
|
- name: my-other-db
|
||||||
user: my-other-user
|
user: my-other-user
|
||||||
pass: my-other-pass
|
pass: my-other-pass
|
||||||
```
|
```
|
||||||
The `user` field is optional. DB name is used by default.
|
The `user` field is optional. DB name is used by default.
|
||||||
|
The field `script` is optional and allow to add commands to run when creating the database.
|
||||||
|
|
||||||
Backup settings can be adjusted using:
|
Backup settings can be adjusted using:
|
||||||
```yaml
|
```yaml
|
||||||
|
|
|
@ -13,4 +13,7 @@ LOCALE "{{ db.locale }}"
|
||||||
TEMPLATE "{{ db.template }}"
|
TEMPLATE "{{ db.template }}"
|
||||||
{% endif %}
|
{% endif %}
|
||||||
;
|
;
|
||||||
|
{% if 'script' in db %}
|
||||||
|
{{ db.script }}
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
Loading…
Reference in New Issue