-- Drop indexes
DROP INDEX IF EXISTS subquizes;
DROP INDEX IF EXISTS birthtime;
DROP INDEX IF EXISTS groups;
DROP INDEX IF EXISTS timeouted;
DROP INDEX IF EXISTS active ON quiz;
DROP INDEX IF EXISTS questiontype;
DROP INDEX IF EXISTS required;
DROP INDEX IF EXISTS relation;
DROP INDEX IF EXISTS active ON question;

-- Drop tables
DROP TABLE IF EXISTS privileges;
DROP TABLE IF EXISTS answer;
DROP TABLE IF EXISTS question;
DROP TABLE IF EXISTS quiz;
DROP TABLE IF EXISTS account;

-- Drop types
DO $$
BEGIN
DROP TYPE IF EXISTS question_type;
DROP TYPE IF EXISTS quiz_status;
END$$;