Ensure kngil DB exists in init script

This commit is contained in:
Lectom C Han
2026-02-04 17:27:32 +09:00
parent 2a118a24f7
commit 8d7ae422e4

View File

@@ -20,6 +20,14 @@ SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;
--
-- Ensure target database exists (idempotent for init scripts)
--
\connect postgres
SELECT 'CREATE DATABASE kngil'
WHERE NOT EXISTS (SELECT 1 FROM pg_database WHERE datname = 'kngil')\gexec
\connect kngil
--
-- TOC entry 6 (class 2615 OID 16413)
-- Name: kngil; Type: SCHEMA; Schema: -; Owner: postgres
@@ -2378,4 +2386,3 @@ ALTER TABLE ONLY kngil.use_history
--
\unrestrict osPaC8Gqjay0KBMwX4hwgDvmjwF5rTGmBMzQBdxAne3SBCLMuCNQu2Xg15dPVeb