Fix undefined method where for Array error in migration.
Support pg and mysql2 for testing