{"action":"created","comment":{"url":"https://api.github.com/repos/neos/neos-development-collection/pulls/comments/47698926","id":47698926,"diff_hunk":"@@ -0,0 +1,282 @@\n+.. _`node-migrations`:\n+\n+Node Migrations\n+===============\n+\n+Node migrations can be used to deal with renamed nodetypes and property names, set missing default values for\n+properties, adjust content dimensions and more.\n+\n+Node migrations work by applying **transformations** on nodes. The nodes that will be transformed are selected\n+through **filters** in migration files.\n+\n+The Content Repository comes with a number of common transformations:\n+\n+- ``AddDimensions``\n+- ``AddNewProperty``\n+- ``ChangeNodeType``\n+- ``ChangePropertyValue``\n+- ``CreateNodes``\n+- ``RemoveNode``\n+- ``RemoveProperty``\n+- ``RenameDimension``\n+- ``RenameNode``\n+- ``RenameProperty``\n+- ``SetDimensions``\n+- ``StripTagsOnProperty``\n+\n+They all implement the ``TYPO3\\TYPO3CR\\Migration\\Transformations\\TransformationInterface``, custom transformations\n+can be developed against that interface as well (just use the FQCN for custom transformations).\n+\n+Migration files\n+---------------\n+\n+To use node migrations to adjust a setup to changed configuration, a YAML file is created that configures the\n+migration by setting up filters to select what nodes are being worked on by transformations. The Content Repository\n+comes with a number of filters:\n+\n+- ``DimensionValues``\n+- ``IsRemoved``\n+- ``NodeName``\n+- ``NodeType``\n+- ``PropertyNotEmpty``\n+- ``Workspace``\n+\n+They all implement the ``TYPO3\\TYPO3CR\\Migration\\Filters\\FilterInterface``, custom filters can be developed against\n+that interface as well.\n+\n+Here is an example of a migration, ``Version20140708120530.yaml``, that operates on nodes in the \"live\" workspace\n+that are marked as removed and applies the ``RemoveNode`` transformation on them:\n+\n+.. code-block:: yaml\n+\n+  up:\n+    comments: 'Delete removed nodes that were published to \"live\" workspace'\n+    warnings: 'There is no way of reverting this migration since the nodes will be deleted in the database.'\n+    migration:\n+      -\n+        filters:\n+          -\n+            type: 'IsRemoved'\n+            settings: []\n+          -\n+            type: 'Workspace'\n+            settings:\n+              workspaceName: 'live'\n+        transformations:\n+          -\n+            type: 'RemoveNode'\n+            settings: []\n+\n+  down:\n+    comments: 'No down migration available'\n+\n+Like all migrations the file should be placed in a package inside the ``Migrations/TYPO3CR`` folder where it will be picked\n+up by the CLI tools provided with the content repository:\n+\n+- ``./flow node:migrationstatus``\n+- ``./flow node:migrate``\n+\n+Use ``./flow help <command>`` to get detailed instructions. The migrationstatus command also prints a short description\n+for each migration.\n+\n+Transformations Reference\n+-------------------------\n+\n+AddDimensions\n+~~~~~~~~~~~~~\n+\n+Add dimensions on a node. This adds to the existing dimensions, if you need to overwrite existing dimensions, use\n+SetDimensions.\n+\n+Options Reference:\n+\n+``dimensionValues`` (array)\n+  An array of dimension names and values to set.\n+``addDefaultDimensionValues`` (boolean)\n+  Whether to add the default dimension values for all dimensions that were not given.\n+\n+AddNewProperty\n+~~~~~~~~~~~~~~\n+\n+Add the new property and its value.\n+\n+Options Reference:\n+\n+``newPropertyName`` (string)\n+  The name of the new property to be added.\n+``value`` (mixed)\n+  Property value to be set.\n+\n+ChangeNodeType\n+~~~~~~~~~~~~~~\n+\n+Change the node type.\n+\n+Options Reference:\n+\n+``newType`` (string)\n+  The new Node Type to use as a string.\n+\n+ChangePropertyValue\n+~~~~~~~~~~~~~~~~~~~\n+\n+Change the value of a given property.\n+\n+This can apply two transformations:\n+- If newValue is set, the value will be set to this, with any occurrences of the ``currentValuePlaceholder`` replaced\n+  with the current value of the property.\n+- If search and replace are given, that replacement will be done on the value (after applying the ``newValue``, if set).\n+\n+Options Reference:\n+\n+``property`` (string)\n+  The name of the property to change.\n+``newValue`` (string)\n+  New property value to be set.\n+\n+  The value of the option \"currentValuePlaceholder\" (defaults to \"{current}\") will be used to include the current\n+  property value into the new value.\n+``search`` (string)\n+  Search string to replace in current property value.\n+``replace`` (string)\n+  Replacement for the search string.\n+``currentValuePlaceholder`` (string)\n+  The value of this option (defaults to ``{current}``) will be used to include the current property value into the new\n+  value.\n+\n+RemoveNode\n+~~~~~~~~~~\n+\n+Remove a given node (hard).","path":"TYPO3.Neos/Documentation/References/NodeMigrations.rst","position":150,"original_position":150,"commit_id":"ec7ddc31b020fb096efbc87e54cd7364bac6fdb6","original_commit_id":"ec7ddc31b020fb096efbc87e54cd7364bac6fdb6","user":{"login":"aertmann","id":903567,"avatar_url":"https://avatars.githubusercontent.com/u/903567?v=3","gravatar_id":"","url":"https://api.github.com/users/aertmann","html_url":"https://github.com/aertmann","followers_url":"https://api.github.com/users/aertmann/followers","following_url":"https://api.github.com/users/aertmann/following{/other_user}","gists_url":"https://api.github.com/users/aertmann/gists{/gist_id}","starred_url":"https://api.github.com/users/aertmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aertmann/subscriptions","organizations_url":"https://api.github.com/users/aertmann/orgs","repos_url":"https://api.github.com/users/aertmann/repos","events_url":"https://api.github.com/users/aertmann/events{/privacy}","received_events_url":"https://api.github.com/users/aertmann/received_events","type":"User","site_admin":false},"body":"how is this more hard than other transformations?","created_at":"2015-12-15T21:11:54Z","updated_at":"2015-12-15T21:11:54Z","html_url":"https://github.com/neos/neos-development-collection/pull/268#discussion_r47698926","pull_request_url":"https://api.github.com/repos/neos/neos-development-collection/pulls/268","_links":{"self":{"href":"https://api.github.com/repos/neos/neos-development-collection/pulls/comments/47698926"},"html":{"href":"https://github.com/neos/neos-development-collection/pull/268#discussion_r47698926"},"pull_request":{"href":"https://api.github.com/repos/neos/neos-development-collection/pulls/268"}}},"pull_request":{"url":"https://api.github.com/repos/neos/neos-development-collection/pulls/268","id":53690255,"html_url":"https://github.com/neos/neos-development-collection/pull/268","diff_url":"https://github.com/neos/neos-development-collection/pull/268.diff","patch_url":"https://github.com/neos/neos-development-collection/pull/268.patch","issue_url":"https://api.github.com/repos/neos/neos-development-collection/issues/268","number":268,"state":"open","locked":false,"title":"TASK: Documentation for node migrations","user":{"login":"kdambekalns","id":95873,"avatar_url":"https://avatars.githubusercontent.com/u/95873?v=3","gravatar_id":"","url":"https://api.github.com/users/kdambekalns","html_url":"https://github.com/kdambekalns","followers_url":"https://api.github.com/users/kdambekalns/followers","following_url":"https://api.github.com/users/kdambekalns/following{/other_user}","gists_url":"https://api.github.com/users/kdambekalns/gists{/gist_id}","starred_url":"https://api.github.com/users/kdambekalns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kdambekalns/subscriptions","organizations_url":"https://api.github.com/users/kdambekalns/orgs","repos_url":"https://api.github.com/users/kdambekalns/repos","events_url":"https://api.github.com/users/kdambekalns/events{/privacy}","received_events_url":"https://api.github.com/users/kdambekalns/received_events","type":"User","site_admin":false},"body":"This adds documentation for node migrations (filters and transformations).","created_at":"2015-12-15T11:19:34Z","updated_at":"2015-12-15T21:11:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aab55505bbc99bff0a891d114275451d78368ccd","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/neos/neos-development-collection/pulls/268/commits","review_comments_url":"https://api.github.com/repos/neos/neos-development-collection/pulls/268/comments","review_comment_url":"https://api.github.com/repos/neos/neos-development-collection/pulls/comments{/number}","comments_url":"https://api.github.com/repos/neos/neos-development-collection/issues/268/comments","statuses_url":"https://api.github.com/repos/neos/neos-development-collection/statuses/ec7ddc31b020fb096efbc87e54cd7364bac6fdb6","head":{"label":"kdambekalns:document-node-migrations","ref":"document-node-migrations","sha":"ec7ddc31b020fb096efbc87e54cd7364bac6fdb6","user":{"login":"kdambekalns","id":95873,"avatar_url":"https://avatars.githubusercontent.com/u/95873?v=3","gravatar_id":"","url":"https://api.github.com/users/kdambekalns","html_url":"https://github.com/kdambekalns","followers_url":"https://api.github.com/users/kdambekalns/followers","following_url":"https://api.github.com/users/kdambekalns/following{/other_user}","gists_url":"https://api.github.com/users/kdambekalns/gists{/gist_id}","starred_url":"https://api.github.com/users/kdambekalns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kdambekalns/subscriptions","organizations_url":"https://api.github.com/users/kdambekalns/orgs","repos_url":"https://api.github.com/users/kdambekalns/repos","events_url":"https://api.github.com/users/kdambekalns/events{/privacy}","received_events_url":"https://api.github.com/users/kdambekalns/received_events","type":"User","site_admin":false},"repo":{"id":41475597,"name":"neos-development-collection","full_name":"kdambekalns/neos-development-collection","owner":{"login":"kdambekalns","id":95873,"avatar_url":"https://avatars.githubusercontent.com/u/95873?v=3","gravatar_id":"","url":"https://api.github.com/users/kdambekalns","html_url":"https://github.com/kdambekalns","followers_url":"https://api.github.com/users/kdambekalns/followers","following_url":"https://api.github.com/users/kdambekalns/following{/other_user}","gists_url":"https://api.github.com/users/kdambekalns/gists{/gist_id}","starred_url":"https://api.github.com/users/kdambekalns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kdambekalns/subscriptions","organizations_url":"https://api.github.com/users/kdambekalns/orgs","repos_url":"https://api.github.com/users/kdambekalns/repos","events_url":"https://api.github.com/users/kdambekalns/events{/privacy}","received_events_url":"https://api.github.com/users/kdambekalns/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kdambekalns/neos-development-collection","description":"The unified repository containing the Neos core packages, used for Neos development.","fork":true,"url":"https://api.github.com/repos/kdambekalns/neos-development-collection","forks_url":"https://api.github.com/repos/kdambekalns/neos-development-collection/forks","keys_url":"https://api.github.com/repos/kdambekalns/neos-development-collection/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kdambekalns/neos-development-collection/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kdambekalns/neos-development-collection/teams","hooks_url":"https://api.github.com/repos/kdambekalns/neos-development-collection/hooks","issue_events_url":"https://api.github.com/repos/kdambekalns/neos-development-collection/issues/events{/number}","events_url":"https://api.github.com/repos/kdambekalns/neos-development-collection/events","assignees_url":"https://api.github.com/repos/kdambekalns/neos-development-collection/assignees{/user}","branches_url":"https://api.github.com/repos/kdambekalns/neos-development-collection/branches{/branch}","tags_url":"https://api.github.com/repos/kdambekalns/neos-development-collection/tags","blobs_url":"https://api.github.com/repos/kdambekalns/neos-development-collection/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kdambekalns/neos-development-collection/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kdambekalns/neos-development-collection/git/refs{/sha}","trees_url":"https://api.github.com/repos/kdambekalns/neos-development-collection/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kdambekalns/neos-development-collection/statuses/{sha}","languages_url":"https://api.github.com/repos/kdambekalns/neos-development-collection/languages","stargazers_url":"https://api.github.com/repos/kdambekalns/neos-development-collection/stargazers","contributors_url":"https://api.github.com/repos/kdambekalns/neos-development-collection/contributors","subscribers_url":"https://api.github.com/repos/kdambekalns/neos-development-collection/subscribers","subscription_url":"https://api.github.com/repos/kdambekalns/neos-development-collection/subscription","commits_url":"https://api.github.com/repos/kdambekalns/neos-development-collection/commits{/sha}","git_commits_url":"https://api.github.com/repos/kdambekalns/neos-development-collection/git/commits{/sha}","comments_url":"https://api.github.com/repos/kdambekalns/neos-development-collection/comments{/number}","issue_comment_url":"https://api.github.com/repos/kdambekalns/neos-development-collection/issues/comments{/number}","contents_url":"https://api.github.com/repos/kdambekalns/neos-development-collection/contents/{+path}","compare_url":"https://api.github.com/repos/kdambekalns/neos-development-collection/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kdambekalns/neos-development-collection/merges","archive_url":"https://api.github.com/repos/kdambekalns/neos-development-collection/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kdambekalns/neos-development-collection/downloads","issues_url":"https://api.github.com/repos/kdambekalns/neos-development-collection/issues{/number}","pulls_url":"https://api.github.com/repos/kdambekalns/neos-development-collection/pulls{/number}","milestones_url":"https://api.github.com/repos/kdambekalns/neos-development-collection/milestones{/number}","notifications_url":"https://api.github.com/repos/kdambekalns/neos-development-collection/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kdambekalns/neos-development-collection/labels{/name}","releases_url":"https://api.github.com/repos/kdambekalns/neos-development-collection/releases{/id}","created_at":"2015-08-27T08:44:11Z","updated_at":"2015-10-29T13:40:25Z","pushed_at":"2015-12-15T11:28:15Z","git_url":"git://github.com/kdambekalns/neos-development-collection.git","ssh_url":"git@github.com:kdambekalns/neos-development-collection.git","clone_url":"https://github.com/kdambekalns/neos-development-collection.git","svn_url":"https://github.com/kdambekalns/neos-development-collection","homepage":null,"size":48748,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"neos:2.0","ref":"2.0","sha":"50b6804400c58e4fad204c99618f099c28eea7c0","user":{"login":"neos","id":11575267,"avatar_url":"https://avatars.githubusercontent.com/u/11575267?v=3","gravatar_id":"","url":"https://api.github.com/users/neos","html_url":"https://github.com/neos","followers_url":"https://api.github.com/users/neos/followers","following_url":"https://api.github.com/users/neos/following{/other_user}","gists_url":"https://api.github.com/users/neos/gists{/gist_id}","starred_url":"https://api.github.com/users/neos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neos/subscriptions","organizations_url":"https://api.github.com/users/neos/orgs","repos_url":"https://api.github.com/users/neos/repos","events_url":"https://api.github.com/users/neos/events{/privacy}","received_events_url":"https://api.github.com/users/neos/received_events","type":"Organization","site_admin":false},"repo":{"id":40964014,"name":"neos-development-collection","full_name":"neos/neos-development-collection","owner":{"login":"neos","id":11575267,"avatar_url":"https://avatars.githubusercontent.com/u/11575267?v=3","gravatar_id":"","url":"https://api.github.com/users/neos","html_url":"https://github.com/neos","followers_url":"https://api.github.com/users/neos/followers","following_url":"https://api.github.com/users/neos/following{/other_user}","gists_url":"https://api.github.com/users/neos/gists{/gist_id}","starred_url":"https://api.github.com/users/neos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neos/subscriptions","organizations_url":"https://api.github.com/users/neos/orgs","repos_url":"https://api.github.com/users/neos/repos","events_url":"https://api.github.com/users/neos/events{/privacy}","received_events_url":"https://api.github.com/users/neos/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/neos/neos-development-collection","description":"The unified repository containing the Neos core packages, used for Neos development.","fork":false,"url":"https://api.github.com/repos/neos/neos-development-collection","forks_url":"https://api.github.com/repos/neos/neos-development-collection/forks","keys_url":"https://api.github.com/repos/neos/neos-development-collection/keys{/key_id}","collaborators_url":"https://api.github.com/repos/neos/neos-development-collection/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/neos/neos-development-collection/teams","hooks_url":"https://api.github.com/repos/neos/neos-development-collection/hooks","issue_events_url":"https://api.github.com/repos/neos/neos-development-collection/issues/events{/number}","events_url":"https://api.github.com/repos/neos/neos-development-collection/events","assignees_url":"https://api.github.com/repos/neos/neos-development-collection/assignees{/user}","branches_url":"https://api.github.com/repos/neos/neos-development-collection/branches{/branch}","tags_url":"https://api.github.com/repos/neos/neos-development-collection/tags","blobs_url":"https://api.github.com/repos/neos/neos-development-collection/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/neos/neos-development-collection/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/neos/neos-development-collection/git/refs{/sha}","trees_url":"https://api.github.com/repos/neos/neos-development-collection/git/trees{/sha}","statuses_url":"https://api.github.com/repos/neos/neos-development-collection/statuses/{sha}","languages_url":"https://api.github.com/repos/neos/neos-development-collection/languages","stargazers_url":"https://api.github.com/repos/neos/neos-development-collection/stargazers","contributors_url":"https://api.github.com/repos/neos/neos-development-collection/contributors","subscribers_url":"https://api.github.com/repos/neos/neos-development-collection/subscribers","subscription_url":"https://api.github.com/repos/neos/neos-development-collection/subscription","commits_url":"https://api.github.com/repos/neos/neos-development-collection/commits{/sha}","git_commits_url":"https://api.github.com/repos/neos/neos-development-collection/git/commits{/sha}","comments_url":"https://api.github.com/repos/neos/neos-development-collection/comments{/number}","issue_comment_url":"https://api.github.com/repos/neos/neos-development-collection/issues/comments{/number}","contents_url":"https://api.github.com/repos/neos/neos-development-collection/contents/{+path}","compare_url":"https://api.github.com/repos/neos/neos-development-collection/compare/{base}...{head}","merges_url":"https://api.github.com/repos/neos/neos-development-collection/merges","archive_url":"https://api.github.com/repos/neos/neos-development-collection/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/neos/neos-development-collection/downloads","issues_url":"https://api.github.com/repos/neos/neos-development-collection/issues{/number}","pulls_url":"https://api.github.com/repos/neos/neos-development-collection/pulls{/number}","milestones_url":"https://api.github.com/repos/neos/neos-development-collection/milestones{/number}","notifications_url":"https://api.github.com/repos/neos/neos-development-collection/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/neos/neos-development-collection/labels{/name}","releases_url":"https://api.github.com/repos/neos/neos-development-collection/releases{/id}","created_at":"2015-08-18T09:48:35Z","updated_at":"2015-12-03T22:05:00Z","pushed_at":"2015-12-15T21:11:36Z","git_url":"git://github.com/neos/neos-development-collection.git","ssh_url":"git@github.com:neos/neos-development-collection.git","clone_url":"https://github.com/neos/neos-development-collection.git","svn_url":"https://github.com/neos/neos-development-collection","homepage":"https://www.neos.io/","size":54318,"stargazers_count":58,"watchers_count":58,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":41,"mirror_url":null,"open_issues_count":29,"forks":41,"open_issues":29,"watchers":58,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/neos/neos-development-collection/pulls/268"},"html":{"href":"https://github.com/neos/neos-development-collection/pull/268"},"issue":{"href":"https://api.github.com/repos/neos/neos-development-collection/issues/268"},"comments":{"href":"https://api.github.com/repos/neos/neos-development-collection/issues/268/comments"},"review_comments":{"href":"https://api.github.com/repos/neos/neos-development-collection/pulls/268/comments"},"review_comment":{"href":"https://api.github.com/repos/neos/neos-development-collection/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/neos/neos-development-collection/pulls/268/commits"},"statuses":{"href":"https://api.github.com/repos/neos/neos-development-collection/statuses/ec7ddc31b020fb096efbc87e54cd7364bac6fdb6"}}}}