The author of the article does not work at Google. So the article is basically speculation. He has NO CLUE how Google stores the image data.
attach database 'old-database.sqlite3' as old;
insert into dbtable ( id, name ) select id, name from old.dbtable;
Then you don't need to use Python to iterate through each row.