Upgrade failed: Table 'LABEL' has a multi-column primary key on [ID, LABELID]
プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。
サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。
*Fisheye および Crucible は除く
要約
When upgrading to Confluence 6.13.8, upgrade fails with the following ERROR:
2020-11-20 11:02:56,501 ERROR [localhost-startStop-1] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized Upgrade failed, application will not start: Upgrade task com.atlassian.confluence.upgrade.upgradetask.LowerCaseUsernameReferencesUpgradeTask@20ce74e2 failed during the SCHEMA_UPGRADE phase due to: Table 'LABEL' has a multi-column primary key on [ID, LABELID]
com.atlassian.confluence.upgrade.UpgradeException: Upgrade task com.atlassian.confluence.upgrade.upgradetask.LowerCaseUsernameReferencesUpgradeTask@20ce74e2 failed during the SCHEMA_UPGRADE phase due to: Table 'LABEL' has a multi-column primary key on [ID, LABELID]
When inspecting the table directly there is no extra 'ID
' column, only the "LABELID, NAME, OWNER, NAMESPACE, CREATIONDATE, LASTMODDATE
" columns which are expected.
環境
Confluence 5.0.2
Oracle データベース
原因
There was another Confluence schema in the DB in conflict
回避策
Create a view that restricts to just the constraints this user should see:
CREATE VIEW ALL_CONSTRAINTS AS SELECT * FROM SYS.ALL_CONSTRAINTS WHERE OWNER = UPPER('TSPACE_USER');
This allows the upgrade to use the view instead of the table, and get past the issue.
a similar workaround may be applied where a view is created with name '
LABEL
' for the 'LABEL
' table, consisting of only the correct columns that exist in the correct target table:
CREATE VIEW schema.LABEL (LABELID, NAME, OWNER, NAMESPACE, CREATIONDATE, LASTMODDATE) AS SELECT LABELID, NAME, OWNER, NAMESPACE, CREATIONDATE, LASTMODDATE FROM schema.LABEL;