プロジェクト

全般

プロフィール

Vote #79352

完了

Support migration context for plugins

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Rails support_44
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
44
version_id:
99
issue_org_id:
28934
author_id:
123153
assigned_to_id:
1
comments:
11
status_id:
5
tracker_id:
3
plus1:
1
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]


journals

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
I attach a patch to add simple unit test.
I hope to fix this issue :)
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
+1 this patch is needed to migrate a plugin by redmine:plugins:migrate on rails 5.2.

--------------------------------------------------------------------------------
I think release version like 3.4.x is NOT going to support Rails 5.2, keep 4.x.
So I created a patch which is removed condition of Rails version check for older than trunk.
I attatch it, and it includes add_unittest.patch.

--------------------------------------------------------------------------------
@Tatsuya Saito
I agree we can remove the rails version check. Your patch is simple, but wrong. It produces *invalid entries in schema_migrations!* without a plugin_name suffix.

Btw: my patch also loads schema_migrations only once for all plugins, so there's also a performance impact if you have more plugins installed.

Unfortunatelly I have to duplicate MigrationContext because it calls back the original Migrator class from Rails not the patched one by Redmine. Maybe someone can figure out a better solution.
--------------------------------------------------------------------------------
Pavel Rosický wrote:
> @Tatsuya Saito
> I agree we can remove the rails version check. Your patch is simple, but wrong. It produces *invalid entries in schema_migrations!* without a plugin_name suffix.

Thanks comment and sorry broke your patch.
I fix and attach it.

--------------------------------------------------------------------------------
It's ok. Thanks for testing
--------------------------------------------------------------------------------
Committed, thanks.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------


related_issues

relates,Closed,28933,Migrate to Rails 5.2
duplicates,Closed,29291,NoMethodError: undefined method `migrate' for Redmine::Plugin::Migrator:Class

Admin Redmine さんが3年以上前に更新

  • カテゴリRails support_44 にセット
  • 対象バージョン4.0.0_99 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0