orchid-orm 1.35.11 → 1.35.12

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.
@@ -1786,7 +1786,7 @@ var __spreadValues$2 = (a, b) => {
1786
1786
  return a;
1787
1787
  };
1788
1788
  var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
1789
- const processTables = async (ast, structureToAstCtx, domainsMap, adapter, tables, dbStructure, currentSchema, config, verifying) => {
1789
+ const processTables = async (ast, structureToAstCtx, domainsMap, adapter, tables, dbStructure, currentSchema, config, generatorIgnore, verifying) => {
1790
1790
  const createTables = collectCreateTables(
1791
1791
  tables,
1792
1792
  dbStructure,
@@ -1799,7 +1799,8 @@ const processTables = async (ast, structureToAstCtx, domainsMap, adapter, tables
1799
1799
  tables,
1800
1800
  dbStructure,
1801
1801
  currentSchema,
1802
- createTables
1802
+ createTables,
1803
+ generatorIgnore
1803
1804
  );
1804
1805
  applyChangeTableSchemas(changeTableSchemas, currentSchema, ast);
1805
1806
  await applyCreateOrRenameTables(
@@ -1849,18 +1850,25 @@ const collectCreateTables = (tables, dbStructure, currentSchema) => {
1849
1850
  return acc;
1850
1851
  }, []);
1851
1852
  };
1852
- const collectChangeAndDropTables = (config, tables, dbStructure, currentSchema, createTables) => {
1853
+ const collectChangeAndDropTables = (config, tables, dbStructure, currentSchema, createTables, generatorIgnore) => {
1854
+ var _a;
1853
1855
  const changeTables = [];
1854
1856
  const changeTableSchemas = [];
1855
1857
  const dropTables = [];
1856
1858
  const tableShapes = {};
1859
+ const ignoreTables = (_a = generatorIgnore == null ? void 0 : generatorIgnore.tables) == null ? void 0 : _a.map((name) => {
1860
+ const [schema = currentSchema, table] = getSchemaAndTableFromName(name);
1861
+ return { schema, table };
1862
+ });
1857
1863
  for (const dbTable of dbStructure.tables) {
1858
- if (dbTable.name === config.migrationsTable)
1864
+ if (dbTable.name === config.migrationsTable || (ignoreTables == null ? void 0 : ignoreTables.some(
1865
+ ({ schema, table }) => table === dbTable.name && schema === dbTable.schemaName
1866
+ )))
1859
1867
  continue;
1860
1868
  const codeTable = tables.find(
1861
1869
  (t) => {
1862
- var _a;
1863
- return t.table === dbTable.name && ((_a = t.q.schema) != null ? _a : currentSchema) === dbTable.schemaName;
1870
+ var _a2;
1871
+ return t.table === dbTable.name && ((_a2 = t.q.schema) != null ? _a2 : currentSchema) === dbTable.schemaName;
1864
1872
  }
1865
1873
  );
1866
1874
  if (codeTable) {
@@ -2090,6 +2098,7 @@ const composeMigration = async (adapter, config, ast, dbStructure, {
2090
2098
  dbStructure,
2091
2099
  currentSchema,
2092
2100
  config,
2101
+ internal.generatorIgnore,
2093
2102
  verifying
2094
2103
  );
2095
2104
  return astToMigration(currentSchema, config, ast);