Switching sqlite3 to postgresql