This commit is contained in:
Tomáš Dvořák
2025-10-16 13:32:05 +02:00
commit 12cba639b9
663 changed files with 168914 additions and 0 deletions
@@ -0,0 +1,25 @@
-- Drop triggers
DROP TRIGGER IF EXISTS trigger_polls_updated_at ON polls;
DROP TRIGGER IF EXISTS trigger_poll_options_updated_at ON poll_options;
DROP FUNCTION IF EXISTS update_polls_updated_at();
-- Drop indexes
DROP INDEX IF EXISTS idx_polls_status;
DROP INDEX IF EXISTS idx_polls_featured;
DROP INDEX IF EXISTS idx_polls_start_date;
DROP INDEX IF EXISTS idx_polls_end_date;
DROP INDEX IF EXISTS idx_polls_deleted_at;
DROP INDEX IF EXISTS idx_poll_options_poll_id;
DROP INDEX IF EXISTS idx_poll_options_display_order;
DROP INDEX IF EXISTS idx_poll_votes_poll_id;
DROP INDEX IF EXISTS idx_poll_votes_option_id;
DROP INDEX IF EXISTS idx_poll_votes_user_id;
DROP INDEX IF EXISTS idx_poll_votes_ip_hash;
DROP INDEX IF EXISTS idx_poll_votes_session_token;
-- Drop tables (in reverse order of dependencies)
DROP TABLE IF EXISTS poll_votes;
DROP TABLE IF EXISTS poll_options;
DROP TABLE IF EXISTS polls;