orchid-orm 1.25.1 → 1.25.2

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.
@@ -2745,7 +2745,8 @@ const pull = async (options, config) => {
2745
2745
  }
2746
2746
  const baseTablePath = config.baseTable.getFilePath();
2747
2747
  const baseTableExportedAs = config.baseTable.exportAs;
2748
- const adapter = new Adapter(options[0]);
2748
+ const adapters = options.map((opts) => new Adapter(opts));
2749
+ const [adapter] = adapters;
2749
2750
  const currentSchema = adapter.schema || "public";
2750
2751
  const ctx = makeStructureToAstCtx(config, currentSchema);
2751
2752
  const asts = await structureToAst(ctx, adapter);
@@ -2817,10 +2818,14 @@ const pull = async (options, config) => {
2817
2818
  );
2818
2819
  const version = await makeFileVersion({}, config);
2819
2820
  await generate(options, config, ["pull"], { adapter, version });
2820
- const silentAdapter = adapter;
2821
- silentAdapter.silentArrays = adapter.arrays;
2822
- await saveMigratedVersion(silentAdapter, version, "pull.ts", config);
2823
- await adapter.close();
2821
+ await Promise.all(
2822
+ adapters.map(async (adapter2) => {
2823
+ const silentAdapter = adapter2;
2824
+ silentAdapter.silentArrays = adapter2.arrays;
2825
+ await saveMigratedVersion(silentAdapter, version, "pull.ts", config);
2826
+ await adapter2.close();
2827
+ })
2828
+ );
2824
2829
  };
2825
2830
 
2826
2831
  rakeDbCommands.g = rakeDbCommands.generate = {