typeorm migration:generate
Generates a new migration file with sql needs to be executed to update schema
Options
Name | Description |
---|---|
--help | Show help for command |
-c, --connection <connection> | Name of the connection on which to run a query |
-n, --name <migration> |
|
-d, --dir <directory> | Directory where migration should be created |
-p, --pretty | Pretty-print generated SQL |
-f, --config <file> | Name of the file with connection configuration |
-o, --outputJs | Generate a migration file on Javascript instead of Typescript |
--dr, --dryrun | Prints out the contents of the migration instead of writing it to a file |
--ch, --check | Verifies that the current database is up to date and that no migrations are needed |
-v, --version | Show the version |