mirror of
https://github.com/Dvorinka/MyClubServer.git
synced 2026-06-03 18:22:57 +00:00
26 lines
904 B
SQL
26 lines
904 B
SQL
-- 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;
|