Fixes #150. Fix for migration 0002 to handle non default database connec...

...tions.