Change to postgress from sqllite