Added db-migration support.

Added db connection pooling.