mirror of
https://git.waldn.net/git/knotteye/satyr.git
synced 2025-09-08 06:22:44 +00:00
Implement database versioning and migration. It could not possibly be any simpler or easier to break, but it works. And it can be used to automatically migrate to a better system for migration later.
For now, the way it works is by creating a new migration script with the name of the version (increment by one, whole numbers) in the src/db folder On start up, it will compare version numbers and run new scripts. The user can also manually check for migrations and skip the automatic checking. Added a bit of additional logging to see what's happening in the startup process as well.
This commit is contained in:
@ -7,7 +7,8 @@
|
||||
"scripts": {
|
||||
"start": "ts-node src/index.ts",
|
||||
"user": "ts-node src/cli.ts",
|
||||
"setup": "sh install/setup.sh"
|
||||
"setup": "sh install/setup.sh",
|
||||
"migrate": "ts-node src/migrate.ts"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
Reference in New Issue
Block a user