mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
Table editor: disallow editing direction/collation of index node level
This commit is contained in:
@ -2066,9 +2066,11 @@ begin
|
||||
VT := Sender as TVirtualStringtree;
|
||||
Allowed := False;
|
||||
if VT.GetNodeLevel(Node) = 0 then begin
|
||||
// Disallow renaming primary key
|
||||
if (Column <> 0) or (VT.Text[Node, 1] <> TTableKey.PRIMARY) then
|
||||
// Disallow renaming primary key, and direction/collation of key node level
|
||||
if (Column = 0) and (VT.Text[Node, 1] <> TTableKey.PRIMARY) then
|
||||
Allowed := True
|
||||
else
|
||||
Allowed := Column in [1,2,3];
|
||||
end else case Column of
|
||||
0: Allowed := True;
|
||||
1: begin
|
||||
|
Reference in New Issue
Block a user