Changed SQLite3 to Postgres