4 Replies Latest reply on Feb 28, 2020 6:01 AM by mcollinge

    Upgrading my plugin's database

    bergerle Novice

      Hi community,


      I'm currently developing a plugin and now I have to add a column to one of the tables defined in my schema.xml. I tried just adding the column to the definition and increased the databaseVersion in plugin.xml. But when I start my instance, I get this error:

      [INFO] [talledLocalContainer] 2014-01-27 16:38:41,504 [NonBlockingEventDispatcher-thread-2] [::] INFO com.jivesoftware.base.plugin.PluginSchemaManager - Upgrading schema for plugin 'myPlugin'... 
      [INFO] [talledLocalContainer] 2014-01-27 16:38:41,538 [NonBlockingEventDispatcher-thread-2] [::] ERROR com.jivesoftware.base.plugin.PluginSchemaManager - Schema for plugin 'myPlugin' was NOT upgraded successfully.
      [INFO] [talledLocalContainer] 2014-01-27 16:38:41,543 [NonBlockingEventDispatcher-thread-2] [::] ERROR com.jivesoftware.base.plugin.PluginManager - Error loading plugin
      [INFO] [talledLocalContainer] com.jivesoftware.base.plugin.PluginConfigurationException: Failed installing or upgrading plugin 'myPlugin's schema.
      [INFO] [talledLocalContainer] at com.jivesoftware.base.plugin.PluginManagerImpl.verifyPluginSchemaUpgraded(PluginManagerImpl.java:629)
      [INFO] [talledLocalContainer] at com.jivesoftware.base.plugin.PluginManagerImpl.loadPlugin(PluginManagerImpl.java:575)

      What do I have to do, to upgrade my table? Of course I could do it manually, but I want to do it the "proper" way. Do I need to write an upgrade.xml-file and how should it look?

      Thanks for your help!