Commit 186d500d authored by Philippe Pepiot's avatar Philippe Pepiot
Browse files

Add a db-init state to initialize database schema

It can be done by a user without "create database" permissions.
parent a2b3bf00
......@@ -39,7 +39,12 @@ Only manage instance configuration files.
``saemref.db-create``
---------------------
Create instance database with ``cubicweb-ctl db-create``.
Create instance database with ``cubicweb-ctl db-create`` (call implicitly ``db-init``).
``saemref.db-init``
---------------------
Initialize instance database schema with ``cubicweb-ctl db-init``.
``saemref.supervisor``
----------------------
......
{% from "saemref/map.jinja" import saemref with context %}
include:
- saemref
cubicweb-db-init:
cmd.run:
- name: cubicweb-ctl db-init -a {{ saemref.instance.name }}
- user: {{ saemref.instance.user }}
- env:
CW_MODE: user
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment