Fix any sqlite field migration deleting all implicit m2m tables

Fixes #22281