Skip to content

Commit

Permalink
docs: add migration docs
Browse files Browse the repository at this point in the history
  • Loading branch information
a20688392 committed Feb 13, 2023
1 parent de1b37b commit e7ae733
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,25 @@ $ npm run test:e2e
$ npm run test:cov
```

## Migration

```bash
# build and according to dist/**/*.entity.js difference between previous and now to generate sql queries
$ yarn migration:generate src/database/migrations/{THIS_migration_DO}

# build and create new empty migration which custom sql queries
$ yarn migration:create src/database/migrations/{THIS_migration_DO}

# build and run with sql queries to update a database
$ yarn migration:run

# build and view current status which database migration version
$ yarn migration:show

# build and revert database to previous version
$ yarn migration:revert
```

## Support

Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).
Expand Down

0 comments on commit e7ae733

Please sign in to comment.