DROP TABLE IF EXISTS telegram_integration;
DROP TABLE IF EXISTS respondent_state;
DROP TABLE IF EXISTS telegram_integration_instance;
drop table if exists telegram_user_quiz_result;
DROP INDEX results_for_quiz;

DO $$
    BEGIN
        IF EXISTS (SELECT 1 FROM pg_type WHERE typname = 'bot_status') THEN
    DROP TYPE bot_status;
    END IF;
END $$;

DO $$
    BEGIN
            IF EXISTS (SELECT 1 FROM pg_type WHERE typname = 'user_result_tg_status') THEN
    DROP TYPE user_result_tg_status;
    END IF;
END $$;
