Project

General

Profile

Actions

Patch #31498

closed

Add redmine_plugin_migration generator

Added by Kouhei Sutou almost 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Plugin API
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Redmine provides redmine_plugin_model generator. It's similar to model generator by Rails but for Redmine plugin. It's useful to add a new model to Redmine plugin.

But Redmine doesn't provide redmine_plugin_migration generator. It's similar to migration generator by Rails but for Redmine plugin. It's useful to improve existing models in Redmine plugin.

We need to create a migration file for Redmine plugin by hand without redmine_plugin_migration.

The attached patch implements redmine_plugin_migration generator. It only has the minimal features:

  • Assign a new migration version.
  • Just create a migration file that only has empty change method.

The migration generator by Rails has more features:

I think that minimum implementation is a good starting point.

This implementation uses the framework for migration provided by Rails: https://github.com/rails/rails/blob/master/railties/lib/rails/generators/migration.rb


Files

Actions #1

Updated by Go MAEDA almost 5 years ago

  • Target version set to Candidate for next major release
Actions #2

Updated by vzvu 3k6k almost 5 years ago

I think that minimum implementation is a good starting point.

+1, nice work!

This is a minute thing but `plugin_pretty_name` declared in line 16 of redmine_plugin_migration_generator.rb is not used so far and probably can be safely removed.

Actions #4

Updated by Go MAEDA almost 5 years ago

  • Target version changed from Candidate for next major release to 4.1.0

Setting the target version to 4.1.0.

Actions #5

Updated by Go MAEDA almost 5 years ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA

Committed the patch. Thank you.

Actions #6

Updated by Kuniharu AKAHANE over 4 years ago

  • Copied to Patch #31987: Add rake task which synchronize all revisions in repositories related with all active projects added
Actions #7

Updated by Go MAEDA over 4 years ago

  • Copied to deleted (Patch #31987: Add rake task which synchronize all revisions in repositories related with all active projects)
Actions

Also available in: Atom PDF