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 $$;
|