Auto Increment Index Field For Create and Update
You need to combine a sequence with some mechanism to trigger the increment for an update. For postgres

create table my_table(id serial primary key, description text, touched serial);


Then either:


create a trigger to set touched = default on an update
or
get all your updates going through an API that also actions the increment


auto-increment is implemented differently for SQLite so you will have to work around that - perhaps by inserting/deleting a new row each time you update a row, and using the rowid of that temporary row to update touched.