Issue 136 database migration support

For issue #136