From ce155c1a980c41f8fca9a7788e50386f6e2382b9 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Sun, 21 Jun 2009 12:24:19 +0000 Subject: [PATCH] Fix issue #1236 Wrong DEFAULT value detection in table editor --- source/table_editor.pas | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/source/table_editor.pas b/source/table_editor.pas index 20e891cd..499c7f00 100644 --- a/source/table_editor.pas +++ b/source/table_editor.pas @@ -345,12 +345,15 @@ begin if UpperCase(Copy(ColSpec, 1, 8)) = 'NOT NULL' then begin Props[3] := BoolToStr(False); Delete(ColSpec, 1, 9); - end else + ColDefaultType := cdtText; + ColDefaultText := ''; + end else begin Props[3] := BoolToStr(True); + ColDefaultType := cdtNull; + ColDefaultText := 'NULL'; + end; // Default value - ColDefaultType := cdtNull; - ColDefaultText := 'NULL'; if UpperCase(Copy(ColSpec, 1, 14)) = 'AUTO_INCREMENT' then begin ColDefaultType := cdtAutoInc; ColDefaultText := 'AUTO_INCREMENT';