[src][migrations][test] Adding in the ability to stub out database queries during tests with a database mocking library.  Also fixed some issues with mysql migrations.