mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-01 14:54:42 +08:00
This extends the **MyLittleForum (MLF) importer** with several optional features to make migrations more complete and reliable. ### New Features (optional via environment variables) **Uploads import**: supports attachments and images from the MLF uploads table. - Imported uploads are stored with relative links, ensuring they continue to work even if the forum domain changes. - **Legacy link rewriting**: absolute links (`index.php?id=...`) are converted into working Discourse permalinks. - Rewritten links are also created as relative links, so they remain valid after a domain move. - **Parent category option**: all imported MLF categories can be placed under a chosen existing category. - **Upload repair pass / incremental imports:** already-imported posts can be rescanned to fix broken or newly available upload references, allowing the importer to be run again later with a more up-to-date dataset. - **Relaxed upload constraints**: temporarily increases file size limits and allows all extensions during the import step. ### Other Improvements - Adjusted for MyLittleForum 2.x schema changes (e.g. `user_location` instead of `user_place`). - User import now respects already staged users; avoids errors that would otherwise occur when trying to create them again. - Improved BBCode → Markdown conversion: lists and quotes are converted more reliably. - Especially improves handling of quotes at the beginning of posts and ensures following text is not mistakenly included in the quoted block. - Thread interlinking restored: legacy links between threads are now rewritten to point to the correct Discourse topics. ### Environment Variables - `PARENT_CATEGORY` – import all categories under an existing Discourse category. - `REWRITE_LINKS` – rewrite absolute legacy links. - `UPLOADS_DIR` – path to the MLF uploads directory (flat namespace). - `REPAIR_UPLOAD_LINKS` – repair pass for already-imported posts with links. - `LOOSEN_UPLOAD_CONSTRAINTS` – relax upload size/extension checks during import and increases file size limits and allows all extensions during the import step. |
||
|---|---|---|
| .. | ||
| benchmarks | ||
| bulk_import | ||
| demon_test | ||
| import_scripts | ||
| .gitignore | ||
| alice.txt | ||
| analyse_message_bus.rb | ||
| analyze_sidekiq_queues.rb | ||
| assemble_ember_build.rb | ||
| bench.rb | ||
| biggest_objects.rb | ||
| boot_mem.rb | ||
| build_jsconfig.rb | ||
| cache_critical_dns | ||
| check_forking.rb | ||
| check_reproducible_assets.rb | ||
| copyright-deposit | ||
| db_timestamps_mover.rb | ||
| diff_heaps.rb | ||
| discourse | ||
| docker_test.rb | ||
| get_github_workflow_run_job_id.rb | ||
| i18n_lint.rb | ||
| install_minio_binaries.rb | ||
| list_bundled_plugins | ||
| local_minio_s3.rb | ||
| memory-analysis | ||
| memstats.rb | ||
| micro_bench.rb | ||
| mwrap_sidekiq | ||
| profile_db_generator.rb | ||
| promote_migrations | ||
| publish_built_assets.rb | ||
| rails | ||
| redis_memory.rb | ||
| require_profiler.rb | ||
| silence_successful_output | ||
| spawn_backup_restore.rb | ||
| start_test_db.rb | ||
| switch_container_ruby | ||
| test_email_settings.rb | ||
| test_mem.rb | ||
| test_memory_leak.rb | ||
| test_pretty_text.rb | ||
| thread_detective.rb | ||
| user_simulator.rb | ||