@mikro-orm/sql 7.1.14-dev.0 → 7.1.14-dev.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/sql",
3
- "version": "7.1.14-dev.0",
3
+ "version": "7.1.14-dev.1",
4
4
  "description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.",
5
5
  "keywords": [
6
6
  "data-mapper",
@@ -53,7 +53,7 @@
53
53
  "@mikro-orm/core": "^7.1.13"
54
54
  },
55
55
  "peerDependencies": {
56
- "@mikro-orm/core": "7.1.14-dev.0"
56
+ "@mikro-orm/core": "7.1.14-dev.1"
57
57
  },
58
58
  "engines": {
59
59
  "node": ">= 22.17.0"
@@ -963,13 +963,13 @@ export class SchemaComparator {
963
963
  }
964
964
  diffTrigger(from, to) {
965
965
  // Raw DDL expression cannot be meaningfully compared to introspected
966
- // trigger metadata, so skip diffing when the metadata side uses it.
967
- if (to.expression) {
966
+ // trigger metadata, so it needs special handling when either side uses it.
967
+ if (from.expression || to.expression) {
968
968
  // Both sides have expression — compare the raw DDL directly
969
- if (from.expression) {
969
+ if (from.expression && to.expression) {
970
970
  return this.diffExpression(from.expression, to.expression);
971
971
  }
972
- // Only metadata side has expression — the raw DDL cannot be compared to
972
+ // Only one side has expression — the raw DDL cannot be compared to
973
973
  // introspected metadata. Changes to the expression value won't be detected;
974
974
  // drop and recreate the trigger manually to apply expression changes.
975
975
  return false;