dobo 1.1.9 → 1.1.10

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.
@@ -36,7 +36,7 @@ async function sanitizeFullText (item) {
36
36
 
37
37
  async function sanitizeSchema (items) {
38
38
  const { freeze, fatal, importModule, defaultsDeep, join, breakNsPath, runHook } = this.app.bajo
39
- const { orderBy, map, keys, findIndex, find, each, isString, get, isPlainObject, camelCase, uniq, filter } = this.lib._
39
+ const { isEmpty, orderBy, map, keys, findIndex, find, each, isString, get, isPlainObject, camelCase, uniq, filter } = this.lib._
40
40
  const propTypes = keys(this.propType)
41
41
  const schemas = []
42
42
  this.log.debug('loadingDbSchemas')
@@ -64,7 +64,7 @@ async function sanitizeSchema (items) {
64
64
  maxLength = maxLength ?? 255
65
65
  prop = { name, type }
66
66
  if (type === 'string') prop.maxLength = parseInt(maxLength) || undefined
67
- if (index) prop.index = { type: index === 'true' ? 'default' : index }
67
+ if (!isEmpty(index)) prop.index = { type: index === 'true' ? 'default' : index }
68
68
  prop.required = required === 'true'
69
69
  item.properties[idx] = prop
70
70
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dobo",
3
- "version": "1.1.9",
3
+ "version": "1.1.10",
4
4
  "description": "Database ORM/ODM for Bajo Framework",
5
5
  "main": "index.js",
6
6
  "scripts": {