<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>How can I rerun my UpgradeProcess?</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=120624246" />
  <subtitle>How can I rerun my UpgradeProcess?</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=120624246</id>
  <updated>2026-04-25T13:32:28Z</updated>
  <dc:date>2026-04-25T13:32:28Z</dc:date>
  <entry>
    <title>RE: RE: How can I rerun my UpgradeProcess?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120681399" />
    <author>
      <name>Matthew K.</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120681399</id>
    <updated>2021-03-11T16:53:06Z</updated>
    <published>2021-03-11T16:53:06Z</published>
    <summary type="html">&lt;p&gt;I dont have any specific version in my bnd file, only the Bundle-Name
  and the Bundle-SymbolicName. The bundle version is automatically
  inserted to the metadata of the module by the maven bnd plugin. So
  there is no need to put it there.&lt;/p&gt;</summary>
    <dc:creator>Matthew K.</dc:creator>
    <dc:date>2021-03-11T16:53:06Z</dc:date>
  </entry>
  <entry>
    <title>RE: RE: How can I rerun my UpgradeProcess?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120657753" />
    <author>
      <name>Andrew Jardine</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120657753</id>
    <updated>2021-03-03T12:33:18Z</updated>
    <published>2021-03-03T12:33:18Z</published>
    <summary type="html">&lt;p&gt;Hey Matt,&lt;/p&gt;
&lt;p&gt;I'm not convinced that it totally correct. The reason I say that is
  because when 7.0 was first released service builder changes were not
  automatically applied. The &amp;quot;correct&amp;quot; approach was to change
  the version numbers and include upgrade steps. I know that now, with
  the portal-developer properties included, that is no longer needed
  (locally) but for deployments outside of local, an upgrade task I
  believe is still best practice. What version do you have in you bnd
  file for your module?&lt;/p&gt;</summary>
    <dc:creator>Andrew Jardine</dc:creator>
    <dc:date>2021-03-03T12:33:18Z</dc:date>
  </entry>
  <entry>
    <title>RE: How can I rerun my UpgradeProcess?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120657597" />
    <author>
      <name>Matthew K.</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120657597</id>
    <updated>2021-03-03T09:27:22Z</updated>
    <published>2021-03-03T09:27:22Z</published>
    <summary type="html">&lt;p&gt;Hey Andrew, thanks for your answer, but I guess that this won't work
  anymore. I found this line in the Liferay code.&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-java"&gt;if (PropsValues.UPGRADE_DATABASE_AUTO_RUN ||
    (_releaseLocalService.fetchRelease(bundleSymbolicName) ==
        null)) {
    _upgradeExecutor.execute(
        bundleSymbolicName, upgradeInfos,
        OutputStreamContainerConstants.FACTORY_NAME_DUMMY);
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So the UpgradeProcess will only rerun, if that portal property is set
  or if the bundleSymbolicName is not present in the release table. So
  changing versions won't have any effect. I have to rename my complete
  bundle if I want to execute my UpgradeProcess once again. This is
  actually a huge drawback compared to Liferay 6, but apparently you
  cannot change anything about that.&lt;/p&gt;</summary>
    <dc:creator>Matthew K.</dc:creator>
    <dc:date>2021-03-03T09:27:22Z</dc:date>
  </entry>
  <entry>
    <title>RE: How can I rerun my UpgradeProcess?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120657267" />
    <author>
      <name>Andrew Jardine</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120657267</id>
    <updated>2021-03-02T14:07:27Z</updated>
    <published>2021-03-02T14:07:27Z</published>
    <summary type="html">&lt;p&gt;Hey Matt,&lt;/p&gt;
&lt;p&gt;Never tried this oen myself but I have made a mistake in the past
  (easy to overlook) where I wrote the upgrade task but then forgot to
  change the version information in the bnd file. Did you remember to
  make that change as well? &lt;/p&gt;
&lt;p&gt;You probably did but I thought I would ask anyway -- even if you
  didn't, someone else that comes along might have :)&lt;/p&gt;</summary>
    <dc:creator>Andrew Jardine</dc:creator>
    <dc:date>2021-03-02T14:07:27Z</dc:date>
  </entry>
  <entry>
    <title>How can I rerun my UpgradeProcess?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120624245" />
    <author>
      <name>Matthew K.</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120624245</id>
    <updated>2021-02-18T18:29:59Z</updated>
    <published>2021-02-18T18:28:15Z</published>
    <summary type="html">&lt;p&gt;Hello guys,&lt;/p&gt;
&lt;p&gt;I am kind of used to the old Liferay 6.2 UpgradeProcess, but now I
  have to write my first UpgradeProcess for Liferay 7.3 and I don't know
  how to execute it for a second time. Here is my code:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-java"&gt;@Component(immediate = true, service = UpgradeStepRegistrator.class)
public class MyUpgradeRegistrator implements UpgradeStepRegistrator {

	@Override
	public void register(Registry registry) {
		registry.register(&amp;quot;0.0.0&amp;quot;, &amp;quot;1.0.0&amp;quot;, new com.sample.upgrade.v1_0_0.MyUpgradeStep());
	}

}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;After deploying that component, the code in MyUpgradeStep is executed
  correctly. And if I redeploy the jar file, nothing happens, which is
  also correct. Now I change the code to:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-java"&gt;@Component(immediate = true, service = UpgradeStepRegistrator.class)
public class MyUpgradeRegistrator implements UpgradeStepRegistrator {

	@Override
	public void register(Registry registry) {
                registry.register(&amp;quot;0.0.0&amp;quot;, &amp;quot;1.0.0&amp;quot;, new com.sample.upgrade.v1_0_0.MyUpgradeStep());
                registry.register(&amp;quot;1.0.0&amp;quot;, &amp;quot;2.0.0&amp;quot;, new com.sample.upgrade.v2_0_0.MyUpgradeStep());
	}

}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;My expectation is that the first UpgradeStep does not run because it
  was already executed, but the second should run because it was never
  executed before. However, nothing happens. What did I wrong?&lt;/p&gt;</summary>
    <dc:creator>Matthew K.</dc:creator>
    <dc:date>2021-02-18T18:28:15Z</dc:date>
  </entry>
</feed>
