Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-137720

SF rule to prevent executing useless upgrade processes on startup

    Details

      Description

      In the following conditions:

      1. Classes that implement UpgradeStepRegistrator
      2. And register a DummyUpgradeStep starting with the schema version 0.0.0 and ends with x.x.x

      For example:

      public class XXXUpgrade implements UpgradeStepRegistrator {
      
      	@Override
      	public void register(Registry registry) {
      		registry.register("0.0.0", "x.x.x", new DummyUpgradeStep());
      

      The SF rule must check that the value x.x.x is always updated with the latest schema version value.

      For example, this is wrong

      public class XXXUpgrade implements UpgradeStepRegistrator {
      
      	@Override
      	public void register(Registry registry) {
      		registry.register("0.0.0", "0.0.2", new DummyUpgradeStep());
      
      		registry.register("0.0.1", "0.0.2", new UpgradeLastPublishDate());
      
      		registry.register("0.0.2", "0.0.3", new SchemaUpgradeProcess());
      }		
      

      And this is good :

      public class XXXUpgrade implements UpgradeStepRegistrator {
      
      	@Override
      	public void register(Registry registry) {
      		registry.register("0.0.0", "0.0.3", new DummyUpgradeStep());
      
      		registry.register("0.0.1", "0.0.2", new UpgradeLastPublishDate());
      
      		registry.register("0.0.2", "0.0.3", new SchemaUpgradeProcess());
      }
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              alberto.chaparro Alberto Chaparro
              Reporter:
              alberto.chaparro Alberto Chaparro
              Engineering Assignee:
              Product Team Upgrades
              Recent user:
              Enterprise Release HU
              Participants of an Issue:
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Packages

                  Version Package
                  7.0.X
                  7.2.X
                  7.3.X
                  7.4.13 DXP GA1
                  7.4.X
                  Master