Class: Cybertrain::Migration::Direction
- Inherits:
-
Object
- Object
- Cybertrain::Migration::Direction
- Defined in:
- cybertrain/migration.rb
Overview
The dir a Base#reversible block receives.
Instance Method Summary collapse
-
#down ⇒ nil
The block’s Base#execute statements run when rolling back.
-
#up ⇒ nil
The block’s Base#execute statements run when migrating.
Instance Method Details
#down ⇒ nil
The block’s Base#execute statements run when rolling back.
777 778 779 780 781 782 |
# File 'cybertrain/migration.rb', line 777 def down start = @migration.operations.size yield @migration.mark_reversible(start, :reversible_down) nil end |
#up ⇒ nil
The block’s Base#execute statements run when migrating.
767 768 769 770 771 772 |
# File 'cybertrain/migration.rb', line 767 def up start = @migration.operations.size yield @migration.mark_reversible(start, :reversible_up) nil end |