mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2026-03-13 09:24:25 +08:00
Fix issue #1265
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user