3
0

update creation of databases

This commit is contained in:
Arne Teuke
2025-10-26 16:36:21 +01:00
parent bf4eefc083
commit 8388203ef0

View File

@@ -1,3 +1,3 @@
psql -U postgres -tc "SELECT 1 FROM pg_database WHERE datname = '<%= @pl_db_name %>'" | grep -q 1 || psql -U postgres -c "CREATE DATABASE <%= @pl_db_name %> OWNER '<%= @pl_owner_name %>' " psql -U postgres -tc "SELECT 1 FROM pg_database WHERE datname = '<%= @pl_db_name %>'" | grep -q 1 || psql -U postgres -c "CREATE DATABASE <%= @pl_db_name %> OWNER '<%= @pl_owner_name %>' "
psql -U postgres -tc "SELECT 1 FROM pg_database WHERE datname = '<%= @pl_db_name %>'" | grep -q 1 || psql -U postgres -c "GRANT ALL PRIVILEGES ON DATABASE <%= @pl_db_name %> TO '<%= @pl_owner_name %>'" psql -U postgres -tc "GRANT ALL PRIVILEGES ON DATABASE <%= @pl_db_name %> TO '<%= @pl_owner_name %>'"
psql -U postgres <%= @pl_db_name %> -c 'create extension if not exists <%= @pl_db_extension %>' psql -U postgres <%= @pl_db_name %> -c 'create extension if not exists <%= @pl_db_extension %>'