Changed db from sqlite3 to postgreSQL