Use connection to update migration table
Merge pull request #251 from giffels/dbs3-migration-fixes

Use connection to update migration table