class ActiveRecord::InvertibleMigrationTest::InvertibleByPartsMigration
Attributes
test[W]
Public Instance Methods
change()
click to toggle source
# File activerecord/test/cases/invertible_migration_test.rb, line 38 def change create_table("new_horses") do |t| t.column :breed, :string end reversible do |dir| @test.yield :both dir.up { @test.yield :up } dir.down { @test.yield :down } end revert do create_table("horses") do |t| t.column :content, :text t.column :remind_at, :datetime end end end