having problems with local db overwriting postgre db