Skip to content

Commit

Permalink
docs: missing argument at migration:generate (typeorm#8839)
Browse files Browse the repository at this point in the history
`migration:generate` requires data-source path as argument
  • Loading branch information
rafaumlemos authored Apr 2, 2022
1 parent aa6b189 commit 5176a0a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/migrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ Example with `ts-node` in ESM projects:
npx typeorm-ts-node-esm migration:run
```

```
npx typeorm-ts-node-esm migration:generate ./src/migrations/update-post-table -d ./src/data-source.ts
```

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.
Expand Down

0 comments on commit 5176a0a

Please sign in to comment.