The discussion revolves around documenting database migration scripts in Discourse, specifically for migrating data from the deprecated Multilingual plugin. Honeyxilia seeks guidance on using Discourse’s migration scripts (db/migrate) to transfer data to newer versions, clarifying that they mean ActiveRecord-based migrations, not import scripts. ToddZ shares past difficulty in finding documentation for such migrations, while pfaffman suggests that if the data is already in Discourse, the focus should be on adapting the database structure. merefield confirms these are standard Rails migrations and points to Rails documentation for further details. The thread highlights a gap in accessible documentation for custom database migrations in Discourse.
Hallo daar - aangezien een plugin die in ons Discourse-exemplaar wordt gebruikt niet langer wordt bijgewerkt (Multilingual), en sommige van de functies ervan worden ondersteund in de nieuwere versies van Discourse, wilden we een migratiescript gebruiken om waarden in de database naar nieuwe locaties te verplaatsen.
Tijdens het onderzoeken van de wiki-artikelen van deze site, of de git-repository van Discourse, heb ik echter geen documentatie gevonden om een migratiescript te schrijven (van welke klasse te erven, welke methoden te gebruiken…).
Is er documentatie die ik heb gemist? Afgezien van het bekijken van migratiecode, zijn er nog tips om mezelf vertrouwd te maken met migratiescripts?
When I had content to migrate from a platform with no available Discourse script, I had no luck finding real documentation about these things. Existing scripts were beyond me to reverse-engineer. I ended up manually importing a topic at a time via the Rails console – not very scalable.
Honeyxilia, the way I read your question, it sounds like you did a bunch of work with the Pavilion Multilingual Plugin and would like to “migrate” that data to the newer Discourse Content Localization features. Is that right? (I’m not sure where I’d start with that either.)
What I mean by migration script is the database migration scripts ( db/migrate ) inheriting from ActiveRecord::Migration which are used to adapt the database to the Discourse changes.
For instance, we have the SQL commands to transfer a Multilingual-plugin locale into a native Discourse locale.
My question would be mostly about the database migrate scripts, in order to automate the SQL commands when migrating the database to a newer version