@famgia/omnify-laravel 2.0.34 → 2.0.35

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.
@@ -1013,9 +1013,18 @@ function renderForeignKeys(blueprint) {
1013
1013
  return "\n" + lines.join("\n");
1014
1014
  }
1015
1015
  function renderIndexes(blueprint) {
1016
+ const columnsWithUniqueModifier = /* @__PURE__ */ new Set();
1017
+ for (const column of blueprint.columns) {
1018
+ if (column.modifiers.some((mod) => mod.method === "unique")) {
1019
+ columnsWithUniqueModifier.add(column.name);
1020
+ }
1021
+ }
1016
1022
  const customIndexes = blueprint.indexes.filter((idx) => {
1017
1023
  if (idx.unique && idx.columns.length === 1) {
1018
- return false;
1024
+ const columnName = idx.columns[0];
1025
+ if (columnName && columnsWithUniqueModifier.has(columnName)) {
1026
+ return false;
1027
+ }
1019
1028
  }
1020
1029
  return true;
1021
1030
  });
@@ -5666,4 +5675,4 @@ export {
5666
5675
  getFactoryPath,
5667
5676
  laravelPlugin
5668
5677
  };
5669
- //# sourceMappingURL=chunk-XEXTOJRM.js.map
5678
+ //# sourceMappingURL=chunk-BN5HLOML.js.map