Accept CURRENT_TIMESTAMP
for datetime
This commit is contained in:
parent
22f7012c47
commit
e8ea47fd3f
@ -62,6 +62,9 @@ function checkDefault(field) {
|
|||||||
return parseInt(date[0]) >= 1970 && parseInt(date[0]) <= 2038;
|
return parseInt(date[0]) >= 1970 && parseInt(date[0]) <= 2038;
|
||||||
}
|
}
|
||||||
case "DATETIME": {
|
case "DATETIME": {
|
||||||
|
if (field.default.toUpperCase() === "CURRENT_TIMESTAMP") {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (!/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(field.default)) {
|
if (!/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(field.default)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user