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.js
CHANGED
|
@@ -2285,6 +2285,7 @@ const createForeignKey = (item) => {
|
|
|
2285
2285
|
};
|
|
2286
2286
|
|
|
2287
2287
|
const pullDbStructure = async (options, config) => {
|
|
2288
|
+
var _a;
|
|
2288
2289
|
const adapter = new pqb.Adapter(options);
|
|
2289
2290
|
const db = new DbStructure(adapter);
|
|
2290
2291
|
const ast = await structureToAst(db);
|
|
@@ -2293,6 +2294,16 @@ const pullDbStructure = async (options, config) => {
|
|
|
2293
2294
|
if (!result)
|
|
2294
2295
|
return;
|
|
2295
2296
|
await writeMigrationFile(config, "pull", result);
|
|
2297
|
+
const cache = {};
|
|
2298
|
+
for (const item of ast) {
|
|
2299
|
+
await ((_a = config == null ? void 0 : config.appCodeUpdater) == null ? void 0 : _a.call(config, {
|
|
2300
|
+
ast: item,
|
|
2301
|
+
options,
|
|
2302
|
+
basePath: config.basePath,
|
|
2303
|
+
cache,
|
|
2304
|
+
logger: config.logger
|
|
2305
|
+
}));
|
|
2306
|
+
}
|
|
2296
2307
|
};
|
|
2297
2308
|
|
|
2298
2309
|
const rakeDb = async (options, partialConfig = {}, args = process.argv.slice(2)) => {
|