Spaces:
Runtime error
Runtime error
Download 01_init_clair.sql from Erwinfr/hexstrikeai: direct link, hf CLI and curl.
- Browser
- Download file 371 Bytes
-
https://huggingface.co/spaces/Erwinfr/hexstrikeai/resolve/main/01_init_clair.sql
- Command line
-
hf download hf://spaces/Erwinfr/hexstrikeai/01_init_clair.sql
-
curl -L -o 01_init_clair.sql https://huggingface.co/spaces/Erwinfr/hexstrikeai/resolve/main/01_init_clair.sql
371 Bytes
| -- Create role if missing (idempotent) | |
| DO $$ | |
| BEGIN | |
| IF NOT EXISTS (SELECT 1 FROM pg_roles WHERE rolname = 'clair') THEN | |
| CREATE ROLE clair WITH LOGIN PASSWORD 'clair'; | |
| END IF; | |
| END$$; | |
| -- Create database if missing (must be outside a transaction) | |
| SELECT 'CREATE DATABASE clair OWNER clair' | |
| WHERE NOT EXISTS (SELECT 1 FROM pg_database WHERE datname = 'clair') \gexec | |