docs: add example for yarn v2 with PnP (#7540)

* Add example for yarn v2 with pnp

* Update migrations.md
This commit is contained in:
Kevin Lindsay 2021-05-16 06:16:28 -04:00 committed by GitHub
parent fce559b178
commit 44979afd7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -151,6 +151,11 @@ Example with `ts-node`:
ts-node --transpile-only ./node_modules/typeorm/cli.js migration:run
```
Example `ts-node` not using `node_modules` directly:
```
ts-node $(yarn bin typeorm) migration:run
```
This command will execute all pending migrations and run them in a sequence ordered by their timestamps.
This means all sql queries written in the `up` methods of your created migrations will be executed.
That's all! Now you have your database schema up-to-date.