Completely uninstalling P2 app from Jira

We have a customer that have a staging environment where all our app-related DB tables are either empty or corrupt/null values. They state that it’s been like this for 6 months so it’s not really possible to track down the root cause, but we suspect something went wrong when they migrated over from their production instance.

They’ve also made other changes that they don’t want to loose by doing a re-migration from production, so our way forward is to remove the app entirely and reinstall it as if it was a first-time install.
We’d now like to know from the Atlassian perspective how to completely “uninstall” the app. They reached out to Atlassian support which said they didn’t support third-party integrations.
We know what tables needs removed, but we also have ActiveObjectsUpgradeTask in place in our app. These define a Modelversion e.g.

    public ModelVersion getModelVersion()
        return ModelVersion.valueOf("1");

Which is stored somewhere by Atlassian. My question is how can they reset this so that it runs all migrations properly in order once they’re able to re-install the app. Is there some other meta-data related to apps that needs to be removed?

Hi @rw-dennis,

delete the AO tables. This will reinit all tables from scratch.
Delete the entry which contains the last upgrade task ModelVersion for your app. I do not know the exact table, but my guess would be the property... tables in Jira. This will run all upgrade tasks again.


1 Like

there are few places to reset:

Last UpgradeTask nr:

`SELECT * from propertystring where id in ( SELECT id FROM propertyentry where property_key like ‘%plugin_key%’);

Last ActiveObjectsUpgradeTask:

`SELECT * from propertystring where id in ( SELECT id FROM propertyentry where property_key like ‘%plugin_table_prefix%’);

Last plugin version:
`UPDATE pluginversion SET pluginversion = ‘1.0.0’ WHERE pluginkey LIKE ‘%plugin_key%’;

1 Like

Thank you both for your answers, it was the kind of information I was looking for!
Best regards,