@axiosleo/orm-mysql 0.10.7 → 0.10.8

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/bin/orm-mysql.js CHANGED
@@ -9,7 +9,7 @@ const app = new App({
9
9
  name: 'MySQL ORM CLI',
10
10
  desc: 'migrate, model, seed, etc.',
11
11
  bin: 'orm-mysql',
12
- version: '0.10.7',
12
+ version: '0.10.8',
13
13
  commands_dir: path.join(__dirname, '../commands'),
14
14
  });
15
15
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axiosleo/orm-mysql",
3
- "version": "0.10.7",
3
+ "version": "0.10.8",
4
4
  "description": "MySQL ORM tool",
5
5
  "keywords": [
6
6
  "mysql",
package/src/builder.js CHANGED
@@ -465,7 +465,9 @@ class ManageSQLBuilder extends Builder {
465
465
  visible: 'boolean'
466
466
  });
467
467
 
468
- return _render('CREATE INDEX `${index_name}` ON `${table_name}` (${column_names}) ${visible}', {
468
+ let str = options.uniqIndex === true ? 'CREATE UNIQUE INDEX' : 'CREATE INDEX';
469
+
470
+ return _render(str + ' `${index_name}` ON `${table_name}` (${column_names}) ${visible}', {
469
471
  index_name: options.name,
470
472
  table_name: options.table,
471
473
  visible: options.visible === false ? 'INVISIBLE' : 'VISIBLE',