Active Objects tables are not created when plugin updated

I have developed some active objects table that I will be using in a future plugin. I have added the entity definitions in my atlassian-plugin.xml file. When I run my changes on a development instance, the tables are created and work without an issue. However, when I install the plugin on a standard confluence, the tables are not being created. Is there any known reason the active objects tables will not update when a plugin is updated? Is there any public documentation available that explains the AO update process?

Edit: The issue appears to be related to the upgrade Task. If I remove the upgrade task, the new tables are created. Looking at the logs, the upgrade task throws errors due to the missing tables. If I disable the upgrade task the tables are created. If I then rebuild the plugin with the upgrade task enabled and install it, the task completes successfully. How do I coordinate the upgrade task to run after the schema is updated?

Finally found the answer myself. You need to migrate the schema in the upgrade task. In the migrate method run ao.migrate(.class);

1 Like