While upgrading to TeamForge 8.0 you may
encounter an error stating that the field team already exists for the
project tracker(s).
This is because if the trackers in your project already have a field with the name
team, it conflicts with the Team feature introduced in
TeamForge 8.0. This error occurs while running the
migration script
migrate.py. To resolve the issue, do the following
and then run the
migrate.py script again:
- Identify the tracker(s) where the team field is present by
running the following script:.
- For the folder_layout table:
- select folder_layout.id, field_name,
title,folder_id tracker_id from folder_layout, folder
where field_name = 'team' and folder_id like 'tracker%'
and folder.id =
folder_layout.folder_id;
- For the field table:
- select field.id, name, title, folder_id from
field, folder where name='team' and folder_id like
'tracker%' and field.folder_id =
folder.id;
- Rename the field team as original_team by
running the following script::
- For the folder_layout table:
- update folder_layout set field_name='original'
|| '_team' where field_name='team';
- For the field table:
- update field set name='original' || '_team'
where name='team';
- Verify the newly renamed fields by running the following script:
- For the folder_layout table:
- select folder_layout.id, field_name,
title,folder_id tracker_id from folder_layout, folder
where field_name like '%team' and folder_id like
'tracker%' and folder.id =
folder_layout.folder_id;
- For the field table:
- select field.id, name, title, folder_id from
field, folder where name like '%team' and folder_id like
'tracker%' and field.folder_id =
folder.id;
- Re-run migrate.py.
Important: Before re-running
this script, make sure you delete the ctf72_ctf80
folder (which was created the first time you ran the migration script),
because every time you run the script, this folder gets created.