class CreateFoobars < ActiveRecord::Migration
def change
create_table :foobars do |t|
t.string :name, index: {unique: true}
end
end
end
class CreateFoos < ActiveRecord::Migration
def change
create_table :foos do |t|
t.string :bar, :null => false
t.index :bar, unique: true
end
end
end