platform-codebase/features/payments/database/init.sql

15 lines
547 B
MySQL
Raw Permalink Normal View History

2026-01-14 01:57:23 -08:00
-- Payments Database Initialization
-- This script is the source of truth for payments database schema
-- Infrastructure copies this to postgresql/init.d/ for Docker initialization
-- Create payments schema
CREATE SCHEMA IF NOT EXISTS payments;
-- Grant permissions
GRANT ALL PRIVILEGES ON SCHEMA payments TO lilith;
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA payments TO lilith;
ALTER DEFAULT PRIVILEGES IN SCHEMA payments GRANT ALL ON TABLES TO lilith;
-- Set search path
ALTER DATABASE lilith_payments SET search_path TO payments, public;