Resolving conflicts in the name attribute
Decision Center V7.5 introduced a new unique-name constraint, which can cause conflicts during the migration.
In the current version, the name attribute must be unique in the vocabulary, and for BOM, and BOM-to-XOM mapping. Such was not the case in versions earlier than V7.5.
To avoid errors when you run migration tasks, check the migrated
repository to see whether records share names. You can run queries
that order records by name, project, and original ID:
- select distinct ORIGINALID, NAME, PROJECT from <oldSchemaName>.BOM order by NAME, PROJECT, ORIGINALID ;
- select distinct ORIGINALID, NAME, PROJECT from <oldSchemaName>.BOM2XOMMAPPING order by NAME, PROJECT, ORIGINALID ;
- select distinct ORIGINALID, NAME, PROJECT, LOCALE from <oldSchemaName>.VOCABULARY order by NAME, PROJECT, LOCALE, ORIGINALID ;
Each record must have a unique name. If records share a name, they
must be updated. For vocabulary elements, you must take into account
the locale information, while this data is not available for BOM and
BOM-to-XOM mapping elements. Vocabulary records that have the same
name for a given project and locale are duplicates. BOM and BOM-to-XOM
mapping records that have the same name for a given project are duplicates.
When records have the same name, Decision
Center uses
the record with the highest ORIGINALID. For example,
this BOM table shows records that use the name BOMName.
| NAME | PROJECT | ORIGINALID |
|---|---|---|
| BOMName | 14 | 112 |
| BOMName | 15 | 125 |
| BOMName | 15 | 148 |
| BOMName | 15 | 213 |
Decision Center uses ORIGINALID 213, and the other two records must be updated with different names. The record with ORIGINALID 112 is related to a different project, therefore that record is not a duplicate.
To set different names to duplicate records, you can use the following
queries:
- update <oldSchemaName>.BOM set NAME = 'BOMNameUnused1' where ORIGINALID = 125 ;
- update <oldSchemaName>.BOM set NAME = 'BOMNameUnused2' where ORIGINALID = 148 ;