Browse Source

docs: Fix commander usage in migration script

Closes #3517
Michael Bromley 8 months ago
parent
commit
a2e5f92c5a
1 changed files with 3 additions and 1 deletions
  1. 3 1
      docs/docs/guides/developer-guide/migrations/index.md

+ 3 - 1
docs/docs/guides/developer-guide/migrations/index.md

@@ -119,10 +119,12 @@ Running the `vendure migrate` command also uses a very similar script internally
 
 
 ```ts title="migration.ts"
 ```ts title="migration.ts"
 import { generateMigration, revertLastMigration, runMigrations } from '@vendure/core';
 import { generateMigration, revertLastMigration, runMigrations } from '@vendure/core';
-import program from 'commander';
+import { Command } from 'commander';
 
 
 import { config } from './src/vendure-config';
 import { config } from './src/vendure-config';
 
 
+const program = new Command();
+
 program
 program
     .command('generate <name>')
     .command('generate <name>')
     .description('Generate a new migration file with the given name')
     .description('Generate a new migration file with the given name')