BEGIN;

CREATE INDEX IF NOT EXISTS idx_user_profiles_user_id ON user_profiles(user_id);

CREATE INDEX IF NOT EXISTS idx_departments_id ON departments(id);

CREATE INDEX IF NOT EXISTS idx_user_department_composite ON user_department(user_id, department_id);

CREATE INDEX IF NOT EXISTS idx_users_id_not_deleted ON users(id);

COMMIT;