The title mostly tells it:
Where does Jira store the highest ID value for entries in table customfieldoptions?
Background:
I added entries to table customfieldoptions via imports to the backend-DB. To do this in an efficient way I set the ID column of customfieldoptions to IDENTITY column (not so good idea).
This leads in the first place to the effect that you get a "Oops 500 technical problem..." error. If you switch the identitiy column feature off, one gets a "Duplicate key" error, as JIRA has somewhere an internal counter which counts the IDs of customfieldoption rows. I see that JIRA increates the value it sends to the database. Where is that value stored?
I would roll back the changes you've made to the last good backup, as hitting the identity column is a disaster and could have done all sorts of damage.
Once you've got a reliable database back though, yes, you have the right idea if you want to do this the bad way (You should never never write to a Jira database. If you must, then it absolutely must be backed up and shut down first), then there is a table called sequence_value_item - the counters in there are pretty obviously named, and you don't need to be precise, just as long as you set the count higher than (current + new line count) - it tolerates gaps in the sequences fine.
I solved that brute force as I didn't have a backup:
I performed n-times (about 500 times) manually the "add Option" -> Error -> Back cycle, so the counter on webserver-side was in sync with the DB again. Now it works.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.