mirror of
https://github.com/hargata/lubelog.git
synced 2025-12-10 00:46:08 -06:00
Script checks for "app" schema in Postgres during startup. It will create the schema automatically if it doesn't exist or skip if it does exist.
7 lines
162 B
SQL
7 lines
162 B
SQL
DO $$
|
|
BEGIN
|
|
IF NOT EXISTS (SELECT schema_name FROM information_schema.schemata WHERE schema_name = 'app') THEN
|
|
CREATE SCHEMA app;
|
|
END IF;
|
|
END $$;
|