Create kngil DB in init shell script
This commit is contained in:
1 parent
8d7ae422e4
commit
90dbb86c94
2 files changed
+12
-8
No files matched your search
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "postgres" <<'EOSQL'
|
||||
DO $$
|
||||
BEGIN
|
||||
IF NOT EXISTS (SELECT 1 FROM pg_database WHERE datname = 'kngil') THEN
|
||||
CREATE DATABASE kngil;
|
||||
END IF;
|
||||
END
|
||||
$$;
|
||||
EOSQL
|
||||
Reference in new issue
Block a user