@engine9/schemas 1.9.0 → 1.9.1
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/README.md +0 -2
- package/package.json +1 -1
- package/person/schema.js +0 -32
package/README.md
CHANGED
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
The engine9 standard schemas: shared tables, inbound transforms, searches, and segments used by core and by plugins. Each directory with an `index.js` is a **schema plugin** (`@engine9/schemas/person_email`, `@engine9/schemas/transaction/core`, …). A schema plugin's table definitions are its `schema.js`. Building on these schema plugins lets other plugins share common tools and features while adding their own functionality.
|
|
4
4
|
|
|
5
|
-
This package was published as `@engine9/interfaces` through 1.8.1. `@engine9/core` still reads `@engine9/interfaces/...` paths stored before the rename; `PluginWorker.migratePackageRename` rewrites them.
|
|
6
|
-
|
|
7
5
|
This package is [MIT licensed](./LICENSE). Use, copy, modify, and distribute
|
|
8
6
|
this code as-is.
|
|
9
7
|
|
package/package.json
CHANGED
package/person/schema.js
CHANGED
|
@@ -8,39 +8,7 @@ export const tables = [
|
|
|
8
8
|
created_at: 'created_at',
|
|
9
9
|
modified_at: 'modified_at'
|
|
10
10
|
}
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
name: 'person_identifier',
|
|
14
|
-
columns: {
|
|
15
|
-
id: 'id',
|
|
16
|
-
person_id: 'person_id',
|
|
17
|
-
source_input_id: 'uuid',
|
|
18
|
-
id_type: {
|
|
19
|
-
type: 'enum',
|
|
20
|
-
nullable: false,
|
|
21
|
-
default_value: '',
|
|
22
|
-
values: ['', 'remote_person_id', 'email_hash_v1', 'phone_hash_v1', 'delegate']
|
|
23
|
-
},
|
|
24
|
-
id_value: 'id_string'
|
|
25
|
-
},
|
|
26
|
-
indexes: [
|
|
27
|
-
{ columns: ['person_id'] },
|
|
28
|
-
{ columns: ['id_value'] },
|
|
29
|
-
// useful for finding anyone related to an input
|
|
30
|
-
// same input can't have the same id value twice
|
|
31
|
-
{ columns: ['source_input_id', 'id_value', 'person_id'], unique: true }
|
|
32
|
-
]
|
|
33
11
|
}
|
|
34
|
-
/*
|
|
35
|
-
//sometimes useful, debating whether useful enough to be global
|
|
36
|
-
create view person_identifier_summary
|
|
37
|
-
as select p.*,
|
|
38
|
-
input.remote_input_id,
|
|
39
|
-
input.remote_input_name,input_type,
|
|
40
|
-
plugin_id,plugin.path,plugin.name,plugin.remote_plugin_id
|
|
41
|
-
from person_identifier p
|
|
42
|
-
join input on (p.source_input_id=input.id)
|
|
43
|
-
join plugin on (input.plugin_id=plugin.id); */
|
|
44
12
|
];
|
|
45
13
|
export default {
|
|
46
14
|
tables
|