Additional fixes and tests related to spatial migrations and schema dumping