Configure Maven repository for unionflow-server-api dependency
This commit is contained in:
27
setup-postgres.sql
Normal file
27
setup-postgres.sql
Normal file
@@ -0,0 +1,27 @@
|
||||
-- Script de configuration PostgreSQL pour UnionFlow
|
||||
-- Exécuter en tant que superuser (postgres)
|
||||
|
||||
-- Créer l'utilisateur unionflow s'il n'existe pas
|
||||
DO $$
|
||||
BEGIN
|
||||
IF NOT EXISTS (SELECT FROM pg_catalog.pg_user WHERE usename = 'unionflow') THEN
|
||||
CREATE USER unionflow WITH PASSWORD 'unionflow123';
|
||||
END IF;
|
||||
END
|
||||
$$;
|
||||
|
||||
-- Créer la base de données unionflow si elle n'existe pas
|
||||
SELECT 'CREATE DATABASE unionflow OWNER unionflow'
|
||||
WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'unionflow')\gexec
|
||||
|
||||
-- Donner tous les privilèges à l'utilisateur unionflow
|
||||
GRANT ALL PRIVILEGES ON DATABASE unionflow TO unionflow;
|
||||
|
||||
-- Se connecter à la base unionflow et donner les privilèges sur le schéma public
|
||||
\c unionflow
|
||||
GRANT ALL ON SCHEMA public TO unionflow;
|
||||
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO unionflow;
|
||||
GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO unionflow;
|
||||
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL ON TABLES TO unionflow;
|
||||
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL ON SEQUENCES TO unionflow;
|
||||
|
||||
Reference in New Issue
Block a user