typeorm migration:generate

Generates a new migration file with sql needs to be executed to update schema

Options

NameDescription
--helpShow help for command
-c, --connection <connection>Name of the connection on which to run a query
-n, --name <migration>
  • Required ✳
-d, --dir <directory>Directory where migration should be created
-p, --prettyPretty-print generated SQL
-f, --config <file>Name of the file with connection configuration
-o, --outputJsGenerate a migration file on Javascript instead of Typescript
--dr, --dryrunPrints out the contents of the migration instead of writing it to a file
--ch, --checkVerifies that the current database is up to date and that no migrations are needed
-v, --versionShow the version