Skip to content

Commit

Permalink
Update init_db.sql
Browse files Browse the repository at this point in the history
  • Loading branch information
dam2452 committed Jan 2, 2025
1 parent 056944f commit 008da77
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions bot/database/init_db.sql
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,25 @@ CREATE TABLE IF NOT EXISTS user_logs_2023 PARTITION OF user_logs

CREATE TABLE IF NOT EXISTS user_logs_2024 PARTITION OF user_logs
FOR VALUES FROM ('2024-01-01') TO ('2024-12-31');

CREATE TABLE IF NOT EXISTS user_logs_2025 PARTITION OF user_logs
FOR VALUES FROM ('2025-01-01') TO ('2025-12-31');

CREATE TABLE IF NOT EXISTS user_logs_2026 PARTITION OF user_logs
FOR VALUES FROM ('2026-01-01') TO ('2026-12-31');

CREATE TABLE IF NOT EXISTS user_logs_2027 PARTITION OF user_logs
FOR VALUES FROM ('2027-01-01') TO ('2027-12-31');

CREATE TABLE IF NOT EXISTS user_logs_2028 PARTITION OF user_logs
FOR VALUES FROM ('2028-01-01') TO ('2028-12-31');

CREATE TABLE IF NOT EXISTS user_logs_2029 PARTITION OF user_logs
FOR VALUES FROM ('2029-01-01') TO ('2029-12-31');

CREATE TABLE IF NOT EXISTS user_logs_2030 PARTITION OF user_logs
FOR VALUES FROM ('2030-01-01') TO ('2030-12-31');

CREATE INDEX IF NOT EXISTS idx_user_logs_user_id ON user_logs(user_id);

CREATE TABLE IF NOT EXISTS system_logs (
Expand Down

0 comments on commit 008da77

Please sign in to comment.