8000 Ccom gme iowaprotocols migration tweaks by joewhitsitt · Pull Request #8799 · uiowa/uiowa · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Ccom gme iowaprotocols migration tweaks #8799

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Jun 4, 2025

Conversation

joewhitsitt
Copy link
Contributor
@joewhitsitt joewhitsitt commented May 20, 2025

I am leaving the existing downloadFile, getMid and getD8FileByFilename in case other migrations are calling it, but everything else should be calling the replacement functions that look up by file uri and filesize where available.

Looking for technical review and approval. We can send out to DEV again and re-run for their overall inspection.

Resolves #8760

How to test

ddev blt ds --site=iowaprotocols.medicine.uiowa.edu && ddev drush @medicineiowaprotocols.local  en iowaprotocols_migrate -y && ddev drush @medicineiowaprotocols.local uli admin/config/sitenow/sitenow-migrate
  • Configure SiteNow Migrate following instructions for DevDesktop.
    • Database: medicine_uiowa_edu_iowaprotocols
    • User: root
    • Host: host.docker.internal
    • Port: 33067
    • Base URL: https://medicine.uiowa.edu/iowaprotocols/
    • Public Files Path: sites/medicine.uiowa.edu.iowaprotocols/files
  • Check the migration status:
ddev drush @medicineiowaprotocols.local  ms

Consider limiting migrated content to series of examples the nodes that conflict with them by adding this above prepareRow in Protocol.php

/**
   * {@inheritdoc}
   */
  public function query() {
    $query = parent::query();
    // Targeted migration debugging.
    // @todo Remove this when done.
    $query->condition('n.nid', [591, 626, 1191, 2011, 2021, 4161, 4446, 4871, 5056, 6296, 6371, 7946, 8251], 'IN');
    return $query;
  }
  • Run all migrations
ddev drush @medicineiowaprotocols.local  mim --all 
  • Import the protocols:
ddev drush @medicineiowaprotocols.local  mim iowaprotocols_protocols
  • Rollback
ddev drush @medicineiowaprotocols.local  mr --all
  • Stop a currently running migration
ddev drush @medicineiowaprotocols.local  migrate-stop iowaprotocols_protocols && ddev drush @medicineiowaprotocols.local migrate-reset iowaprotocols_protocols

Nodes to spot check:

  • Non-gallery images don't have alignment issues with the text
  • Images that have title text now map properly to the global captions field and display in gallery full view.
  • Correct images are showing up as expected.
  • Missing images should be greatly reduced are in situations where the d7 src is calling an image style instead of a file uri in the db file_managed table. The first link to compare is an example of this. Two images are mapped. The others return in Find Text as Missing image:

https://medicine.uiowa.edu/iowaprotocols/thyroglossal-duct-cyst-tract-through-oropharynx-clinical-case-example
https://medicineiowaprotocols.uiowa.ddev.site/protocols/2017/04/thyroglossal-duct-cyst-tract-through-oropharynx-clinical-case-example

https://medicine.uiowa.edu/iowaprotocols/vertical-partial-laryngectomy-case-example
https://medicineiowaprotocols.uiowa.ddev.site/protocols/2017/04/vertical-partial-laryngectomy-case-example

https://medicine.uiowa.edu/iowaprotocols/parotid-accessory-lobe-sialadenitis-open-resection-supplemented-sialendoscopy
https://medicineiowaprotocols.uiowa.ddev.site/protocols/2017/05/parotid-accessory-lobe-sialadenitis-open-resection-supplemented-sialendoscopy

https://medicine.uiowa.edu/iowaprotocols/peritonsillar-abscess-pta-management-tonsil-abscess
https://medicineiowaprotocols.uiowa.ddev.site/protocols/2017/05/peritonsillar-abscess-pta-management-tonsil-abscess

https://medicine.uiowa.edu/iowaprotocols/ultrasound-management-xerostomia-dry-mouth-following-salivary-gland-irradiation
https://medicineiowaprotocols.uiowa.ddev.site/protocols/2022/09/ultrasound-management-xerostomia-dry-mouth-following-salivary-gland-irradiation

https://medicine.uiowa.edu/iowaprotocols/hearing-protection-all-musicians-three-trombone-example-music-and-medicine-monday
https://medicineiowaprotocols.uiowa.ddev.site/protocols/2024/01/hearing-protection-all-musicians-three-trombone-example-music-and-medicine-monday

https://medicine.uiowa.edu/iowaprotocols/vagal-schwannoma-radiology
https://medicineiowaprotocols.uiowa.ddev.site/protocols/2017/04/vagal-schwannoma-radiology

https://medicine.uiowa.edu/iowaprotocols/lip-biopsy-minor-salivary-gland-histopathology-sjogrens-syndrome-sjogren-sjogrens
https://medicineiowaprotocols.uiowa.ddev.site/protocols/2018/12/lip-biopsy-minor-salivary-gland-histopathology-sjogrens-syndrome-sjogren-sjogrens

https://medicine.uiowa.edu/iowaprotocols/sialogram-left-parotid-sjogrens-syndrome
https://medicineiowaprotocols.uiowa.ddev.site/protocols/2017/05/sialogram-left-parotid-sjogrens-syndrome

@joewhitsitt
Copy link
Contributor Author
joewhitsitt commented May 27, 2025

Running the whole thing. Stand by. 🤞

Update: I think it was largely successful except for trying process inline images that were linking to the image style version instead of what is stored in the db. .../files/styles/medium/public/...

@joewhitsitt joewhitsitt requested a review from a team May 27, 2025 20:14
@joewhitsitt joewhitsitt marked this pull request as ready for review May 27, 2025 20:14
@GaryRidgway
Copy link
Contributor

I can try and test this since I have a local set up

@GaryRidgway
Copy link
Contributor

I tested this locally and feel like all of the things detailed in the testing instructions worked as described.

@joewhitsitt joewhitsitt merged commit 5570d57 into main Jun 4, 2025
2 checks passed
@joewhitsitt joewhitsitt deleted the ccom_gme_iowaprotocols_migration_tweaks branch June 4, 2025 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Iowa Protocols migration feedback
3 participants
0