orchid-orm 1.49.4 → 1.49.5
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/migrations.js +2 -2
- package/dist/migrations.js.map +1 -1
- package/dist/migrations.mjs +3 -3
- package/dist/migrations.mjs.map +1 -1
- package/package.json +5 -5
package/dist/migrations.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { promptSelect, colors, getSchemaAndTableFromName, getDbTableColumnsChecks, dbColumnToAst, instantiateDbColumn, concatSchemaAndName, encodeColumnDefault, getIndexName, getExcludeName, getConstraintName, tableToAst, getDbStructureTableData, makeDomainsMap, astToMigration, createMigrationInterface, introspectDbSchema, exhaustive, pluralize, makeStructureToAstCtx, makeFileVersion, writeMigrationFile, migrate, structureToAst, saveMigratedVersion, rakeDbCommands } from 'rake-db';
|
|
2
2
|
export * from 'rake-db';
|
|
3
3
|
import { toSnakeCase, deepCompare, emptyArray, toArray, addCode, codeToString, toCamelCase, toPascalCase, getImportPath, singleQuote, quoteObjectKey, pathToLog } from 'orchid-core';
|
|
4
|
-
import { EnumColumn, ArrayColumn,
|
|
4
|
+
import { EnumColumn, ArrayColumn, getColumnBaseType, RawSQL, VirtualColumn, DomainColumn, UnknownColumn, defaultSchemaConfig, columnsShapeToCode, pushTableDataCode, Adapter } from 'pqb';
|
|
5
5
|
import path from 'node:path';
|
|
6
6
|
import { pathToFileURL } from 'url';
|
|
7
7
|
import fs from 'fs/promises';
|
|
@@ -471,8 +471,8 @@ JOIN pg_type AS t ON t.oid = casttarget`);
|
|
|
471
471
|
}
|
|
472
472
|
typeCastsCache.value = typeCasts;
|
|
473
473
|
}
|
|
474
|
-
const dbBaseType = dbColumn
|
|
475
|
-
const codeBaseType = codeColumn
|
|
474
|
+
const dbBaseType = getColumnBaseType(dbColumn, domainsMap, dbType);
|
|
475
|
+
const codeBaseType = getColumnBaseType(codeColumn, domainsMap, codeType);
|
|
476
476
|
if (!typeCasts.get(dbBaseType)?.has(codeBaseType)) {
|
|
477
477
|
if (!(dbColumn instanceof EnumColumn) || !(codeColumn instanceof EnumColumn) || !deepCompare(dbColumn.options, codeColumn.options)) {
|
|
478
478
|
if (verifying) throw new AbortSignal();
|