תיעוד סקריפט הגירה

שלום - מכיוון שפלאגין המשמש במופע ה-Discourse שלנו כבר אינו מתעדכן (Multilingual), וכמה מהתכונות שלו נתמכות בגרסאות חדשות יותר של Discourse, רצינו להשתמש בסקריפט הגירה כדי להעביר ערכים מבסיס הנתונים למקומות חדשים.

עם זאת, תוך כדי מחקר מאמרי הוויקי מאתר זה, או ממאגר ה-git של Discourse, לא מצאתי תיעוד לכתיבת סקריפט הגירה (איזו מחלקה לרשת, אילו שיטות להשתמש…).

האם יש תיעוד כלשהו שפספסתי? מלבד התבוננות בקוד ההגירה, האם יש טיפים להכיר את עצמי סביב סקריפטי הגירה?

תודה מראש!

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.

If I’d had a bigger project (and a budget) I’d have probably have contracted @pfaffman for his migration service.

What are you trying to do? If you’re still by to use discourse then it’s not a migration. What do you want to move where?

If you just want to move to an up to date discourse then you can likely just remove the plugin and upgrade.

If you’re not using Discourse anymore then it’s not a Discourse migration script you want.

לייק 1

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.)

לייק 1

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

I changed the title of the topic to precise what I meant

לייק 1

These are just standard Rails migrations. Take a look at:

If you are going to add some, recommend you do this in a plugin, not fork core :slight_smile:

3 לייקים

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.