dec0dOS / zero-ui

ZeroUI - ZeroTier Controller Web UI - is a web user interface for a self-hosted ZeroTier network controller.
GNU General Public License v3.0
931 stars 149 forks source link

feat: include version in db.json file #75

Open dec0dOS opened 2 years ago

dec0dOS commented 2 years ago

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 commented 12 months ago

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

wongsyrone commented 12 months ago

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

dec0dOS commented 12 months ago

@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 commented 12 months ago

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