build-configs/templates/extra-databases.sql.twig
Oliver Davies 4d034d9ba2 feat: allow for adding extra databases
Allow for declaring extra databases that should be created when the
project is first started. This is done by adding an `extra_databases`
key to `database`, containing a list of database names.

```yaml
database:
  type: mariadb
  version: 10
  extra_databases:
    - tinhat
    - freshcover
```
2023-04-07 08:40:42 +01:00

6 lines
172 B
Twig

{% for database in database.extra_databases %}
CREATE DATABASE {{ database }};
GRANT ALL PRIVILEGES ON {{ database }}.* TO drupal@'%' IDENTIFIED BY 'drupal';
{% endfor %}