This PR works around disabling foreign_keys being a noop in schema migrations. During the validation of the migration script we allows a prologue and an epilogue of pragmas. If such a prologue is present, we assume that foreign_keys must be disabled for the migration. This is a bit hacky since we don't really validate what pragma is actually being used, but disabling foreign_keys is such a common pattern that assuming it should be ok
This PR works around disabling foreign_keys being a noop in schema migrations. During the validation of the migration script we allows a prologue and an epilogue of pragmas. If such a prologue is present, we assume that foreign_keys must be disabled for the migration. This is a bit hacky since we don't really validate what pragma is actually being used, but disabling foreign_keys is such a common pattern that assuming it should be ok