mirror of
https://github.com/NotAShelf/stash.git
synced 2026-04-13 06:23:47 +00:00
This makes Stash's database handler a bit more robust. The changes started as me trying to add an entry expiry, but I've realized that the database system is a little fragile and it assumed the database does not change, ever. Well that's not true, it does change and when it does there's a chance that everything implodes. We now wrap migrations in transaction for atomicity and track version via PRAGMA user_version (0 -> 3). We also check column existence before ALTER TABLE and use `last_insert_rowid()` instead of `next_sequence()`. Last but not least, a bunch of regression tests have been added to the database system because I'd rather not discover regressions in production. Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: Ifeab42b0816a5161d736767cb82065346a6a6964 |
||
|---|---|---|
| .. | ||
| mod.rs | ||