{"action":"created","comment":{"url":"https://api.github.com/repos/jhinkey/liferay-docs/pulls/comments/74434739","id":74434739,"diff_hunk":"@@ -0,0 +1,426 @@\n+# Upgrading Application Upgrade and Verifier Processes [](id=upgrading-application-upgrade-and-verifier-processes)\n+\n+Since Liferay 7.0 and Lifery DXP, a new upgrade framework and verifier framework\n+is available for you to use for your application. You can upgrade your existing\n+upgrade and verify processes to use the new framework in just a few steps.\n+\n+This tutorial demonstrates how to:\n+\n+- Upgrade an existing upgrade process to the new upgrade framework\n+- Upgrade an existing verify process to the new verify framework\n+\n+Go ahead and get started with the upgrade process next.\n+\n+## Upgrading Your Upgrade Process to the New Framework [](id=upgrading-your-upgrade-process-to-the-new-framework)\n+\n+Follow the steps below to migrate your code to the new framework.\n+\n+1.  If your application has any dependencies, add a dependency on the\n+    `portal-upgrade` module to your `build.gradle` file:\n+\n+        provided group: \"com.liferay\", name: \"com.liferay.portal.upgrade\",\n+        version: \"2.0.0\"\n+\n+2.  Check your database schema version against your bundle version.\n+\n+    After you make changes to your module you might increment the module\n+    version, however the database schema version may remain untouched, and\n+    therefore have a different value. If your module's database schema is a \n+    different version than your module's bundle version, you can specify it in \n+    the BND file.\n+    \n+    Add the`Liferay-Require-SchemaVersion` property to your `bnd.bnd` file to \n+    describe that the schema version of the module uses a different version than \n+    the module's bundle version.\n+    \n+    For example, the [Chat App](https://github.com/liferay/liferay-portal/blob/0d69917/modules/apps/chat/chat-service/bnd.bnd)\n+    specifies the bundle version and schema version below:\n+\n+        Bundle-Version: 1.0.2\n+        \n+        ...\n+        \n+        Liferay-Require-SchemaVersion: 1.0.0\n+\n+    If no `Liferay-Require-SchemaVersion` value is found, the `Bundle-Version`\n+    header will be used.\n+    \n+    Note that once you make an upgrade to your app, it is best practice to \n+    specify your schema version with the `Liferay-Require-SchemaVersion` \n+    property from that point on. This way, if the bundle version and schema \n+    version ever differ, your database schema version will always be correct.\n+\n+3.  Convert your `upgrade` class into an OSGi component, using the `@Component`\n+    token and implement the `UpgradeStepRegistrator` interface, as shown in the\n+    example below:\n+\n+        @Component(\n+                immediate = true,\n+                service = UpgradeStepRegistrator.class\n+        )\n+        public class CalendarServiceUpgrade implements UpgradeStepRegistrator\n+\n+4.  Remove the intermediate classes that wrapped the internal steps, i.e the\n+    `public class UpgradeProcess_1_0_1 extends UpgradeProcess...`.\n+\n+    Following the prior upgrade process in 6.2, you had to define the property\n+    `upgrade.processes`, a list of `UpgradeProcesses` representing the different\n+    upgrades for a specific version of your module, in your\n+    `portal-ext.properties`.\n+\n+    For instance, the code below shows the previous process for upgrading\n+    Calendar-service module from v1.0.0 to 1.0.1 and then to 1.0.2.\n+\n+        upgrade.processes=\n+            com.liferay.calendar.hook.upgrade.UpgradeProcess_1_0_0,\n+            com.liferay.calendar.hook.upgrade.UpgradeProcess_1_0_1,\n+            com.liferay.calendar.hook.upgrade.UpgradeProcess_1_0_2\n+\n+    Each step between versions was represented by a single class extending\n+    `UpgradeProcess`, using a method called `doUpgrade`. This method was\n+    responsible for executing the internal steps to update the database to that\n+    concrete version. A method `getThreshold` was provided also to specify the\n+    schema version where the upgrade starts.\n+\n+    Whenever you needed another internal step, you added another\n+    `upgrade(new UpgradePortletPreferences());` etc. after the existing ones.\n+\n+    Classes are now represented by upgrade registrations in the new framework\n+    instead.\n+\n+    Each upgrade is represented by an upgrade registration. An upgrade\n+    registration is an abstraction for the changes you need to apply to the\n+    database from one version to the next one. The registrations are defined in\n+    an override of method\n+    [UpgradeStepRegistrator.register(UpgradeStepRegistrator.Registry)](https://docs.liferay.com/portal/7.0/javadocs/modules/apps/foundation/portal/com.liferay.portal.upgrade/com/liferay/portal/upgrade/registry/UpgradeStepRegistrator.html#register(com.liferay.portal.upgrade.registry.UpgradeStepRegistrator.Registry)).\n+\n+    To define a registration, you need to provide the information below:\n+\n+    - the bundle symbolic name of the module\n+    - the schema version your module wants to upgrade from (as a `String`)\n+    - the schema version your module wants to upgrade to (as a `String`)\n+    - a list of `UpgradeSteps` instances","path":"develop/tutorials/articles/02-from-liferay-6-to-liferay-7/07-upgrading-plugins-to-liferay-7/07-upgrading-application-upgrade-and-verifier-processes.markdown","position":102,"original_position":102,"commit_id":"a153b18583ad6d38f8022d613853db22b03b1455","original_commit_id":"a153b18583ad6d38f8022d613853db22b03b1455","user":{"login":"jhinkey","id":711333,"avatar_url":"https://avatars.githubusercontent.com/u/711333?v=3","gravatar_id":"","url":"https://api.github.com/users/jhinkey","html_url":"https://github.com/jhinkey","followers_url":"https://api.github.com/users/jhinkey/followers","following_url":"https://api.github.com/users/jhinkey/following{/other_user}","gists_url":"https://api.github.com/users/jhinkey/gists{/gist_id}","starred_url":"https://api.github.com/users/jhinkey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhinkey/subscriptions","organizations_url":"https://api.github.com/users/jhinkey/orgs","repos_url":"https://api.github.com/users/jhinkey/repos","events_url":"https://api.github.com/users/jhinkey/events{/privacy}","received_events_url":"https://api.github.com/users/jhinkey/received_events","type":"User","site_admin":false},"body":"@mdelapenya @mwilliams2014 Careful; this class is named `UpgradeStep`.","created_at":"2016-08-11T14:40:53Z","updated_at":"2016-08-11T14:40:53Z","html_url":"https://github.com/jhinkey/liferay-docs/pull/318#discussion_r74434739","pull_request_url":"https://api.github.com/repos/jhinkey/liferay-docs/pulls/318","_links":{"self":{"href":"https://api.github.com/repos/jhinkey/liferay-docs/pulls/comments/74434739"},"html":{"href":"https://github.com/jhinkey/liferay-docs/pull/318#discussion_r74434739"},"pull_request":{"href":"https://api.github.com/repos/jhinkey/liferay-docs/pulls/318"}}},"pull_request":{"url":"https://api.github.com/repos/jhinkey/liferay-docs/pulls/318","id":80672957,"html_url":"https://github.com/jhinkey/liferay-docs/pull/318","diff_url":"https://github.com/jhinkey/liferay-docs/pull/318.diff","patch_url":"https://github.com/jhinkey/liferay-docs/pull/318.patch","issue_url":"https://api.github.com/repos/jhinkey/liferay-docs/issues/318","number":318,"state":"open","locked":false,"title":"LRDOCS-2687 upgrading your app upgrade and verifier processes tutorial-edits","user":{"login":"mwilliams2014","id":7050434,"avatar_url":"https://avatars.githubusercontent.com/u/7050434?v=3","gravatar_id":"","url":"https://api.github.com/users/mwilliams2014","html_url":"https://github.com/mwilliams2014","followers_url":"https://api.github.com/users/mwilliams2014/followers","following_url":"https://api.github.com/users/mwilliams2014/following{/other_user}","gists_url":"https://api.github.com/users/mwilliams2014/gists{/gist_id}","starred_url":"https://api.github.com/users/mwilliams2014/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwilliams2014/subscriptions","organizations_url":"https://api.github.com/users/mwilliams2014/orgs","repos_url":"https://api.github.com/users/mwilliams2014/repos","events_url":"https://api.github.com/users/mwilliams2014/events{/privacy}","received_events_url":"https://api.github.com/users/mwilliams2014/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-08-09T18:43:34Z","updated_at":"2016-08-11T14:40:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cb5b602973bc2d153ea3a592555b6246c5e30f90","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/jhinkey/liferay-docs/pulls/318/commits","review_comments_url":"https://api.github.com/repos/jhinkey/liferay-docs/pulls/318/comments","review_comment_url":"https://api.github.com/repos/jhinkey/liferay-docs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jhinkey/liferay-docs/issues/318/comments","statuses_url":"https://api.github.com/repos/jhinkey/liferay-docs/statuses/a153b18583ad6d38f8022d613853db22b03b1455","head":{"label":"mwilliams2014:LRDOCS-2687-upgrading-your-upgrade-process","ref":"LRDOCS-2687-upgrading-your-upgrade-process","sha":"a153b18583ad6d38f8022d613853db22b03b1455","user":{"login":"mwilliams2014","id":7050434,"avatar_url":"https://avatars.githubusercontent.com/u/7050434?v=3","gravatar_id":"","url":"https://api.github.com/users/mwilliams2014","html_url":"https://github.com/mwilliams2014","followers_url":"https://api.github.com/users/mwilliams2014/followers","following_url":"https://api.github.com/users/mwilliams2014/following{/other_user}","gists_url":"https://api.github.com/users/mwilliams2014/gists{/gist_id}","starred_url":"https://api.github.com/users/mwilliams2014/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwilliams2014/subscriptions","organizations_url":"https://api.github.com/users/mwilliams2014/orgs","repos_url":"https://api.github.com/users/mwilliams2014/repos","events_url":"https://api.github.com/users/mwilliams2014/events{/privacy}","received_events_url":"https://api.github.com/users/mwilliams2014/received_events","type":"User","site_admin":false},"repo":{"id":18076286,"name":"liferay-docs","full_name":"mwilliams2014/liferay-docs","owner":{"login":"mwilliams2014","id":7050434,"avatar_url":"https://avatars.githubusercontent.com/u/7050434?v=3","gravatar_id":"","url":"https://api.github.com/users/mwilliams2014","html_url":"https://github.com/mwilliams2014","followers_url":"https://api.github.com/users/mwilliams2014/followers","following_url":"https://api.github.com/users/mwilliams2014/following{/other_user}","gists_url":"https://api.github.com/users/mwilliams2014/gists{/gist_id}","starred_url":"https://api.github.com/users/mwilliams2014/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwilliams2014/subscriptions","organizations_url":"https://api.github.com/users/mwilliams2014/orgs","repos_url":"https://api.github.com/users/mwilliams2014/repos","events_url":"https://api.github.com/users/mwilliams2014/events{/privacy}","received_events_url":"https://api.github.com/users/mwilliams2014/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mwilliams2014/liferay-docs","description":"","fork":true,"url":"https://api.github.com/repos/mwilliams2014/liferay-docs","forks_url":"https://api.github.com/repos/mwilliams2014/liferay-docs/forks","keys_url":"https://api.github.com/repos/mwilliams2014/liferay-docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mwilliams2014/liferay-docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mwilliams2014/liferay-docs/teams","hooks_url":"https://api.github.com/repos/mwilliams2014/liferay-docs/hooks","issue_events_url":"https://api.github.com/repos/mwilliams2014/liferay-docs/issues/events{/number}","events_url":"https://api.github.com/repos/mwilliams2014/liferay-docs/events","assignees_url":"https://api.github.com/repos/mwilliams2014/liferay-docs/assignees{/user}","branches_url":"https://api.github.com/repos/mwilliams2014/liferay-docs/branches{/branch}","tags_url":"https://api.github.com/repos/mwilliams2014/liferay-docs/tags","blobs_url":"https://api.github.com/repos/mwilliams2014/liferay-docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mwilliams2014/liferay-docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mwilliams2014/liferay-docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/mwilliams2014/liferay-docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mwilliams2014/liferay-docs/statuses/{sha}","languages_url":"https://api.github.com/repos/mwilliams2014/liferay-docs/languages","stargazers_url":"https://api.github.com/repos/mwilliams2014/liferay-docs/stargazers","contributors_url":"https://api.github.com/repos/mwilliams2014/liferay-docs/contributors","subscribers_url":"https://api.github.com/repos/mwilliams2014/liferay-docs/subscribers","subscription_url":"https://api.github.com/repos/mwilliams2014/liferay-docs/subscription","commits_url":"https://api.github.com/repos/mwilliams2014/liferay-docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/mwilliams2014/liferay-docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/mwilliams2014/liferay-docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/mwilliams2014/liferay-docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/mwilliams2014/liferay-docs/contents/{+path}","compare_url":"https://api.github.com/repos/mwilliams2014/liferay-docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mwilliams2014/liferay-docs/merges","archive_url":"https://api.github.com/repos/mwilliams2014/liferay-docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mwilliams2014/liferay-docs/downloads","issues_url":"https://api.github.com/repos/mwilliams2014/liferay-docs/issues{/number}","pulls_url":"https://api.github.com/repos/mwilliams2014/liferay-docs/pulls{/number}","milestones_url":"https://api.github.com/repos/mwilliams2014/liferay-docs/milestones{/number}","notifications_url":"https://api.github.com/repos/mwilliams2014/liferay-docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mwilliams2014/liferay-docs/labels{/name}","releases_url":"https://api.github.com/repos/mwilliams2014/liferay-docs/releases{/id}","deployments_url":"https://api.github.com/repos/mwilliams2014/liferay-docs/deployments","created_at":"2014-03-24T19:48:23Z","updated_at":"2016-01-16T00:15:38Z","pushed_at":"2016-08-11T08:20:19Z","git_url":"git://github.com/mwilliams2014/liferay-docs.git","ssh_url":"git@github.com:mwilliams2014/liferay-docs.git","clone_url":"https://github.com/mwilliams2014/liferay-docs.git","svn_url":"https://github.com/mwilliams2014/liferay-docs","homepage":"","size":525006,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":6,"forks":0,"open_issues":6,"watchers":2,"default_branch":"master"}},"base":{"label":"jhinkey:master","ref":"master","sha":"7926050614d5df344748bb38c02ad4a9fd135e57","user":{"login":"jhinkey","id":711333,"avatar_url":"https://avatars.githubusercontent.com/u/711333?v=3","gravatar_id":"","url":"https://api.github.com/users/jhinkey","html_url":"https://github.com/jhinkey","followers_url":"https://api.github.com/users/jhinkey/followers","following_url":"https://api.github.com/users/jhinkey/following{/other_user}","gists_url":"https://api.github.com/users/jhinkey/gists{/gist_id}","starred_url":"https://api.github.com/users/jhinkey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhinkey/subscriptions","organizations_url":"https://api.github.com/users/jhinkey/orgs","repos_url":"https://api.github.com/users/jhinkey/repos","events_url":"https://api.github.com/users/jhinkey/events{/privacy}","received_events_url":"https://api.github.com/users/jhinkey/received_events","type":"User","site_admin":false},"repo":{"id":7781172,"name":"liferay-docs","full_name":"jhinkey/liferay-docs","owner":{"login":"jhinkey","id":711333,"avatar_url":"https://avatars.githubusercontent.com/u/711333?v=3","gravatar_id":"","url":"https://api.github.com/users/jhinkey","html_url":"https://github.com/jhinkey","followers_url":"https://api.github.com/users/jhinkey/followers","following_url":"https://api.github.com/users/jhinkey/following{/other_user}","gists_url":"https://api.github.com/users/jhinkey/gists{/gist_id}","starred_url":"https://api.github.com/users/jhinkey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhinkey/subscriptions","organizations_url":"https://api.github.com/users/jhinkey/orgs","repos_url":"https://api.github.com/users/jhinkey/repos","events_url":"https://api.github.com/users/jhinkey/events{/privacy}","received_events_url":"https://api.github.com/users/jhinkey/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jhinkey/liferay-docs","description":"","fork":true,"url":"https://api.github.com/repos/jhinkey/liferay-docs","forks_url":"https://api.github.com/repos/jhinkey/liferay-docs/forks","keys_url":"https://api.github.com/repos/jhinkey/liferay-docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jhinkey/liferay-docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jhinkey/liferay-docs/teams","hooks_url":"https://api.github.com/repos/jhinkey/liferay-docs/hooks","issue_events_url":"https://api.github.com/repos/jhinkey/liferay-docs/issues/events{/number}","events_url":"https://api.github.com/repos/jhinkey/liferay-docs/events","assignees_url":"https://api.github.com/repos/jhinkey/liferay-docs/assignees{/user}","branches_url":"https://api.github.com/repos/jhinkey/liferay-docs/branches{/branch}","tags_url":"https://api.github.com/repos/jhinkey/liferay-docs/tags","blobs_url":"https://api.github.com/repos/jhinkey/liferay-docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jhinkey/liferay-docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jhinkey/liferay-docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/jhinkey/liferay-docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jhinkey/liferay-docs/statuses/{sha}","languages_url":"https://api.github.com/repos/jhinkey/liferay-docs/languages","stargazers_url":"https://api.github.com/repos/jhinkey/liferay-docs/stargazers","contributors_url":"https://api.github.com/repos/jhinkey/liferay-docs/contributors","subscribers_url":"https://api.github.com/repos/jhinkey/liferay-docs/subscribers","subscription_url":"https://api.github.com/repos/jhinkey/liferay-docs/subscription","commits_url":"https://api.github.com/repos/jhinkey/liferay-docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/jhinkey/liferay-docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/jhinkey/liferay-docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/jhinkey/liferay-docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/jhinkey/liferay-docs/contents/{+path}","compare_url":"https://api.github.com/repos/jhinkey/liferay-docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jhinkey/liferay-docs/merges","archive_url":"https://api.github.com/repos/jhinkey/liferay-docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jhinkey/liferay-docs/downloads","issues_url":"https://api.github.com/repos/jhinkey/liferay-docs/issues{/number}","pulls_url":"https://api.github.com/repos/jhinkey/liferay-docs/pulls{/number}","milestones_url":"https://api.github.com/repos/jhinkey/liferay-docs/milestones{/number}","notifications_url":"https://api.github.com/repos/jhinkey/liferay-docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jhinkey/liferay-docs/labels{/name}","releases_url":"https://api.github.com/repos/jhinkey/liferay-docs/releases{/id}","deployments_url":"https://api.github.com/repos/jhinkey/liferay-docs/deployments","created_at":"2013-01-23T18:45:55Z","updated_at":"2015-09-18T17:39:42Z","pushed_at":"2016-08-10T19:15:58Z","git_url":"git://github.com/jhinkey/liferay-docs.git","ssh_url":"git@github.com:jhinkey/liferay-docs.git","clone_url":"https://github.com/jhinkey/liferay-docs.git","svn_url":"https://github.com/jhinkey/liferay-docs","homepage":"","size":535859,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":4,"forks":1,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jhinkey/liferay-docs/pulls/318"},"html":{"href":"https://github.com/jhinkey/liferay-docs/pull/318"},"issue":{"href":"https://api.github.com/repos/jhinkey/liferay-docs/issues/318"},"comments":{"href":"https://api.github.com/repos/jhinkey/liferay-docs/issues/318/comments"},"review_comments":{"href":"https://api.github.com/repos/jhinkey/liferay-docs/pulls/318/comments"},"review_comment":{"href":"https://api.github.com/repos/jhinkey/liferay-docs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jhinkey/liferay-docs/pulls/318/commits"},"statuses":{"href":"https://api.github.com/repos/jhinkey/liferay-docs/statuses/a153b18583ad6d38f8022d613853db22b03b1455"}}}}
{"actor":{"display_login":"jhinkey"}}