doix-db 1.0.14 → 1.0.15

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.
@@ -34,9 +34,11 @@ class DbMigrationPlan extends EventEmitter {
34
34
  this.lang = db.lang
35
35
  this.model = db.model
36
36
 
37
- this.toBe = new Map (); for (const {prefix, map} of db.model.schemata.values ())
38
- for (const [k, v] of map.entries ())
39
- this.toBe.set (prefix + k, v)
37
+ this.toBe = new Map (); for (const {map} of db.model.schemata.values ())
38
+
39
+ for (const o of map.values ())
40
+
41
+ this.toBe.set (o.fullName, o)
40
42
 
41
43
  db.lang.migrationPlan = this
42
44
 
@@ -3,7 +3,7 @@ class DbObject {
3
3
  constructor (o) {
4
4
 
5
5
  {
6
-
6
+
7
7
  const {name} = o, type = typeof name
8
8
 
9
9
  if (type !== 'string') throw Error (`name must be a string, not ${type}`)
@@ -26,7 +26,9 @@ class DbObject {
26
26
 
27
27
  get fullName () {
28
28
 
29
- const {name} = this.schema
29
+ const {schema} = this; if (!schema) return this.name
30
+
31
+ const {name} = schema
30
32
 
31
33
  return name === null ? this.name : `${name}.${this.name}`
32
34
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "doix-db",
3
- "version": "1.0.14",
3
+ "version": "1.0.15",
4
4
  "description": "Shared database related code for doix",
5
5
  "main": "index.js",
6
6
  "files": [