@travetto/model-mysql 8.0.0-alpha.13 → 8.0.0-alpha.14

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.
Files changed (2) hide show
  1. package/package.json +3 -3
  2. package/src/dialect.ts +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/model-mysql",
3
- "version": "8.0.0-alpha.13",
3
+ "version": "8.0.0-alpha.14",
4
4
  "type": "module",
5
5
  "description": "MySQL backing for the travetto model module, with real-time modeling support for SQL schemas.",
6
6
  "keywords": [
@@ -31,8 +31,8 @@
31
31
  "@travetto/config": "^8.0.0-alpha.12",
32
32
  "@travetto/context": "^8.0.0-alpha.11",
33
33
  "@travetto/model": "^8.0.0-alpha.12",
34
- "@travetto/model-query": "^8.0.0-alpha.12",
35
- "@travetto/model-sql": "^8.0.0-alpha.13",
34
+ "@travetto/model-query": "^8.0.0-alpha.13",
35
+ "@travetto/model-sql": "^8.0.0-alpha.14",
36
36
  "mysql2": "^3.21.0"
37
37
  },
38
38
  "peerDependencies": {
package/src/dialect.ts CHANGED
@@ -112,7 +112,7 @@ export class MySQLDialect extends SQLDialect {
112
112
  WHERE
113
113
  stat.TABLE_NAME = '${table}'
114
114
  AND stat.TABLE_SCHEMA = DATABASE()
115
- AND tc.CONSTRAINT_TYPE IS NULL
115
+ AND (tc.CONSTRAINT_TYPE IS NULL OR tc.CONSTRAINT_TYPE = 'UNIQUE')
116
116
  AND stat.COLUMN_NAME NOT IN (${IGNORE_FIELDS.join(',')})
117
117
  GROUP BY stat.INDEX_NAME, stat.NON_UNIQUE
118
118
  `)