data table sql files

This commit is contained in:
2026-01-30 11:26:51 +08:00
parent 0ba9468495
commit 5bfd16e69e
3 changed files with 45 additions and 0 deletions

13
scripts/init_user.sql Normal file
View File

@@ -0,0 +1,13 @@
-- Create a new database
CREATE DATABASE ai_conversations;
-- Create a dedicated user (role) for your app
CREATE USER myapp_user WITH PASSWORD 'secure_password_123';
-- Grant privileges
GRANT ALL PRIVILEGES ON DATABASE ai_conversations TO myapp_user;
-- Also needed: allow user to create schemas/tables
\c ai_conversations
ALTER USER myapp_user CREATEDB; -- optional but helpful during dev
GRANT ALL ON SCHEMA public TO myapp_user;