Fixed #23983 -- Fixed a crash in migrations when adding order_with_respect_to to non-empty table.