rake-db 2.4.32 → 2.4.34
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.d.ts +11 -5
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1169,6 +1169,7 @@ const createMigrationInterface = (tx, up, options) => {
|
|
|
1169
1169
|
adapter.arrays = (q, types) => {
|
|
1170
1170
|
return wrapWithLog(log, q, () => arrays.call(adapter, q, types));
|
|
1171
1171
|
};
|
|
1172
|
+
Object.assign(adapter, { silentQuery: query, silentArrays: arrays });
|
|
1172
1173
|
const db = createDb$1({ adapter });
|
|
1173
1174
|
const { prototype: proto } = MigrationBase;
|
|
1174
1175
|
for (const key of Object.getOwnPropertyNames(proto)) {
|
|
@@ -1432,14 +1433,14 @@ const queryExists = (db, sql) => {
|
|
|
1432
1433
|
};
|
|
1433
1434
|
|
|
1434
1435
|
const saveMigratedVersion = async (db, version, config) => {
|
|
1435
|
-
await db.
|
|
1436
|
+
await db.silentArrays(
|
|
1436
1437
|
`INSERT INTO ${quoteWithSchema({
|
|
1437
1438
|
name: config.migrationsTable
|
|
1438
1439
|
})} VALUES ('${version}')`
|
|
1439
1440
|
);
|
|
1440
1441
|
};
|
|
1441
1442
|
const removeMigratedVersion = async (db, version, config) => {
|
|
1442
|
-
await db.
|
|
1443
|
+
await db.silentArrays(
|
|
1443
1444
|
`DELETE FROM ${quoteWithSchema({
|
|
1444
1445
|
name: config.migrationsTable
|
|
1445
1446
|
})} WHERE version = '${version}'`
|