@fuzionx/framework 0.1.74 → 0.1.75
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/cli/index.js
CHANGED
|
@@ -103,9 +103,15 @@ function _knexColumnBuilder(t, col, def) {
|
|
|
103
103
|
c.notNullable();
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
// 기본값
|
|
106
|
+
// 기본값 — SQL 함수 표현식(now() 등)은 knex.raw()로 전달
|
|
107
107
|
if (def.default !== undefined) {
|
|
108
|
-
|
|
108
|
+
const val = def.default;
|
|
109
|
+
if (typeof val === 'string' && /^\w+\(.*\)$/.test(val)) {
|
|
110
|
+
// SQL 함수 표현식 (now(), uuid_generate_v4() 등)
|
|
111
|
+
c.defaultTo(t.client.raw(val));
|
|
112
|
+
} else {
|
|
113
|
+
c.defaultTo(val);
|
|
114
|
+
}
|
|
109
115
|
} else if ((def.type === 'integer' || def.type === 'bigInteger') && !def.nullable) {
|
|
110
116
|
c.defaultTo(0); // non-nullable integer만 0 기본값 (nullable FK는 NULL 유지)
|
|
111
117
|
} else if (def.type === 'boolean') {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fuzionx/framework",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.75",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Full-stack MVC framework built on @fuzionx/core — Controller, Service, Model, Middleware, DI, EventBus",
|
|
6
6
|
"main": "index.js",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@aws-sdk/client-s3": "^3.1028.0",
|
|
38
|
-
"@fuzionx/core": "^0.1.
|
|
38
|
+
"@fuzionx/core": "^0.1.75",
|
|
39
39
|
"better-sqlite3": "^12.8.0",
|
|
40
40
|
"knex": "^3.2.5",
|
|
41
41
|
"mongoose": "^9.3.2",
|