Store config in db