angus
(Angus McLeod)
27.Октябрь.2022 12:16:30
469
Всем привет, как мы обсуждали в теме выше, я уже написал функцию миграции с Retort на Reactions, включая административный интерфейс.
I’ve written a migration script and created an admin UI to migrate retorts to reactions. It’s on this branch . The UI looks like this
[Screen Shot 2021-03-18 at 4.30.04 PM]
I need some advice to finish it off.
It’s possible that a user could have both liked and “retorted” on a post. In the migration, I’m going to preference retorts over likes in this scenario. However the ReactionManager.toggle! access protections do not allow this.
Would it be possible to add a “force” option for migrations…
Чтобы это решение было готово к использованию в production, разработчикам плагина Reactions потребуется внести небольшое изменение для улучшения абстракции кода в плагине Reactions.
Yup, I could do that. It would be a bit of a hack though
I’m not sure I could assume that workaround would remain viable over time. It’s also a bit risky. For example, if I just run that code the user’s post_undo_action_window_mins site setting would remained changed. You could change it back at the end of the migration, but doing setting changes like this on the fly to get around a guardian is not ideal.
Ideally what I’m after here is a slight change to the ReactionManager interface to…
Поддержка миграции на уровне production между двумя плагинами требует значительного обеспечения качества, иначе могут легко возникнуть проблемы, подобные этой.
What is happening here is this
Some people have a very old version of the question answer plugin with my personal github username in the repository URL in their app.yml file.
I transferred the QnA plugin to paviliondev years ago. Github redirects repository URLs when they’re transferred, so the old urls with my personal username in it kept working.
More years later Pavilion transferred the Question Answer Plugin to Discourse. Discourse initially kept the name discourse-question-answer.
…
4 лайка