Koshly's database: 15 SQLite tables on the phone, grouped into money, history, SMS import and the app itself

Expense Tracker Database Design: A Flutter Drift Schema

In my last post I said the database behind Koshly, my offline expense tracker, was ready for sync. A reader showed me it wasn’t. Prikshit pointed out in the comments that I was using updatedAt to decide which edit wins. Phone clocks drift. If my phone is five minutes ahead, my old edit can beat your new one. Deletes have the same problem: a phone that was offline for a week can bring a deleted transaction back. ...

December 4, 2026 · 7 min · 1334 words · Hitesh Patel