rake-db 2.10.61 → 2.10.63
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 +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -57,7 +57,7 @@ const migrationConfigDefaults = {
|
|
|
57
57
|
useCodeUpdater: true
|
|
58
58
|
};
|
|
59
59
|
const processRakeDbConfig = (config) => {
|
|
60
|
-
var _a;
|
|
60
|
+
var _a, _b;
|
|
61
61
|
const result = __spreadValues$7(__spreadValues$7({}, migrationConfigDefaults), config);
|
|
62
62
|
if (!result.recurrentPath) {
|
|
63
63
|
result.recurrentPath = path.join(result.migrationsPath, "recurrent");
|
|
@@ -71,7 +71,7 @@ const processRakeDbConfig = (config) => {
|
|
|
71
71
|
delete result.logger;
|
|
72
72
|
}
|
|
73
73
|
if (!result.basePath || !result.dbScript) {
|
|
74
|
-
const filePath = orchidCore.
|
|
74
|
+
const filePath = (_a = orchidCore.getStackTrace()) == null ? void 0 : _a[3].getFileName();
|
|
75
75
|
if (!filePath) {
|
|
76
76
|
throw new Error(
|
|
77
77
|
"Failed to determine path to db script. Please set basePath option of rakeDb"
|
|
@@ -96,7 +96,7 @@ const processRakeDbConfig = (config) => {
|
|
|
96
96
|
result.recurrentPath = path.resolve(result.basePath, result.recurrentPath);
|
|
97
97
|
}
|
|
98
98
|
if ("baseTable" in config) {
|
|
99
|
-
const proto = (
|
|
99
|
+
const proto = (_b = config.baseTable) == null ? void 0 : _b.prototype;
|
|
100
100
|
result.columnTypes = proto.types || pqb.columnTypes;
|
|
101
101
|
if (proto.snakeCase)
|
|
102
102
|
result.snakeCase = true;
|