Assets - How to delete Object History logs
プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Fisheye および Crucible は除く
アトラシアン サポートの提供について
The following approaches that involves SQL queries are beyond Atlassian Support Offerings. Please note that Atlassian does not support direct database INSERT, UPDATE or DELETE queries, as they can easily lead to data integrity problems. Atlassian will not be held liable for any errors or other unexpected events resulting from the use of the following SQL queries.
目的
Remove Object's History logs is not possible through Assets UI. This is how to perform this action using Database queries.
This has been recorded as an improvement area for Assets:
- JSDSERVER-8706課題情報を取得中... ステータス
Until the product improvement is in place this Article intends to describe a way of removing Object's History records.
環境
Assets management
ソリューション
はじめる前に
データベースの変更を行う場合は必ず事前にバックアップを取得してください。可能な場合は、まずステージング サーバーで SQL コマンドの変更、挿入、更新、または削除を行うようにします。
Table AO_8542F1_IFJ_OBJ_HIST is where all the History values are stored for existing Objects. To verify all of the affected entries, and the database structure for further tweaks, run a select query against the object that you're looking to remove history from:
SELECT * FROM "AO_8542F1_IFJ_OBJ_HIST"
WHERE "OBJECT_ID" = XXX;
To remove the history logs, we have 2 options, one to remove by date older than, or by specifying an object ID:
DELETE FROM "AO_8542F1_IFJ_OBJ_HIST"
WHERE "CREATED" < '2020-12-31 00:00:00.0';
または
DELETE FROM "AO_8542F1_IFJ_OBJ_HIST"
WHERE "OBJECT_ID" = XXX;
The Object ID is the numeric part of the Object Key, and will also show in the Object URL when you navigate to the Object
これは PostgreSQL でテスト済みです。Oracle や SQL Server などの他の DBMS では変更が必要になる可能性があります。
Deleting History entries will only remove the History records from the Object, no other part/functionality in Assets should be affected by removing the Object's History