befly 3.9.12 → 3.9.13
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/docs/README.md +85 -0
- package/docs/addon.md +512 -0
- package/docs/api.md +1368 -0
- package/docs/cipher.md +580 -0
- package/docs/config.md +638 -0
- package/docs/examples.md +799 -0
- package/docs/hook.md +754 -0
- package/docs/logger.md +495 -0
- package/docs/plugin.md +978 -0
- package/docs/quickstart.md +331 -0
- package/docs/sync.md +586 -0
- package/docs/table.md +765 -0
- package/docs/validator.md +588 -0
- package/package.json +3 -3
- package/sync/syncDb/apply.ts +1 -1
- package/sync/syncDb/constants.ts +0 -11
- package/sync/syncDb/helpers.ts +0 -1
- package/sync/syncDb/table.ts +2 -2
- package/sync/syncDb/tableCreate.ts +3 -3
- package/tests/syncDb-constants.test.ts +1 -23
- package/tests/syncDb-helpers.test.ts +0 -1
- package/types/database.d.ts +0 -2
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* 测试 constants.ts 中的常量:
|
|
5
5
|
* - DB_VERSION_REQUIREMENTS
|
|
6
|
-
* -
|
|
6
|
+
* - SYSTEM_INDEX_FIELDS
|
|
7
7
|
* - SYSTEM_INDEX_FIELDS
|
|
8
8
|
* - CHANGE_TYPE_LABELS
|
|
9
9
|
* - MYSQL_TABLE_CONFIG
|
|
@@ -36,28 +36,6 @@ describe('DB_VERSION_REQUIREMENTS', () => {
|
|
|
36
36
|
});
|
|
37
37
|
});
|
|
38
38
|
|
|
39
|
-
describe('SYSTEM_FIELDS', () => {
|
|
40
|
-
test('包含 id 字段', () => {
|
|
41
|
-
expect(constants.SYSTEM_FIELDS.ID.name).toBe('id');
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
test('包含 created_at 字段', () => {
|
|
45
|
-
expect(constants.SYSTEM_FIELDS.CREATED_AT.name).toBe('created_at');
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
test('包含 updated_at 字段', () => {
|
|
49
|
-
expect(constants.SYSTEM_FIELDS.UPDATED_AT.name).toBe('updated_at');
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
test('包含 deleted_at 字段', () => {
|
|
53
|
-
expect(constants.SYSTEM_FIELDS.DELETED_AT.name).toBe('deleted_at');
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
test('包含 state 字段', () => {
|
|
57
|
-
expect(constants.SYSTEM_FIELDS.STATE.name).toBe('state');
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
|
|
61
39
|
describe('SYSTEM_INDEX_FIELDS', () => {
|
|
62
40
|
test('包含 created_at', () => {
|
|
63
41
|
expect(constants.SYSTEM_INDEX_FIELDS).toContain('created_at');
|
|
@@ -67,7 +67,6 @@ describe('applyFieldDefaults', () => {
|
|
|
67
67
|
expect(fieldDef.default).toBe(null);
|
|
68
68
|
expect(fieldDef.index).toBe(false);
|
|
69
69
|
expect(fieldDef.unique).toBe(false);
|
|
70
|
-
expect(fieldDef.comment).toBe('');
|
|
71
70
|
expect(fieldDef.nullable).toBe(false);
|
|
72
71
|
expect(fieldDef.unsigned).toBe(true);
|
|
73
72
|
expect(fieldDef.regexp).toBe(null);
|