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,12 +992,16 @@ 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
cdtNothing: CellText := 'No default'; case Col.DefaultType of
cdtText, cdtTextUpdateTS: CellText := Col.DefaultText; cdtNothing: CellText := 'No default';
cdtNull, cdtNullUpdateTS: CellText := 'NULL'; cdtText, cdtTextUpdateTS: CellText := esc(Col.DefaultText);
cdtCurTS, cdtCurTSUpdateTS: CellText := 'CURRENT_TIMESTAMP'; cdtNull, cdtNullUpdateTS: CellText := 'NULL';
cdtAutoInc: CellText := 'AUTO_INCREMENT'; cdtCurTS, cdtCurTSUpdateTS: CellText := 'CURRENT_TIMESTAMP';
cdtAutoInc: CellText := 'AUTO_INCREMENT';
end;
if Col.DefaultType in [cdtTextUpdateTS, cdtNullUpdateTS, cdtCurTSUpdateTS] then
CellText := CellText + ' ON UPDATE CURRENT_TIMESTAMP';
end; end;
7: CellText := Col.Comment; 7: CellText := Col.Comment;
8: begin 8: begin