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.mjs
CHANGED
|
@@ -3197,18 +3197,19 @@ async function renameMigrations(config, trx, versions, renameTo) {
|
|
|
3197
3197
|
await renameMigrationVersionsInDb(config, trx, values);
|
|
3198
3198
|
return updatedVersions;
|
|
3199
3199
|
}
|
|
3200
|
-
const migrateConfigDefaults = {
|
|
3201
|
-
migrationId: { serial: 4 },
|
|
3202
|
-
migrationsTable: "schemaMigrations",
|
|
3203
|
-
transaction: "single"
|
|
3204
|
-
};
|
|
3205
3200
|
const handleConfigLogger = (config, db) => {
|
|
3206
3201
|
const q = db ? "$qb" in db && db.$qb ? db.$qb.q : "q" in db ? db.q : void 0 : void 0;
|
|
3202
|
+
const queryLogger = q?.log && q.logger;
|
|
3207
3203
|
return {
|
|
3208
3204
|
log: config.log ?? q?.log,
|
|
3209
|
-
logger: config.log === true ? config.logger ||
|
|
3205
|
+
logger: config.log === true ? config.logger || queryLogger || console : config.log === false ? void 0 : config.logger || queryLogger
|
|
3210
3206
|
};
|
|
3211
3207
|
};
|
|
3208
|
+
const migrateConfigDefaults = {
|
|
3209
|
+
migrationId: { serial: 4 },
|
|
3210
|
+
migrationsTable: "schemaMigrations",
|
|
3211
|
+
transaction: "single"
|
|
3212
|
+
};
|
|
3212
3213
|
/**
|
|
3213
3214
|
* Process a PublicRakeDbConfig into RakeDbConfig by handling the `log` option.
|
|
3214
3215
|
* This is used by public migration functions (migrate, rollback, redo) to
|