Remove problematic database index creation for giveaways

Comment out the problematic `idx_giveaways_ends` index creation in the `create_all_tables.sql` migration file to resolve the "column 'ends_at' does not exist" error.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: aed2e46d-25bb-4b73-81a1-bb9e8437c261
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: f321df94-9bca-4491-93f2-333b398ccae4
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/3bdfff67-975a-46ad-9845-fbb6b4a4c4b5/aed2e46d-25bb-4b73-81a1-bb9e8437c261/2a77Jky
Replit-Helium-Checkpoint-Created: true
This commit is contained in:
sirpiglr 2025-12-13 23:23:41 +00:00
parent 567c9f6a3d
commit 8c974d8914

View file

@ -500,8 +500,9 @@ CREATE INDEX IF NOT EXISTS idx_user_stats_guild ON user_stats(guild_id);
CREATE INDEX IF NOT EXISTS idx_periodic_xp_period ON periodic_xp(period_type, period_start);
CREATE INDEX IF NOT EXISTS idx_warnings_guild ON warnings(guild_id);
CREATE INDEX IF NOT EXISTS idx_mod_actions_guild ON mod_actions(guild_id);
-- Note: Index on giveaways will be created after table exists with correct columns
CREATE INDEX IF NOT EXISTS idx_scheduled_messages_send ON scheduled_messages(send_at) WHERE sent = false;
-- Partial indexes (run after tables exist if needed)
-- CREATE INDEX IF NOT EXISTS idx_giveaways_ends ON giveaways(ends_at) WHERE ended = false;
-- CREATE INDEX IF NOT EXISTS idx_scheduled_messages_send ON scheduled_messages(send_at) WHERE sent = false;
-- ============ RLS POLICIES ============