orchid-orm 1.49.2 → 1.49.3

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.
@@ -2043,6 +2043,8 @@ const addChangeTable = (dbStructure, changeTables, tableShapes, currentSchema, d
2043
2043
  };
2044
2044
  const cloneCodeTableForChange = (codeTable) => ({
2045
2045
  ...codeTable,
2046
+ // codeTable is a class instance and not all props can be cloned with `...`
2047
+ table: codeTable.table,
2046
2048
  shape: Object.fromEntries(
2047
2049
  Object.entries(codeTable.shape).map(([key, column]) => {
2048
2050
  const cloned = Object.create(column);
@@ -2754,6 +2756,7 @@ const processHasAndBelongsToManyColumn = (column, habtmTables, codeItems) => {
2754
2756
  joinTable.internal = {
2755
2757
  ...joinTable.internal,
2756
2758
  tableData: {
2759
+ ...joinTable.internal.tableData,
2757
2760
  primaryKey: {
2758
2761
  columns: Object.keys(shape)
2759
2762
  }