diff --git a/config/facsimile/tmpl/_ALL_/init.sql b/config/facsimile/tmpl/_ALL_/init.sql index d026d702..a21edb31 100644 --- a/config/facsimile/tmpl/_ALL_/init.sql +++ b/config/facsimile/tmpl/_ALL_/init.sql @@ -2,18 +2,18 @@ {% for k, each in module.iteritems() %} {% if each.db %} {% if each.db.name %} -create database if not exists {{env.rc.db.prefix}}{{each.db.name}} character set = utf8; -grant all on {{env.rc.db.prefix}}{{each.db.name}}.* to '{{env.rc.db.prefix}}{{each.name}}'@'localhost' identified by '{{each.password}}'; -grant all on {{env.rc.db.prefix}}{{each.db.name}}.* to '{{env.rc.db.prefix}}{{each.name}}'@'%.%.int' identified by '{{each.password}}'; +create database if not exists {{env.rc.db.default.prefix}}{{each.db.name}} character set = utf8; +grant all on {{env.rc.db.default.prefix}}{{each.db.name}}.* to '{{env.rc.db.default.prefix}}{{each.name}}'@'localhost' identified by '{{each.password}}'; +grant all on {{env.rc.db.default.prefix}}{{each.db.name}}.* to '{{env.rc.db.default.prefix}}{{each.name}}'@'%.%.int' identified by '{{each.password}}'; {% endif %} {% for table in each.db.selectable %} -grant select on {{table}} to '{{env.rc.db.prefix}}{{each.name}}'@'localhost' identified by '{{each.password}}'; -grant select on {{table}} to '{{env.rc.db.prefix}}{{each.name}}'@'%.%.int' identified by '{{each.password}}'; +grant select on {{table}} to '{{env.rc.db.default.prefix}}{{each.name}}'@'localhost' identified by '{{each.password}}'; +grant select on {{table}} to '{{env.rc.db.default.prefix}}{{each.name}}'@'%.%.int' identified by '{{each.password}}'; {% endfor %} {% for table in each.db.writable %} -grant all on {{table}} to '{{env.rc.db.prefix}}{{each.name}}'@'localhost' identified by '{{each.password}}'; -grant all on {{table}} to '{{env.rc.db.prefix}}{{each.name}}'@'%.%.int' identified by '{{each.password}}'; +grant all on {{table}} to '{{env.rc.db.default.prefix}}{{each.name}}'@'localhost' identified by '{{each.password}}'; +grant all on {{table}} to '{{env.rc.db.default.prefix}}{{each.name}}'@'%.%.int' identified by '{{each.password}}'; {% endfor %} {% endif %}