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