- Issue created by @AndyF
- Merge request !135Issue #3461821: Move field migration logic out of drush command → (Open) created by AndyF
- Issue was unassigned.
- Status changed to Needs review
5 months ago 3:09pm 16 July 2024
If you want to migrate date fields via code, currently you have to either copy the logic from \Drupal\smart_date\Commands\SmartDateDrushCommands::migrate()
or call the drush command (which is fragile). Ideally drush commands should be wrappers around functionality exposed by the module. An example of working around this issue can be seen in
💬
How to run migration script in a post-update hook
Needs review
.
Try to write a function in a custom module that migrates date fields to smart dates.
Create a new service that supports migrating fields and call that from the drush command.
Do it.
None
There will be a new service with a migrate()
method.
None
Needs review
4.1
Code