Change sqlite3 to pg for DB