rake-db 2.20.17 → 2.20.18
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 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -3172,7 +3172,7 @@ const migrationConfigDefaults = {
|
|
|
3172
3172
|
}
|
|
3173
3173
|
};
|
|
3174
3174
|
const processRakeDbConfig = (config) => {
|
|
3175
|
-
var _a
|
|
3175
|
+
var _a;
|
|
3176
3176
|
const result = __spreadValues$4(__spreadValues$4({}, migrationConfigDefaults), config);
|
|
3177
3177
|
if (!result.recurrentPath) {
|
|
3178
3178
|
result.recurrentPath = path.join(result.migrationsPath, "recurrent");
|
|
@@ -3208,13 +3208,13 @@ const processRakeDbConfig = (config) => {
|
|
|
3208
3208
|
if ("recurrentPath" in result && !path.isAbsolute(result.recurrentPath)) {
|
|
3209
3209
|
result.recurrentPath = path.resolve(result.basePath, result.recurrentPath);
|
|
3210
3210
|
}
|
|
3211
|
-
if ("baseTable" in config) {
|
|
3212
|
-
const
|
|
3213
|
-
result.columnTypes =
|
|
3214
|
-
if (
|
|
3211
|
+
if ("baseTable" in config && config.baseTable) {
|
|
3212
|
+
const { types, snakeCase, language } = config.baseTable.prototype;
|
|
3213
|
+
result.columnTypes = types || pqb.makeColumnTypes(pqb.defaultSchemaConfig);
|
|
3214
|
+
if (snakeCase)
|
|
3215
3215
|
result.snakeCase = true;
|
|
3216
|
-
if (
|
|
3217
|
-
result.language =
|
|
3216
|
+
if (language)
|
|
3217
|
+
result.language = language;
|
|
3218
3218
|
} else {
|
|
3219
3219
|
const ct = "columnTypes" in config && config.columnTypes;
|
|
3220
3220
|
result.columnTypes = (typeof ct === "function" ? ct(
|