db rewrite update