This commit is contained in:
Ansgar Becker
2009-07-22 05:50:07 +00:00
parent c0f445185d
commit 0c3bc34802
2 changed files with 9 additions and 8 deletions

View File

@@ -1103,13 +1103,13 @@ end;
function GetColumnDefaultClause(DefaultType: TColumnDefaultType; Text: WideString): WideString;
begin
case DefaultType of
cdtText: Result := ' DEFAULT '+esc(Text);
cdtTextUpdateTS: Result := ' DEFAULT '+esc(Text)+' ON UPDATE CURRENT_TIMESTAMP';
cdtNull: Result := ' DEFAULT NULL';
cdtNullUpdateTS: Result := ' DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP';
cdtCurTS: Result := ' DEFAULT CURRENT_TIMESTAMP';
cdtCurTSUpdateTS: Result := ' DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP';
cdtAutoInc: Result := ' AUTO_INCREMENT';
cdtText: Result := 'DEFAULT '+esc(Text);
cdtTextUpdateTS: Result := 'DEFAULT '+esc(Text)+' ON UPDATE CURRENT_TIMESTAMP';
cdtNull: Result := 'DEFAULT NULL';
cdtNullUpdateTS: Result := 'DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP';
cdtCurTS: Result := 'DEFAULT CURRENT_TIMESTAMP';
cdtCurTSUpdateTS: Result := 'DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP';
cdtAutoInc: Result := 'AUTO_INCREMENT';
end;
end;

View File

@@ -654,6 +654,7 @@ begin
end;
Result := 'ALTER TABLE '+Mainform.mask(FAlterTableName) + CRLF + #9 + ImplodeStr(',' + CRLF + #9, Specs);
Result := Trim(Result);
FreeAndNil(Specs);
FreeAndNil(IndexesComposed);
FreeAndNil(OldIndexesComposed);
@@ -728,7 +729,7 @@ begin
Result := Result + 'UNION=('+memoUnionTables.Text+')' + CRLF;
if comboInsertMethod.Enabled and (comboInsertMethod.Text <> '') then
Result := Result + 'INSERT_METHOD='+comboInsertMethod.Text + CRLF;
Result := Trim(Result);
end;