Improve local db script.