DR 3004 migrate tiff image links #155
Open
+83
−28
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR Contains the changes necessary to migrate Link Service links from Fedora to the IIIF image server on a local device. IT SHOULD NOT BE MEGED into the main line of development for any reason.
How to Test
docker-compose build
. Then, bring up the containers withdocker-compse up
.Databases
original-link-test-db.sql.gz
andmms_production-12-17-2024.sql.gz
from db_dumps and unzip them.original-link-test-db.sql
tofedora_ingest_rails/database-data/mysql/
and movemms_production-12-17-2024.sql
tofedora_ingest_rails/database-data/mms-postgres/
docker-compose exec filestore-db sh -c "mysql -u root -p'mysqlpassword' -c 'CREATE DATABASE image_filestore_development;'"
docker-compose exec filestore-db sh -c "mysql -u root -p'mysqlpassword' image_filestore_development < /database-data/mysql/original-link-test-db.sql"
docker-compose exec mms-postgres sh -c "psql -U postgres -c 'CREATE DATABASE mms_development;'"
docker-compose exec mms-postgres sh -c "psql -U postgres mms_development < /database-data/mms-postgres/mms_production-12-17-2024.sql"
Validation of Database Connectivity
docker exec -it fedora_ingest_rails-webapp-1 bash
and open a rails console withbundle exec rails c
LinkStore.where("url LIKE ?", "%/fedora/%").count
. There should be over 4 million results.Capture.first
, and ensure a valid result is returned.Test the migration
bundle exec rake urls:migrate
LinkStore.where("url LIKE ?", "%/fedora/%").count
in a rails console again. The number of remaining legacy links should only be about 3300. This is because the links no longer exist in mms.