{"id":21612154,"url":"https://github.com/carbonpackages/carbon.automigrate","last_synced_at":"2025-04-11T05:35:41.292Z","repository":{"id":264240848,"uuid":"876899825","full_name":"CarbonPackages/Carbon.AutoMigrate","owner":"CarbonPackages","description":"Automatic node migrations for Neos CMS","archived":false,"fork":false,"pushed_at":"2025-01-22T12:54:51.000Z","size":30,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-08T03:03:15.734Z","etag":null,"topics":["carbon","deployment","migration","neos-plugin","neoscms"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CarbonPackages.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-22T18:31:55.000Z","updated_at":"2025-01-22T12:47:18.000Z","dependencies_parsed_at":"2024-11-22T22:03:01.781Z","dependency_job_id":null,"html_url":"https://github.com/CarbonPackages/Carbon.AutoMigrate","commit_stats":null,"previous_names":["carbonpackages/carbon.automigrate"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CarbonPackages%2FCarbon.AutoMigrate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CarbonPackages%2FCarbon.AutoMigrate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CarbonPackages%2FCarbon.AutoMigrate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CarbonPackages%2FCarbon.AutoMigrate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CarbonPackages","download_url":"https://codeload.github.com/CarbonPackages/Carbon.AutoMigrate/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247767224,"owners_count":20992545,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["carbon","deployment","migration","neos-plugin","neoscms"],"created_at":"2024-11-24T21:16:53.154Z","updated_at":"2025-04-11T05:35:41.276Z","avatar_url":"https://github.com/CarbonPackages.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Carbon.AutoMigrate\n\nSometimes, things change. This package helps you to migrate old installation to up-to-date installations. This help\nto run migrations after deployments.\n\n## Installation\n\nThis package is available via [packagist]. Run `composer require carbon/automigrate --no-update` in your\nsite package. After that, run `composer update` in your root directory.\n\n## How to use it\n\nAdd your node migrations version numbers to your `Settings.yaml`:\n\n```yaml\nCarbon:\n  AutoMigrate:\n    node:\n      20241005070000: true\n      20241005090000: true\n```\n\nConfigure your stack to run `./flow node:automigrate` after `./flow doctrine:migrate`. The command will check if the\nmigrations are available, checks if the migrations has already been applied, and if not, the migrations get's applied.\n\n### Options\n\nRun `./flow help node:automigrate` to see the options:\n\n```bash\n--confirmation       Confirm application of this migration, only needed if the given migration contains any warnings.\n--dry-run            If true, no changes will be made\n```\n\n## Aditional migration helper\n\n### [RenamePropertyValuesMigration](Classes/Migrations/RenamePropertyValuesMigration.php)\n\nThis can be used to rename one or multiply property values. This is also possible with default yaml, but need many\nlines, if you have multiple values to change.\n\nA migration could look like this:\n\n```yaml\nup:\n  comments: \"Switch property values\"\n  migration:\n    - filters:\n        - type: \"NodeType\"\n          settings:\n            nodeType: \"Foo.Bar:Mixin.Direction\"\n            withSubTypes: true\n      transformations:\n        - type: 'Carbon\\AutoMigrate\\Migrations\\RenamePropertyValuesMigration'\n          settings:\n            propertyName: direction\n            values:\n              oldValue: newValue\n              northEast: topRight\n              northWest: topLeft\n              southEast: bottomRight\n              southWest: bottomLeft\n\ndown:\n  comments: \"Revert property value switch\"\n  migration:\n    - filters:\n        - type: \"NodeType\"\n          settings:\n            nodeType: \"Foo.Bar:Mixin.Direction\"\n            withSubTypes: true\n      transformations:\n        - type: 'Carbon\\AutoMigrate\\Migrations\\RenamePropertyValuesMigration'\n          settings:\n            propertyName: direction\n            values:\n              newValue: oldValue\n              topRight: northEast\n              topLeft: northWest\n              bottomRight: southEast\n              bottomLeft: southWest\n```\n\n### [RenameNodeTypesMigration](Classes/Migrations/RenameNodeTypesMigration.php)\n\nThis can be used if you want to rename NodeTypes. This not only change the `nodetype` in the table\n`neos_contentrepository_domain_model_nodedata`, it also set the `siteresourcespackagekey` in\n`neos_neos_domain_model_site` if the node type match.\n\nYou have to create a PHP file in your package under `Migrations/Mysql`\n\n```php\n\u003c?php\n\nnamespace Neos\\Flow\\Persistence\\Doctrine\\Migrations;\n\nuse Carbon\\AutoMigrate\\Migrations\\RenameNodeTypesMigration;\n\nclass Version20241005130500 extends RenameNodeTypesMigration\n{\n  public array $nodeTypes = [\n    \"Vendor.Example:Content.OldNodeType\" =\u003e \"Vendor.Example:Content.NewNodeType\",\n    \"Vendor.Example:Document.OldNodeType\" =\u003e \"Vendor.Example:Document.NewNodeType\",\n  ];\n}\n```\n\nThe migration will automatically run if you run `./flow doctrine:migrations`.\n\n[packagist]: https://packagist.org/packages/carbon/automigrate\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarbonpackages%2Fcarbon.automigrate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcarbonpackages%2Fcarbon.automigrate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarbonpackages%2Fcarbon.automigrate/lists"}