orange-dragonfly-orm-model-to-sql 0.7.3 → 0.7.4

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 +1 -1
  2. package/src/mysql.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orange-dragonfly-orm-model-to-sql",
3
- "version": "0.7.3",
3
+ "version": "0.7.4",
4
4
  "description": "Converts Orange Dragonfly validator model to SQL CREATE TABLE syntax",
5
5
  "main": "index.js",
6
6
  "repository": {
package/src/mysql.js CHANGED
@@ -110,7 +110,7 @@ class OrangeDragonflyORMSchemaToMySQL {
110
110
  const queries = []
111
111
  for (let [index, is_unique] of Object.entries(indexes)) {
112
112
  if (is_unique) {
113
- queries.push(`CREATE UNIQUE INDEX uq_${index.replace('.', '__').replaceAll('/', '___')} ON ${index.split('/')[0].split('.')[0]} (${index.split('/').map(v => v.split('.')[1]).join(', ')});`)
113
+ queries.push(`CREATE UNIQUE INDEX uq_${index.replaceAll('.', '__').replaceAll('/', '___')} ON ${index.split('/')[0].split('.')[0]} (${index.split('/').map(v => v.split('.')[1]).join(', ')});`)
114
114
  } else {
115
115
  queries.push(`CREATE INDEX ix_${index.replace('.', '__')} ON ${index.split('.')[0]} (${index.split('.')[1]});`)
116
116
  }