1
我有以下迁移。有没有办法在一次更改中运行这些更改?通过一次迁移更改多个列
def change
change_column :comments, :attr_1, :string, null: true
change_column :comments, :attr_2, :string, null: true
change_column :comments, :attr_3, :string, null: true
end
只是好奇,为什么你关心运行三个迁移?这种事情对于Rails应用程序来说是完全正常的。 –