Skip to content

Commit 1fe709a

Browse files
committed
fix: cannot save new table when added column was removed
Refs #2326
1 parent 9a4d841 commit 1fe709a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

source/table_editor.pas

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,8 @@ function TfrmTableEditor.ComposeCreateStatement: TSQLBatch;
950950
CreateLines := TStringList.Create;
951951
// Lines with columns, indexes, foreign keys and check constraints
952952
for Col in FColumns do begin
953-
CreateLines.Add(Col.SQLCode);
953+
if not (Col.Status in [esDeleted, esAddedDeleted]) then
954+
CreateLines.Add(Col.SQLCode);
954955
end;
955956
for i:=0 to FKeys.Count-1 do begin
956957
if not FKeys[i].InsideCreateCode then

0 commit comments

Comments
 (0)