Feature #19589

Add an option to create plugin migrations with properly marked scope

Added by Shimon Shtein 11 months ago. Updated 11 months ago.

Status:Closed
Priority:Normal
Assigned To:Shimon Shtein
Category:Plugins-Engines
Target version:-
Difficulty: Bugzilla link:
Found in release: Pull request:https://github.com/theforeman/foreman/pull/4509, https://github.com/theforeman/foreman/pull/4571
Story points-
Velocity based estimate-
Release1.16.0Release relationshipAuto

Description

We want to mark every newly created migration with a scope that will indicate the plugin that this migration came from.
This will enable later on to rollback/migrate only migrations that belong to a certain plugin.


Related issues

Blocks Foreman - Tracker #19454: Mark plugin migrations to be able to run them separately ... Assigned 05/03/2017

Associated revisions

Revision fb57b8b0
Added by Shimon Shtein 11 months ago

Fixes #19589 - Added plugin migration generator

Now plugin creators would be able to generate migrations by invoking

``` sh

rails g plugin:migration <migration name and options> --plugin_name=my_plugin

```

Revision 13b42253
Added by Ohad Levy 11 months ago

refs #19589 - ensure that foreman starts in production

this avoids the following error in production (under passenger):
Message from application: uninitialized constant Generators::Base (NameError)
lib/generators/plugin/migration_generator.rb:2:in `<module:Plugin>'
lib/generators/plugin/migration_generator.rb:1:in `<top (required)>

History

#1 Updated by Shimon Shtein 11 months ago

  • Blocks Tracker #19454: Mark plugin migrations to be able to run them separately for each plugin. added

#2 Updated by The Foreman Bot 11 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/4509 added

#3 Updated by Shimon Shtein 11 months ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#4 Updated by Marek Hulán 11 months ago

  • Release set to 1.16.0

#5 Updated by The Foreman Bot 11 months ago

  • Pull request https://github.com/theforeman/foreman/pull/4571 added

Also available in: Atom PDF