Permalink
Browse files

Fix detection of column types with DEFAULT CURRENT_TIMESTAMP(123). See

  • Loading branch information...
ansgarbecker committed Apr 1, 2017
1 parent 444a5bd commit 38cfdd0595af84cec7c86b62feb59e894ccdeb58
Showing with 2 additions and 2 deletions.
  1. +2 −2 source/dbconnection.pas
View
@@ -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]);

0 comments on commit 38cfdd0

Please sign in to comment.