Indicate ON UPDATE clause in table editor's column list. Fixes issue #1545.

This commit is contained in:
Ansgar Becker
2009-12-21 12:42:16 +00:00
parent 45ea75752a
commit d92a7d4394

View File

@ -992,13 +992,17 @@ begin
2: CellText := Col.DataType.Name; 2: CellText := Col.DataType.Name;
3: CellText := Col.LengthSet; 3: CellText := Col.LengthSet;
4, 5: CellText := ''; // Checkbox 4, 5: CellText := ''; // Checkbox
6: case Col.DefaultType of 6: begin
case Col.DefaultType of
cdtNothing: CellText := 'No default'; cdtNothing: CellText := 'No default';
cdtText, cdtTextUpdateTS: CellText := Col.DefaultText; cdtText, cdtTextUpdateTS: CellText := esc(Col.DefaultText);
cdtNull, cdtNullUpdateTS: CellText := 'NULL'; cdtNull, cdtNullUpdateTS: CellText := 'NULL';
cdtCurTS, cdtCurTSUpdateTS: CellText := 'CURRENT_TIMESTAMP'; cdtCurTS, cdtCurTSUpdateTS: CellText := 'CURRENT_TIMESTAMP';
cdtAutoInc: CellText := 'AUTO_INCREMENT'; cdtAutoInc: CellText := 'AUTO_INCREMENT';
end; end;
if Col.DefaultType in [cdtTextUpdateTS, cdtNullUpdateTS, cdtCurTSUpdateTS] then
CellText := CellText + ' ON UPDATE CURRENT_TIMESTAMP';
end;
7: CellText := Col.Comment; 7: CellText := Col.Comment;
8: begin 8: begin
CellText := Col.Collation; CellText := Col.Collation;