orchid-orm 1.64.10 → 1.65.1
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.d.ts +5 -4
- package/dist/index.js +183 -182
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -3
- package/dist/index.mjs.map +1 -1
- package/dist/migrations/index.d.ts +1 -1
- package/dist/migrations/index.js +99 -98
- package/dist/migrations/index.js.map +1 -1
- package/dist/migrations/index.mjs +5 -4
- package/dist/migrations/index.mjs.map +1 -1
- package/dist/migrations/node-postgres.d.ts +1 -1
- package/dist/migrations/node-postgres.js +99 -98
- package/dist/migrations/node-postgres.js.map +1 -1
- package/dist/migrations/node-postgres.mjs +5 -4
- package/dist/migrations/node-postgres.mjs.map +1 -1
- package/dist/migrations/postgres-js.d.ts +1 -1
- package/dist/migrations/postgres-js.js +99 -98
- package/dist/migrations/postgres-js.js.map +1 -1
- package/dist/migrations/postgres-js.mjs +5 -4
- package/dist/migrations/postgres-js.mjs.map +1 -1
- package/dist/node-postgres.d.ts +3 -3
- package/dist/node-postgres.js.map +1 -1
- package/dist/node-postgres.mjs.map +1 -1
- package/dist/postgres-js.d.ts +6 -5
- package/dist/postgres-js.js.map +1 -1
- package/dist/postgres-js.mjs.map +1 -1
- package/package.json +25 -21
|
@@ -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
|
-
|
|
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);
|