zero-ui icon indicating copy to clipboard operation
zero-ui copied to clipboard

feat: include version in db.json file

Open dec0dOS opened this issue 2 years ago • 4 comments

Feature Request

Describe the Feature Request

Adding version management in the db.json file. That would make database migrations possible.

Describe Alternatives

Migrate to a full-featured database with schema migration. That would increase project complexity, deployment process, and database management for users.

dec0dOS avatar May 08 '22 20:05 dec0dOS

Alternative DB migration: SQLite. https://github.com/WiseLibs/better-sqlite3 or https://www.reddit.com/r/node/comments/14lyyia/comment/jq3pp1v/ https://news.ycombinator.com/item?id=36005831

Really like how migrations feature is implemented in kysely: https://kysely.dev/docs/migrations

dec0dOS avatar Oct 11 '23 01:10 dec0dOS

Currently, I'm using vcs like git to track member changes, it's impossible if migrated to sqlite db files.

wongsyrone avatar Oct 11 '23 01:10 wongsyrone

@wongsyrone, you might find this helpful: check out this links (https://stackoverflow.com/questions/13271643/git-hook-for-diff-sqlite-table, https://news.ycombinator.com/item?id=25004913) for a potential solution.

I want to stick with lowdb and its straightforward JSON format, but creating migrations for lowdb feels like reinventing the wheel. Any adjustments to the database structure could be quite a hassle.

dec0dOS avatar Oct 11 '23 01:10 dec0dOS

@wongsyrone If that Stack Overflow link is not relevant to your case, please share more details.

dec0dOS avatar Oct 11 '23 01:10 dec0dOS