@famgia/omnify-cli 2.0.41 → 2.0.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -2140,14 +2140,12 @@ async function runGenerate(options) {
2140
2140
  }
2141
2141
  }
2142
2142
  for (const migData of createMigrations) {
2143
- const migrationSchemas = Object.fromEntries(
2144
- Object.entries(schemas).filter(([name]) => migData.schemas.includes(name))
2145
- );
2146
- if (Object.keys(migrationSchemas).length === 0) {
2143
+ const schemaExists = migData.schemas.some((name) => name in schemas);
2144
+ if (!schemaExists) {
2147
2145
  logger.warn(` Cannot regenerate ${migData.fileName}: schema not found`);
2148
2146
  continue;
2149
2147
  }
2150
- const regenerated = (0, import_omnify_laravel.generateMigrations)(migrationSchemas, {
2148
+ const regenerated = (0, import_omnify_laravel.generateMigrations)(schemas, {
2151
2149
  timestamp: migData.timestamp,
2152
2150
  customTypes: customTypesMap2
2153
2151
  });