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.
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/dist/migrations.js +5 -5
- package/dist/migrations.js.map +1 -1
- package/dist/migrations.mjs +5 -5
- package/dist/migrations.mjs.map +1 -1
- package/package.json +5 -5
package/dist/migrations.mjs
CHANGED
|
@@ -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
|
|
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.
|
|
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
|
|
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.
|
|
942
|
+
values: dbValues.filter((value) => !codeValues.includes(value))
|
|
943
943
|
});
|
|
944
944
|
return;
|
|
945
945
|
}
|
|
946
|
-
} else if (!dbValues.some((value
|
|
946
|
+
} else if (!dbValues.some((value) => !codeValues.includes(value))) {
|
|
947
947
|
return;
|
|
948
948
|
}
|
|
949
949
|
ast.push({
|