Change sqlite3 to postgresql