Class: SO2DB::AddForeignKeyMigration
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- SO2DB::AddForeignKeyMigration
- Defined in:
- lib/so2db/migrations.rb
Instance Method Summary collapse
-
#initialize(from_table, to_table, options) ⇒ AddForeignKeyMigration
constructor
A new instance of AddForeignKeyMigration.
- #up ⇒ Object
Constructor Details
#initialize(from_table, to_table, options) ⇒ AddForeignKeyMigration
Returns a new instance of AddForeignKeyMigration.
48 49 50 51 52 |
# File 'lib/so2db/migrations.rb', line 48 def initialize(from_table, to_table, ) @from_table = from_table @to_table = to_table = end |
Instance Method Details
#up ⇒ Object
54 55 56 |
# File 'lib/so2db/migrations.rb', line 54 def up add_foreign_key(@from_table, @to_table, ) end |