Move db name rewrite to ctor