Browse Source

chore(dev-server): Fix issue populating with sqlite

Michael Bromley 6 years ago
parent
commit
d6d33eff8e
2 changed files with 2 additions and 1 deletions
  1. 1 0
      packages/dev-server/dev-config.ts
  2. 1 1
      packages/dev-server/populate-dev-server.ts

+ 1 - 0
packages/dev-server/dev-config.ts

@@ -90,6 +90,7 @@ function getDbConfig(): ConnectionOptions {
         case 'sqlite':
         case 'sqlite':
             console.log('Using sqlite connection');
             console.log('Using sqlite connection');
             return {
             return {
+                synchronize: true,
                 type: 'sqlite',
                 type: 'sqlite',
                 database: path.join(__dirname, 'vendure.sqlite'),
                 database: path.join(__dirname, 'vendure.sqlite'),
             };
             };

+ 1 - 1
packages/dev-server/populate-dev-server.ts

@@ -31,7 +31,7 @@ if (require.main === module) {
         },
         },
         customFields: {},
         customFields: {},
     };
     };
-    clearAllTables(populateConfig, true)
+    clearAllTables(populateConfig as any, true)
         .then(() =>
         .then(() =>
             populate(
             populate(
                 () => bootstrap(populateConfig),
                 () => bootstrap(populateConfig),