tvplanit: Avoid executing FixContactsTable in ZeosDatastore when the Contacts table already has the fields of the v1.06 format.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8279 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2022-05-23 10:46:40 +00:00
parent fae7c47685
commit 3bb0cf5482

View File

@ -405,6 +405,14 @@ var
autocommit: Boolean; autocommit: Boolean;
fieldnames: TStrings; fieldnames: TStrings;
begin begin
if not ContactsTable.Active then
begin
ContactsTable.Open;
// If field "Department" exists then it is a v1.05 table, and there's nothing to do.
if ContactsTable.Fields.FindField('Department') <> nil then
exit;
end;
autocommit := FConnection.AutoCommit; autocommit := FConnection.AutoCommit;
ContactsTable.Close; ContactsTable.Close;
list := TStringList.Create; list := TStringList.Create;