DROP TABLE IF EXISTS lms_user_program_progress;
DROP TABLE IF EXISTS lms_user_course_progress;
DROP TABLE IF EXISTS lms_user_module_progress;
DROP TABLE IF EXISTS lms_user_lesson_progress;

DROP INDEX IF EXISTS uq_lessons_module_sort;
DROP INDEX IF EXISTS uq_modules_course_sort;
DROP INDEX IF EXISTS uq_courses_program_sort;
DROP INDEX IF EXISTS uq_programs_sort_order;

ALTER TABLE lessons
    DROP COLUMN IF EXISTS sort_order;
ALTER TABLE modules
    DROP COLUMN IF EXISTS sort_order;
ALTER TABLE courses
    DROP COLUMN IF EXISTS sort_order;
ALTER TABLE programs
    DROP COLUMN IF EXISTS sort_order;
