Class: Basho::Generators::UpgradeDeprecationGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Includes:
ActiveRecord::Generators::Migration
Defined in:
lib/generators/basho/upgrade_deprecation/upgrade_deprecation_generator.rb

Overview

既存の +basho_cities+ テーブルに +deprecated_at+ / +successor_code+ を追加するマイグレーションジェネレータ。

Examples:

rails generate basho:upgrade_deprecation

Instance Method Summary collapse

Instance Method Details

#create_migration_fileObject



19
20
21
22
23
24
# File 'lib/generators/basho/upgrade_deprecation/upgrade_deprecation_generator.rb', line 19

def create_migration_file
  migration_template(
    "add_deprecation_to_basho_cities.rb.erb",
    "db/migrate/add_deprecation_to_basho_cities.rb"
  )
end