-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Justin Coyne edited this page Dec 19, 2018
·
6 revisions
- Scope the problem. Get a count of
workflow
andworkflow_archive
- On workflow-server-rails
ActiveRecord::Base.connection.query('SELECT count(*) from workflow_archive')
ActiveRecord::Base.connection.query('SELECT count(*) from workflow')
- On workflow-archiver-job
DB = Dor::WorkflowArchiver.new.conn
-
DB.fetch('SELECT count(*) from workflow').first[:'count(*)']
(currently 572785) -
DB.fetch('SELECT count(*) from workflow_archive').first[:'count(*)']
(currently 126,069,766)
- Disable the workflow-archiver-job (remove from crontab) so that no new rows get added to workflow_archive.
- Export
workflow_archive
to a CSV? - Import the CSV as
workflows
- Export
workflow
to a CSV. - Import the CSV, while calculating the current version for each row.