📜  如何更改 rails 中列的名称 - Ruby 代码示例

📅  最后修改于: 2022-03-11 15:04:50.205000             🧑  作者: Mango

代码示例1
$ rails g migration rename_season_to_season_id

class RenameSeasonToSeasonId < ActiveRecord::Migration
  def change
    rename_column :shoes, :season, :season_id
  end
end