rake-db 2.4.44 → 2.5.0
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 +5 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { quote, getRaw, EnumColumn, columnTypes, getColumnTypes, getTableData, ColumnType, resetTableData, UnknownColumn, TransactionAdapter, logParamToLogObject, createDb as createDb$1, Adapter, simplifyColumnDefault, columnsByType, instantiateColumn, DomainColumn, CustomTypeColumn, ArrayColumn, getConstraintKind, primaryKeyToCode, indexToCode, constraintToCode, TimestampTzColumn, referencesArgsToCode, constraintPropsToCode } from 'pqb';
|
|
2
|
-
import { singleQuote, toSnakeCase, isRaw, toArray, snakeCaseKey, nameKey, emptyObject, deepCompare, raw, pathToLog, toCamelCase, codeToString, addCode, rawToCode, quoteObjectKey, backtickQuote } from 'orchid-core';
|
|
2
|
+
import { singleQuote, toSnakeCase, isRaw, toArray, snakeCaseKey, nameKey, emptyObject, deepCompare, raw, pathToLog, emptyArray, toCamelCase, codeToString, addCode, rawToCode, quoteObjectKey, backtickQuote } from 'orchid-core';
|
|
3
3
|
import path from 'path';
|
|
4
4
|
import { readdir, mkdir, writeFile } from 'fs/promises';
|
|
5
5
|
import prompts from 'prompts';
|
|
@@ -1662,9 +1662,13 @@ const migrateOrRollback = async (options, config, args, up) => {
|
|
|
1662
1662
|
}
|
|
1663
1663
|
};
|
|
1664
1664
|
const changeCache = {};
|
|
1665
|
+
const begin = {
|
|
1666
|
+
text: "BEGIN",
|
|
1667
|
+
values: emptyArray
|
|
1668
|
+
};
|
|
1665
1669
|
const processMigration = async (db, up, file, config, options, appCodeUpdaterCache) => {
|
|
1666
1670
|
var _a;
|
|
1667
|
-
const asts = await db.transaction(async (tx) => {
|
|
1671
|
+
const asts = await db.transaction(begin, async (tx) => {
|
|
1668
1672
|
const db2 = createMigrationInterface(tx, up, config);
|
|
1669
1673
|
clearChanges();
|
|
1670
1674
|
let changes = changeCache[file.path];
|