We prefer hyphens (kebab-case) this-file-name vs underscores (snake_case) this_file_name
Prerequisite
- VSCode
- Node LTS
Running app server directly on your local machine's environment
- Start your app server
npm start
# you might also want to migrate the DB with this command below
npm run migration:run
Prerequisite
- Node LTS
Run the test
npm test
Before continuing, please learn about the fundamentals of migration with TypeORM here
Run migration
npm run migration:run
Modifying columns in entities, or adding new entities (migration file is a class, start with CapitalLetter) Please refer to 1571751456489-Init.ts for changes to be made to the migration file to satisfy linting rules
It's a good idea to generate a new migration for every atomic changes made to the db
Generate migration
npm run migration:generate -- -n <migration-name> # eg. add-disbursement-column
Revert will revert migration file by file
Revert migration
npm run migration:revert
For eg you need to add new extensions or simply custom migration
Create migration
npm run migration:create -- -n <MigrationName>