orchid-orm 1.53.0 → 1.54.1

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.
@@ -923,28 +923,28 @@ const changeEnum = (ast, dbEnum, codeEnum) => {
923
923
  const { values: dbValues } = dbEnum;
924
924
  const { values: codeValues, schema, name } = codeEnum;
925
925
  if (dbValues.length < codeValues.length) {
926
- if (!dbValues.some((value, i) => value !== codeValues[i])) {
926
+ if (!dbValues.some((value) => !codeValues.includes(value))) {
927
927
  ast.push({
928
928
  type: "enumValues",
929
929
  action: "add",
930
930
  schema,
931
931
  name,
932
- values: codeValues.slice(-(codeValues.length - dbValues.length))
932
+ values: codeValues.filter((value) => !dbValues.includes(value))
933
933
  });
934
934
  return;
935
935
  }
936
936
  } else if (dbValues.length > codeValues.length) {
937
- if (!codeValues.some((value, i) => value !== dbValues[i])) {
937
+ if (!codeValues.some((value) => !dbValues.includes(value))) {
938
938
  ast.push({
939
939
  type: "enumValues",
940
940
  action: "drop",
941
941
  schema,
942
942
  name,
943
- values: dbValues.slice(-(dbValues.length - codeValues.length))
943
+ values: dbValues.filter((value) => !codeValues.includes(value))
944
944
  });
945
945
  return;
946
946
  }
947
- } else if (!dbValues.some((value, i) => value !== codeValues[i])) {
947
+ } else if (!dbValues.some((value) => !codeValues.includes(value))) {
948
948
  return;
949
949
  }
950
950
  ast.push({