befly 3.9.3 → 3.9.4
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/package.json +2 -2
- package/sync/syncDb/ddl.ts +2 -2
- package/tests/syncDb-ddl.test.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "befly",
|
|
3
|
-
"version": "3.9.
|
|
3
|
+
"version": "3.9.4",
|
|
4
4
|
"description": "Befly - 为 Bun 专属打造的 TypeScript API 接口框架核心引擎",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"pino": "^10.1.0",
|
|
74
74
|
"pino-roll": "^4.0.0"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "19ec26ee9c8cf1f4ca6c4693176272a77a67f673",
|
|
77
77
|
"devDependencies": {
|
|
78
78
|
"typescript": "^5.9.3"
|
|
79
79
|
}
|
package/sync/syncDb/ddl.ts
CHANGED
|
@@ -72,14 +72,14 @@ export function getSystemColumnDef(fieldName: string): string | null {
|
|
|
72
72
|
created_at: '`created_at` BIGINT UNSIGNED NOT NULL DEFAULT 0 COMMENT "创建时间"',
|
|
73
73
|
updated_at: '`updated_at` BIGINT UNSIGNED NOT NULL DEFAULT 0 COMMENT "更新时间"',
|
|
74
74
|
deleted_at: '`deleted_at` BIGINT UNSIGNED NOT NULL DEFAULT 0 COMMENT "删除时间"',
|
|
75
|
-
state: '`state` BIGINT UNSIGNED NOT NULL DEFAULT
|
|
75
|
+
state: '`state` BIGINT UNSIGNED NOT NULL DEFAULT 1 COMMENT "状态字段"'
|
|
76
76
|
};
|
|
77
77
|
const pgDefs: Record<string, string> = {
|
|
78
78
|
id: '"id" INTEGER PRIMARY KEY',
|
|
79
79
|
created_at: '"created_at" INTEGER NOT NULL DEFAULT 0',
|
|
80
80
|
updated_at: '"updated_at" INTEGER NOT NULL DEFAULT 0',
|
|
81
81
|
deleted_at: '"deleted_at" INTEGER NOT NULL DEFAULT 0',
|
|
82
|
-
state: '"state" INTEGER NOT NULL DEFAULT
|
|
82
|
+
state: '"state" INTEGER NOT NULL DEFAULT 1'
|
|
83
83
|
};
|
|
84
84
|
|
|
85
85
|
const defs = isMySQL() ? mysqlDefs : pgDefs;
|
package/tests/syncDb-ddl.test.ts
CHANGED
|
@@ -74,7 +74,7 @@ describe('buildSystemColumnDefs (MySQL)', () => {
|
|
|
74
74
|
const def = defs.find((d: string) => d.includes('`state`'));
|
|
75
75
|
expect(def).toContain('BIGINT UNSIGNED');
|
|
76
76
|
expect(def).toContain('NOT NULL');
|
|
77
|
-
expect(def).toContain('DEFAULT
|
|
77
|
+
expect(def).toContain('DEFAULT 1');
|
|
78
78
|
});
|
|
79
79
|
});
|
|
80
80
|
|