Hello there - as a plugin used in our Discourse instance is no longer updates (Multilingual), and some of its features are supported in the newer versions of Discourse, we wished to use a migration script in order to move values in the database to new places.
However, while researching the wiki articles from this site, or the git repository of Discourse, I haven’t found any documentation to write a migration script (what class to inherit, what methods to use…)
Is there any documentation which I missed ? Aside from looking at migration code, is there any tips to acknowledge myself around migration scripts ?
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