dev setup
This commit is contained in:
1 parent
d90681b788
commit
f5b8bd3c96
17 files changed
+1462
-23
No files matched your search
@@ -0,0 +1,24 @@
|
||||
-- Initial database setup for Crypto Trading Bot Dashboard
|
||||
-- This script runs when PostgreSQL container starts for the first time
|
||||
|
||||
-- Create extensions
|
||||
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
|
||||
|
||||
-- Set timezone
|
||||
SET timezone = 'UTC';
|
||||
|
||||
-- Create initial user with appropriate permissions (if not exists)
|
||||
DO $$
|
||||
BEGIN
|
||||
IF NOT EXISTS (SELECT FROM pg_catalog.pg_roles WHERE rolname = 'dashboard') THEN
|
||||
CREATE ROLE dashboard WITH LOGIN PASSWORD 'dashboard123';
|
||||
END IF;
|
||||
END
|
||||
$$;
|
||||
|
||||
-- Grant permissions
|
||||
GRANT ALL PRIVILEGES ON DATABASE dashboard TO dashboard;
|
||||
GRANT ALL ON SCHEMA public TO dashboard;
|
||||
|
||||
-- Create initial comment
|
||||
COMMENT ON DATABASE dashboard IS 'Crypto Trading Bot Dashboard Database';
|
||||
Reference in new issue
Block a user