discourse/migrations
Selase Krakani 6c91148db8
DEV: Refactor `uploads_importer` script (#29292)
* DEV: Implement uploads command entrypoint

- Setup Thor UploadsCommand for CLI
- First pass at modularizing various parts of the exising `uploads_import` script

* DEV: First attempt at modularizing missing uploads fixer task

Move missing upload fix to a dedicated uploads task implementation unit

* DEV: First attempt at modularizing missing uploads uploader task

Move uploader to a dedicated uploads task implementation unit

* DEV: First attempt at modularizing missing uploads optimizer task

Move optimizer to a dedicated uploads task implementation unit

* DEV: Various follow up fixes to get optimization working

- Start threads early
- Improve "log" message formatting
- Add missing `copy_to_tempfile` method on "uploader" task

* DEV: Refactor a bit more

Deduplicate and move most of threading premitives to base task as-is

* DEV: Remove redundant condition in uploads db migration

* DEV: More deduplication

Move task retry logic to base class and tidy up other implementation
details carried over from the existing script
2024-10-31 13:31:12 +00:00
..
bin DEV: Refactor `uploads_importer` script (#29292) 2024-10-31 13:31:12 +00:00
config DEV: Refactor `uploads_importer` script (#29292) 2024-10-31 13:31:12 +00:00
db DEV: Refactor `uploads_importer` script (#29292) 2024-10-31 13:31:12 +00:00
docs
lib DEV: Refactor `uploads_importer` script (#29292) 2024-10-31 13:31:12 +00:00
scripts DEV: Add converter framework for migrations-tooling (#28540) 2024-09-09 17:14:39 +02:00
spec DEV: Add converter framework for migrations-tooling (#28540) 2024-09-09 17:14:39 +02:00
.gitignore DEV: Refactor `uploads_importer` script (#29292) 2024-10-31 13:31:12 +00:00
README.md DEV: Add converter framework for migrations-tooling (#28540) 2024-09-09 17:14:39 +02:00

README.md

Migrations Tooling

Command line interface

./bin/cli help

Converters

Public converters are stored in lib/converters/. If you need to run a private converter, put its code into a subdirectory of private/converters/

Development

Installing gems

bundle config set --local with migrations
bundle install

Updating gems

bundle update --group migrations

Running tests

You need to execute rspec in the root of the project.

bin/rspec --default-path migrations/spec