rake-db 2.36.13 → 2.36.14
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 +7 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -3220,18 +3220,19 @@ async function renameMigrations(config, trx, versions, renameTo) {
|
|
|
3220
3220
|
await renameMigrationVersionsInDb(config, trx, values);
|
|
3221
3221
|
return updatedVersions;
|
|
3222
3222
|
}
|
|
3223
|
-
const migrateConfigDefaults = {
|
|
3224
|
-
migrationId: { serial: 4 },
|
|
3225
|
-
migrationsTable: "schemaMigrations",
|
|
3226
|
-
transaction: "single"
|
|
3227
|
-
};
|
|
3228
3223
|
const handleConfigLogger = (config, db) => {
|
|
3229
3224
|
const q = db ? "$qb" in db && db.$qb ? db.$qb.q : "q" in db ? db.q : void 0 : void 0;
|
|
3225
|
+
const queryLogger = q?.log && q.logger;
|
|
3230
3226
|
return {
|
|
3231
3227
|
log: config.log ?? q?.log,
|
|
3232
|
-
logger: config.log === true ? config.logger ||
|
|
3228
|
+
logger: config.log === true ? config.logger || queryLogger || console : config.log === false ? void 0 : config.logger || queryLogger
|
|
3233
3229
|
};
|
|
3234
3230
|
};
|
|
3231
|
+
const migrateConfigDefaults = {
|
|
3232
|
+
migrationId: { serial: 4 },
|
|
3233
|
+
migrationsTable: "schemaMigrations",
|
|
3234
|
+
transaction: "single"
|
|
3235
|
+
};
|
|
3235
3236
|
/**
|
|
3236
3237
|
* Process a PublicRakeDbConfig into RakeDbConfig by handling the `log` option.
|
|
3237
3238
|
* This is used by public migration functions (migrate, rollback, redo) to
|