Update config and database