Browse Source

fix(create): Fix path for generated migrations

Michael Bromley 3 years ago
parent
commit
f19c75c4d0

+ 1 - 1
packages/create/templates/migration.hbs

@@ -7,7 +7,7 @@ program
     .command('generate <name>')
     .description('Generate a new migration file with the given name')
     .action(name => {
-        return generateMigration(config, { name, outputDir: './migrations' });
+        return generateMigration(config, { name, outputDir: './src/migrations' });
     });
 
 program

+ 1 - 1
packages/create/templates/vendure-config.hbs

@@ -46,7 +46,7 @@ export const config: VendureConfig = {
         // See the README.md "Migrations" section for an explanation of
         // the `synchronize` and `migrations` options.
         synchronize: false,
-        migrations: [path.join(__dirname, '../migrations/*.ts')],
+        migrations: [path.join(__dirname, './migrations/*.ts')],
         logging: false,
         database: {{#if isSQLjs}}new Uint8Array([]){{else if isSQLite}}path.join(__dirname, '../vendure.sqlite'){{else}}process.env.DB_NAME{{/if}},
         {{#if dbSchema}}