Modify to work with Mysql2 adapter