orchid-orm 1.26.2 → 1.27.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.
@@ -1488,6 +1488,7 @@ const processTables = async (ast, structureToAstCtx, domainsMap, adapter, tables
1488
1488
  const compareSql = { values: [], expressions: [] };
1489
1489
  const tableExpressions = [];
1490
1490
  const { changeTables, changeTableSchemas, dropTables, tableShapes } = collectChangeAndDropTables(
1491
+ config,
1491
1492
  tables,
1492
1493
  dbStructure,
1493
1494
  currentSchema,
@@ -1541,13 +1542,13 @@ const collectCreateTables = (tables, dbStructure, currentSchema) => {
1541
1542
  return acc;
1542
1543
  }, []);
1543
1544
  };
1544
- const collectChangeAndDropTables = (tables, dbStructure, currentSchema, createTables) => {
1545
+ const collectChangeAndDropTables = (config, tables, dbStructure, currentSchema, createTables) => {
1545
1546
  const changeTables = [];
1546
1547
  const changeTableSchemas = [];
1547
1548
  const dropTables = [];
1548
1549
  const tableShapes = {};
1549
1550
  for (const dbTable of dbStructure.tables) {
1550
- if (dbTable.name === "schemaMigrations")
1551
+ if (dbTable.name === config.migrationsTable)
1551
1552
  continue;
1552
1553
  const codeTable = tables.find(
1553
1554
  (t) => {
@@ -2758,7 +2759,7 @@ const pull = async (options, config) => {
2758
2759
  const [adapter] = adapters;
2759
2760
  const currentSchema = adapter.schema || "public";
2760
2761
  const ctx = makeStructureToAstCtx(config, currentSchema);
2761
- const asts = await structureToAst(ctx, adapter);
2762
+ const asts = await structureToAst(ctx, adapter, config);
2762
2763
  const { tableInfos, fkeys } = getTableInfosAndFKeys(asts, config);
2763
2764
  const exclusiveWriteOptions = { flag: "wx" };
2764
2765
  const pendingFileWrites = [];