orchid-orm 1.25.0 → 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.
- package/dist/migrations.js +10 -5
- package/dist/migrations.js.map +1 -1
- package/dist/migrations.mjs +10 -5
- package/dist/migrations.mjs.map +1 -1
- package/package.json +6 -6
package/dist/migrations.js
CHANGED
|
@@ -2746,7 +2746,8 @@ const pull = async (options, config) => {
|
|
|
2746
2746
|
}
|
|
2747
2747
|
const baseTablePath = config.baseTable.getFilePath();
|
|
2748
2748
|
const baseTableExportedAs = config.baseTable.exportAs;
|
|
2749
|
-
const
|
|
2749
|
+
const adapters = options.map((opts) => new pqb.Adapter(opts));
|
|
2750
|
+
const [adapter] = adapters;
|
|
2750
2751
|
const currentSchema = adapter.schema || "public";
|
|
2751
2752
|
const ctx = rakeDb.makeStructureToAstCtx(config, currentSchema);
|
|
2752
2753
|
const asts = await rakeDb.structureToAst(ctx, adapter);
|
|
@@ -2818,10 +2819,14 @@ const pull = async (options, config) => {
|
|
|
2818
2819
|
);
|
|
2819
2820
|
const version = await rakeDb.makeFileVersion({}, config);
|
|
2820
2821
|
await generate(options, config, ["pull"], { adapter, version });
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2822
|
+
await Promise.all(
|
|
2823
|
+
adapters.map(async (adapter2) => {
|
|
2824
|
+
const silentAdapter = adapter2;
|
|
2825
|
+
silentAdapter.silentArrays = adapter2.arrays;
|
|
2826
|
+
await rakeDb.saveMigratedVersion(silentAdapter, version, "pull.ts", config);
|
|
2827
|
+
await adapter2.close();
|
|
2828
|
+
})
|
|
2829
|
+
);
|
|
2825
2830
|
};
|
|
2826
2831
|
|
|
2827
2832
|
rakeDb.rakeDbCommands.g = rakeDb.rakeDbCommands.generate = {
|