orchid-orm 1.49.2 → 1.49.4

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