Class: SagaForge::UpgradeGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- SagaForge::UpgradeGenerator
- Includes:
- ActiveRecord::Generators::Migration, Generators::MigrationActions
- Defined in:
- lib/generators/saga_forge/upgrade/upgrade_generator.rb
Overview
Brings an existing SagaForge installation up to the current schema by
copying any migrations the application does not already have. Applications
created with saga_forge:install on the current version already have
everything; older installs pick up any additive migrations added since.
rails generate saga_forge:upgrade
rails db:migrate
Multi-database aware: with --database (or config.database set in the initializer), missing migrations are copied into db/NAME_migrate.
Constant Summary
Constants included from Generators::MigrationActions
Generators::MigrationActions::MIGRATIONS
Instance Method Summary collapse
Methods included from Generators::MigrationActions
#copy_saga_forge_migrations, included, #saga_forge_database, #saga_forge_migration_exists?, #saga_forge_migrations_dir
Instance Method Details
#start ⇒ Object
23 24 25 26 27 28 |
# File 'lib/generators/saga_forge/upgrade/upgrade_generator.rb', line 23 def start copy_saga_forge_migrations rescue => err say "#{err.class}: #{err}\n#{err.backtrace.join("\n")}", :red exit 1 end |