Prepare the local db