orchid-orm 1.64.10 → 1.65.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.
@@ -1,6 +1,6 @@
1
1
  import { promptSelect, getSchemaAndTableFromName, getDbTableColumnsChecks, dbColumnToAst, instantiateDbColumn, concatSchemaAndName, encodeColumnDefault, getIndexName, getExcludeName, getConstraintName, tableToAst, getMigrationsSchemaAndTable, getDbStructureTableData, makeDomainsMap, astToMigration, createMigrationInterface, introspectDbSchema, makeStructureToAstCtx, makeFileVersion, writeMigrationFile, migrateAndClose, getDbVersion, migrate, structureToAst, saveMigratedVersion, rakeDbCommands } from 'rake-db';
2
2
  export * from 'rake-db';
3
- import { colors, EnumColumn, ArrayColumn, toSnakeCase, getColumnBaseType, deepCompare, RawSql, emptyArray, toArray, getFreeSetAlias, VirtualColumn, getSupportedDefaultPrivileges, exhaustive, toCamelCase, addCode, pluralize, codeToString, emptyObject, getQuerySchema, DomainColumn, UnknownColumn, defaultSchemaConfig, toPascalCase, getImportPath, singleQuote, columnsShapeToCode, pushTableDataCode, quoteObjectKey, pathToLog } from 'pqb';
3
+ import { colors, EnumColumn, ArrayColumn, toSnakeCase, getColumnBaseType, deepCompare, RawSql, emptyArray, toArray, getFreeSetAlias, VirtualColumn, getSupportedDefaultPrivileges, exhaustive, toCamelCase, addCode, pluralize, codeToString, emptyObject, getQuerySchema, DomainColumn, UnknownColumn, defaultSchemaConfig, toPascalCase, getImportPath, singleQuote, columnsShapeToCode, pushTableDataCode, quoteObjectKey, pathToLog } from 'pqb/internal';
4
4
  import path from 'node:path';
5
5
  import { pathToFileURL } from 'url';
6
6
  import fs from 'fs/promises';
@@ -1522,8 +1522,7 @@ const processForeignKeys = (config, ast, changeTables, currentSchema, tableShape
1522
1522
  if (hasChangedColumn) continue;
1523
1523
  const foreignShape = tableShapes[`${dbReferences.foreignSchema}.${dbReferences.foreignTable}`];
1524
1524
  const hasForeignChangedColumn = foreignShape && dbReferences.foreignColumns.some((column) => {
1525
- const res = checkForColumnAddOrDrop(foreignShape, column);
1526
- return res;
1525
+ return checkForColumnAddOrDrop(foreignShape, column);
1527
1526
  });
1528
1527
  if (hasForeignChangedColumn) continue;
1529
1528
  let found = false;
@@ -2649,7 +2648,9 @@ const verifyMigration = async (adapter, config, migrationCode, generateMigration
2649
2648
  });
2650
2649
  const { log } = config;
2651
2650
  config.log = false;
2652
- const db = createMigrationInterface(trx, true, config);
2651
+ const db = createMigrationInterface(trx, true, config).getDb(
2652
+ config.columnTypes
2653
+ );
2653
2654
  config.log = log;
2654
2655
  for (const changeFn of changeFns) {
2655
2656
  await changeFn(db, true);