mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2026-03-13 09:24:25 +08:00
Support comments on table indexes via table designer. Closes #128
This commit is contained in:
@@ -10589,6 +10589,9 @@ begin
|
||||
|
||||
if Algorithm <> '' then
|
||||
Result := Result + ' USING ' + Algorithm;
|
||||
|
||||
if not Comment.IsEmpty then
|
||||
Result := Result + ' COMMENT ' + FConnection.EscapeString(Comment);
|
||||
end;
|
||||
|
||||
procedure TTableKeyList.Assign(Source: TTableKeyList);
|
||||
|
||||
@@ -280,7 +280,7 @@ object frmTableEditor: TfrmTableEditor
|
||||
Options = [coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark, coVisible, coAllowFocus]
|
||||
Position = 0
|
||||
Text = 'Name'
|
||||
Width = 434
|
||||
Width = 214
|
||||
end
|
||||
item
|
||||
Options = [coEnabled, coParentBidiMode, coParentColor, coResizable, coShowDropMark, coVisible, coAllowFocus]
|
||||
@@ -292,6 +292,11 @@ object frmTableEditor: TfrmTableEditor
|
||||
Position = 2
|
||||
Text = 'Algorithm'
|
||||
Width = 80
|
||||
end
|
||||
item
|
||||
Position = 3
|
||||
Text = 'Comment'
|
||||
Width = 120
|
||||
end>
|
||||
end
|
||||
object tlbIndexes: TToolBar
|
||||
|
||||
@@ -1797,6 +1797,7 @@ begin
|
||||
CellText := TblKey.Name;
|
||||
1: CellText := TblKey.IndexType;
|
||||
2: CellText := TblKey.Algorithm;
|
||||
3: CellText := TblKey.Comment;
|
||||
end;
|
||||
end;
|
||||
1: begin
|
||||
@@ -2100,6 +2101,7 @@ begin
|
||||
TblKey.Name := TTableKey.PRIMARY;
|
||||
end;
|
||||
2: TblKey.Algorithm := NewText;
|
||||
3: TblKey.Comment := NewText;
|
||||
end;
|
||||
// Needs to be called manually for Name and IndexType properties:
|
||||
TblKey.Modification(Sender);
|
||||
|
||||
Reference in New Issue
Block a user