ktenney
ktenney

Reputation: 4063

Best way to get rows changed in an sqlite db

I'm watching an sqlite db which an app uses.

I want to know what changes have been made since I last checked.

I can dump to sql and diff against the last dump, but it seems there should be a better way.

Is there?

Thanks, Kent

PS Not to be coy, specifics: I'm managing photos with Shotwell, which has a great GUI. I'm mirroring Shotwell's db in Postgresql, where I've restructured and augmented to my liking. After a Shotwell session, which involves adding, tagging, adjusting ... I want to apply those changes to Postgres.

Upvotes: 0

Views: 206

Answers (1)

peko
peko

Reputation: 11335

Add a field named _changed to your table(s). On every manipulation (update, insert into...) of a row set the field to the current timestamp. Now you can check which rows have been updated since.

Upvotes: 1

Related Questions