tracker-dbupgrader
v1.0.4
Published
Tool that executes Tracker DB upgrade scripts
Downloads
3
Readme
tracker-dbupgrader
Database upgrader tool for tracker. This tool takes in the base path of 'tracker-service' module location and release name as arguments. Looks for the <tracker-service-dir>/releases//upgrades/UpgradeInstructions.txt file. Parses the UpgradeInstructions.txt file for the list of upgrade script file names. Executes each upgrade script file in the database. If a script was already executed then it is skipped. Database configuration can be conigured in the file located ( create if not existing ) at <user-home>/dbupgrader/local.yaml file. Following is the example of local.yaml file.
upgraderConfig:
interactive: false
db:
dbName: divine_live_refresh
userName: sa
password: Welcome@123
serverInstance: LAPTOP-DPP0N813
Installation
This requires nodejs version 16 or above. To install the db upgrader first install nodejs if not already installed then install the tracker-dbupgrade using the following node command
npm install -g tracker-dbupgrader
Usage
Run the following command to get help options
dbupgrader --help
It should print the following
C:\Users\vamsi>dbupgrader --help
Using configuration from C:\Users\vamsi\dbupgrader\local.yaml
Usage: main [options]
Tracker database upgrader utility
Options:
-h, --home <tracker-service-path> Provide the path of "tracker-service" directory.
-r, --releaseName <release-name> Provide the release name in which the upgrade scripts are run.
-w, --waitForUserBeforeExit When used this flag the dbupgrader will wait for user to type q or quit before exit.
--help display help for command
Developer
To run locally npm exec dbupgrader
To publish to npm registry npm publish --access public
To list the packages that has updates npm outdated -g --depth=0
To update the packages to latest version npm update -g