Jelajahi Sumber

docs: Fix commander usage in migration script

Closes #3517
Michael Bromley 8 bulan lalu
induk
melakukan
a2e5f92c5a
1 mengubah file dengan 3 tambahan dan 1 penghapusan
  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"
 import { generateMigration, revertLastMigration, runMigrations } from '@vendure/core';
-import program from 'commander';
+import { Command } from 'commander';
 
 import { config } from './src/vendure-config';
 
+const program = new Command();
+
 program
     .command('generate <name>')
     .description('Generate a new migration file with the given name')