3
0
Arne Teuke
2025-10-02 15:11:29 +02:00
parent 87d838f8be
commit ccdffca708
7 changed files with 57 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
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 <%= @pl_db_name %> -c 'create extension if not exists <%= @pl_db_extension %>'

View File

@@ -0,0 +1 @@
dropdb -U postgres <%= @pl_db_name %> --if-exists

View File

@@ -0,0 +1 @@
psql -U postgres -c "SELECT datname FROM pg_database WHERE datname='<%= @pl_db_name %>' " | grep -q 1

View File

@@ -0,0 +1 @@
psql -U postgres -c "SELECT datname FROM pg_database WHERE datname='<%= @pl_db_name %>' " | grep -q 1