dataset/seed/postgresql/templates/postgresql.sql

8 lines
362 B
MySQL
Raw Normal View History

2022-03-08 19:42:28 +01:00
%for %%server in %%accounts.remotes
%set %%name = %%normalize_family(%%server)
CREATE DATABASE "%%name";
CREATE ROLE "%%name" WITH LOGIN ENCRYPTED PASSWORD '%%accounts["remote_" + %%name]["password_" + %%name]';
2022-03-15 12:12:09 +01:00
ALTER USER "%%name" PASSWORD '%%accounts["remote_" + %%name]["password_" + %%name]';
2022-03-08 19:42:28 +01:00
GRANT ALL PRIVILEGES ON DATABASE "%%name" TO "%%name";
%end for