added config for db.
Added support for db migration.