mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-26 03:01:07 +08:00
Exclude text and blob columns for ALTER col DROP DEFAULT query. Fixes issue #2361.
This commit is contained in:
@ -488,7 +488,10 @@ begin
|
||||
// ALTER TABLE ... CHANGE COLUMN query, as there is no "no default" clause, nor by
|
||||
// appending an ALTER COLUMN ... DROP DEFAULT, without getting an "unknown column" error
|
||||
for i:=0 to FColumns.Count-1 do begin
|
||||
if (FColumns[i].FStatus = esModified) and (FColumns[i].DefaultType = cdtNothing) then
|
||||
if (FColumns[i].FStatus = esModified)
|
||||
and (FColumns[i].DefaultType = cdtNothing)
|
||||
and (FColumns[i].DataType.HasDefault)
|
||||
then
|
||||
Specs.Add('ALTER '+DBObject.Connection.QuoteIdent(FColumns[i].OldName)+' DROP DEFAULT');
|
||||
end;
|
||||
AddQuery;
|
||||
|
Reference in New Issue
Block a user