skills/vendure-cli/commands/migrate.md
Generates, runs or reverts TypeORM database migrations for a Vendure project.
vendure migrate [--generate <name> | --run | --revert] [options]
Exactly one operation flag:
| Operation flag | Description |
|---|---|
-g, --generate <name> | Generate a new migration from pending schema changes |
-r, --run | Run all pending migrations |
--revert | Revert the most recent migration |
| Option | Description |
|---|---|
-o, --output-dir <path> | Output directory for a generated migration |
--config <path> | Path to a custom Vendure config file |
vendure migrate -g AddProductReviewTable
vendure migrate -g AddProductReviewTable -o ./src/migrations
vendure migrate -r
vendure migrate --revert