Skip to content

Commit

Permalink
Fix detection of column types with DEFAULT CURRENT_TIMESTAMP(123). See
Browse files Browse the repository at this point in the history
  • Loading branch information
ansgarbecker committed Apr 1, 2017
1 parent 444a5bd commit 38cfdd0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/dbconnection.pas
Expand Up @@ -4969,9 +4969,9 @@ procedure TDBConnection.ParseTableStructure(CreateTable: String; Columns: TTable
if rxCol.Match[3] <> '' then
Col.DefaultType := cdtNullUpdateTS;
Delete(ColSpec, 1, rxCol.MatchLen[0]);
end else if rxCol.Match[1] = 'CURRENT_TIMESTAMP' then begin
end else if StartsText('CURRENT_TIMESTAMP', rxCol.Match[1]) then begin
Col.DefaultType := cdtCurTS;
Col.DefaultText := 'CURRENT_TIMESTAMP';
Col.DefaultText := rxCol.Match[1];
if rxCol.Match[3] <> '' then
Col.DefaultType := cdtCurTSUpdateTS;
Delete(ColSpec, 1, rxCol.MatchLen[0]);
Expand Down

0 comments on commit 38cfdd0

Please sign in to comment.