(i genuinely have no idea what to show in the devlog attachment, nothing’s changed visually. so have this stupid ass screenshot.)
Massive refactor, breaking changes
now that i’ve given myself the liberty to rethink and redesign Squirrel’s data models and storage in a breaking fashion for v1, we have managed to make a good amount of improvements across the board. database schema has been modified to better suit current needs and make it possible to implement the features I desire for v1. it has been a very satisfying refactor.
What’s new:
- use UNIX microsecond timestamp for event ids instead of relying on sqlite autoincrement. this allows us to immediately send a captured event to the frontend without having to await a db write to obtain the event id. this also eliminates the
timestampcolumn for events since the id is also the timestamp. - a dedicated
BLOBcolumn for image entries to store raw image bytes instead of b64 encoded strings. this makes images weigh about ~33% lighter. decent perf boost. - new
expires_atcolumn to store when an entry expires. pinned entries have an expiry ofNULL. provides the base to actually implement expiring entries. - get rid of
ClipboardEventNoticesince we no longer do thenotify frontend -> write to db -> send data to frontenddance. it is now simplysend whole event to frontend -> write to db. we enjoy simplifications. - (!) as it stands now, old data (if it exists) would immediately be wiped when launching Squirrel v1. i could write some migration code but we’ll see. maybe clipboard data isn’t important enough to bother with migration.
Next:
- actually implement entry expiration: should be trivial, just delete expired entries on launch.
- ephemeral/persistent toggle: this one is a bit tricky, and will involve some in memory database shenanigans. more details in the devlog when i implement this.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.