@mikro-orm/knex 6.5.5-dev.3 → 6.5.5-dev.5

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.
@@ -63,7 +63,7 @@ class BaseSqliteSchemaHelper extends SchemaHelper_1.SchemaHelper {
63
63
  if (col.hidden > 1) {
64
64
  /* istanbul ignore next */
65
65
  const storage = col.hidden === 2 ? 'virtual' : 'stored';
66
- const re = `(generated always)? as \\((.*)\\)( ${storage})?$`;
66
+ const re = new RegExp(`(generated always)? as \\((.*)\\)( ${storage})?$`, 'i');
67
67
  const match = columnDefinitions[col.name].definition.match(re);
68
68
  if (match) {
69
69
  generated = `${match[2]} ${storage}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/knex",
3
- "version": "6.5.5-dev.3",
3
+ "version": "6.5.5-dev.5",
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
  "main": "index.js",
6
6
  "module": "index.mjs",
@@ -66,7 +66,7 @@
66
66
  "@mikro-orm/core": "^6.5.4"
67
67
  },
68
68
  "peerDependencies": {
69
- "@mikro-orm/core": "6.5.5-dev.3",
69
+ "@mikro-orm/core": "6.5.5-dev.5",
70
70
  "better-sqlite3": "*",
71
71
  "libsql": "*",
72
72
  "mariadb": "*"
@@ -504,7 +504,12 @@ class SchemaComparator {
504
504
  diffExpression(expr1, expr2) {
505
505
  // expressions like check constraints might be normalized by the driver,
506
506
  // e.g. quotes might be added (https://github.com/mikro-orm/mikro-orm/issues/3827)
507
- const simplify = (str) => str?.replace(/_\w+'(.*?)'/g, '$1').replace(/['"`()]|::\w+| +/g, '').toLowerCase();
507
+ const simplify = (str) => {
508
+ return str
509
+ ?.replace(/_\w+'(.*?)'/g, '$1')
510
+ .replace(/['"`()\n[\]]|::\w+| +/g, '')
511
+ .toLowerCase();
512
+ };
508
513
  return simplify(expr1) !== simplify(expr2);
509
514
  }
510
515
  parseJsonDefault(defaultValue) {