Adding support for specifying database template