Oddbean new post about | logout
 @tedu that might explain another search related bug I ran into today! https://github.com/simonw/datasette.io/issues/152 
 Ouch: "The VACUUM command may change the ROWIDs of entries in any tables that do not have an explicit INTEGER PRIMARY KEY."

https://www.sqlite.org/lang_vacuum.html 
 @Simon Willison yeah, short version is "rowid" belongs to sqlite, even if it lets you see it, and if you want your own row ID, you need to name it.
 
 @tedu this is going to play havoc with my plans to allow people to attach comments to arbitrary uploaded CSV files by referencing the rowid

Really frustrating, because there's plenty of data in the world that doesn't come with a useful primary key 
 @Simon Willison so whatever your table name is, add tableid integer primary key to the schema.
 
 @tedu yeah or I might just go with "_id" or something like that