dataset/seed/applicationservice/2022.03.08/postgresql-server/templates/postgresql.sql
2022-03-15 12:12:09 +01:00

7 lines
362 B
SQL

%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]';
ALTER USER "%%name" PASSWORD '%%accounts["remote_" + %%name]["password_" + %%name]';
GRANT ALL PRIVILEGES ON DATABASE "%%name" TO "%%name";
%end for