add `NULL` check to data migration
enforce NOT NULL on current_index column after data migration