rake-db 2.20.17 → 2.20.19

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 CHANGED
@@ -472,7 +472,7 @@ const createTable = async (migration, up, tableName, first, second, third) => {
472
472
  void 0,
473
473
  {
474
474
  noPrimaryKey: options.noPrimaryKey ? "ignore" : void 0,
475
- snakeCase: options.snakeCase
475
+ snakeCase
476
476
  }
477
477
  );
478
478
  }
@@ -3172,7 +3172,7 @@ const migrationConfigDefaults = {
3172
3172
  }
3173
3173
  };
3174
3174
  const processRakeDbConfig = (config) => {
3175
- var _a, _b;
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 proto = (_b = config.baseTable) == null ? void 0 : _b.prototype;
3213
- result.columnTypes = proto.types || pqb.makeColumnTypes(pqb.defaultSchemaConfig);
3214
- if (proto.snakeCase)
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 (proto.language)
3217
- result.language = proto.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(