mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-26 11:17:57 +08:00
If user disables "Allow NULL" for some column which has NULL as default value, silently change that default value to "No default", instead of "Custom text". Additionally, this fixes the default text "NULL" as literal in such cases.
This commit is contained in:
@ -1204,8 +1204,10 @@ begin
|
||||
5: begin
|
||||
Col.AllowNull := not Col.AllowNull;
|
||||
// Switch default value from NULL to Text if Allow Null is off
|
||||
if (not Col.AllowNull) and (Col.DefaultType in [cdtNull, cdtNullUpdateTS]) then
|
||||
Col.DefaultType := cdtText;
|
||||
if (not Col.AllowNull) and (Col.DefaultType in [cdtNull, cdtNullUpdateTS]) then begin
|
||||
Col.DefaultType := cdtNothing;
|
||||
Col.DefaultText := '';
|
||||
end;
|
||||
Col.Status := esModified;
|
||||
VT.InvalidateNode(Node);
|
||||
end;
|
||||
|
Reference in New Issue
Block a user