update config and database