rake-db 2.4.5 → 2.4.6
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.js +11 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2257,6 +2257,7 @@ const createForeignKey = (item) => {
|
|
|
2257
2257
|
};
|
|
2258
2258
|
|
|
2259
2259
|
const pullDbStructure = async (options, config) => {
|
|
2260
|
+
var _a;
|
|
2260
2261
|
const adapter = new Adapter(options);
|
|
2261
2262
|
const db = new DbStructure(adapter);
|
|
2262
2263
|
const ast = await structureToAst(db);
|
|
@@ -2265,6 +2266,16 @@ const pullDbStructure = async (options, config) => {
|
|
|
2265
2266
|
if (!result)
|
|
2266
2267
|
return;
|
|
2267
2268
|
await writeMigrationFile(config, "pull", result);
|
|
2269
|
+
const cache = {};
|
|
2270
|
+
for (const item of ast) {
|
|
2271
|
+
await ((_a = config == null ? void 0 : config.appCodeUpdater) == null ? void 0 : _a.call(config, {
|
|
2272
|
+
ast: item,
|
|
2273
|
+
options,
|
|
2274
|
+
basePath: config.basePath,
|
|
2275
|
+
cache,
|
|
2276
|
+
logger: config.logger
|
|
2277
|
+
}));
|
|
2278
|
+
}
|
|
2268
2279
|
};
|
|
2269
2280
|
|
|
2270
2281
|
const rakeDb = async (options, partialConfig = {}, args = process.argv.slice(2)) => {
|