rake-db 2.31.1 → 2.32.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.mjs CHANGED
@@ -1388,7 +1388,7 @@ const pushIndexesOrExcludes = (key, from, to, name, add2, drop2) => {
1388
1388
  };
1389
1389
  const getChangeColumnName = (what, change, key, snakeCase) => {
1390
1390
  return change.name || (change[what].column ? (
1391
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
1391
+ //
1392
1392
  getColumnName(change[what].column, key, snakeCase)
1393
1393
  ) : snakeCase ? toSnakeCase(key) : key);
1394
1394
  };
@@ -3528,12 +3528,18 @@ const processMigrateConfig = (config) => {
3528
3528
  migrationsPath = path$1.resolve(config.basePath, migrationsPath);
3529
3529
  }
3530
3530
  }
3531
- return {
3531
+ const result = {
3532
3532
  ...migrateConfigDefaults,
3533
3533
  ...config,
3534
3534
  migrationsPath,
3535
3535
  logger: handleConfigLogger(config)
3536
3536
  };
3537
+ if ("baseTable" in config && config.baseTable) {
3538
+ const { snakeCase, language } = config.baseTable.prototype;
3539
+ if (snakeCase) result.snakeCase = true;
3540
+ if (language) result.language = language;
3541
+ }
3542
+ return result;
3537
3543
  };
3538
3544
  const transactionIfSingle = (adapter, config, fn) => {
3539
3545
  return config.transaction === "single" ? transaction(adapter, config, fn) : fn(adapter);
@@ -6559,10 +6565,8 @@ const makeRakeDbConfig = (config, args) => {
6559
6565
  result.recurrentPath = path.resolve(result.basePath, result.recurrentPath);
6560
6566
  }
6561
6567
  if ("baseTable" in config && config.baseTable) {
6562
- const { types, snakeCase, language } = config.baseTable.prototype;
6568
+ const { types } = config.baseTable.prototype;
6563
6569
  result.columnTypes = types || makeColumnTypes(defaultSchemaConfig);
6564
- if (snakeCase) result.snakeCase = true;
6565
- if (language) result.language = language;
6566
6570
  } else {
6567
6571
  const ct = "columnTypes" in config && config.columnTypes;
6568
6572
  result.columnTypes = (typeof ct === "function" ? ct(