I would like to know how ITEM_HISTORY.ID column value is populated? Which sequence is used

I would like to know how ITEM_HISTORY.ID column value is populated? Which sequence is used.

Agile User Asked on October 6, 2023 in Agile PLM (v9).
Add Comment
2 Answer(s)

Based on a script I created years ago to correct sequence values after cloning from a production environment to a dev or test environment, numerous tables use the same sequence named AGILEOBJECTIDSEQUENCE. This includes ITEM_HISTORY.

Agile Professional Answered on November 1, 2023.
Add Comment

As noted by stevend17, AGILEOBJECTIDSEQUENCE was used to generate the ID for all tables in the database. For everything up to and including Agile 6.x, 7.x, 8.x and 9.0.x.

Somewhere in there (9.2.x?, 9.3.x?), they introduced ITEM_HISTORY_ID_SEQ, which is only used for the ITEM_HISTORY table. It starts at  -2147000000 and goes up to +2147000000. So it gives a lot more range and is used exclusively for the Item history table. CHANGE_HISTORY_ID_SEQ works the same way for the CHANGE_HISTORY table.

Agile Angel Answered on November 7, 2023.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.