Fix script windows init.sql

This commit is contained in:
Charles Bochet 2023-10-15 16:45:17 +02:00
parent 31d67c1092
commit ba3094b448

View File

@ -1,10 +1,10 @@
SELECT 'CREATE DATABASE "default"' SELECT 'CREATE DATABASE "default"'
WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'default'); WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'default')\gexec
SELECT 'CREATE DATABASE "test"' SELECT 'CREATE DATABASE "test"'
WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'test'); WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'test')\gexec
SELECT 'CREATE USER twenty PASSWORD ''twenty''' SELECT 'CREATE USER twenty PASSWORD ''twenty'''
WHERE NOT EXISTS (SELECT FROM pg_user WHERE usename = 'twenty'); WHERE NOT EXISTS (SELECT FROM pg_user WHERE usename = 'twenty')\gexec
SELECT 'ALTER ROLE twenty superuser'; SELECT 'ALTER ROLE twenty superuser'\gexec