Fix: Correctly handle 'null' default value for nullable fields (#780)

This commit is contained in:
PRANAV KUMAR
2025-12-04 12:28:38 +05:30
committed by GitHub
parent fe9debd825
commit b2b0ecf13b

View File

@@ -7,7 +7,7 @@ function checkDefault(field, database) {
if (isFunction(field.default)) return true;
if (
!field.notNull &&
typeof field === "string" &&
typeof field.default === "string" &&
field.default.toLowerCase() === "null"
)
return true;