Check out example codes for "how to I change the name of a column in rails". It will help you in understanding the concepts better.
Code Example 1
$ rails g migration rename_season_to_season_id
class RenameSeasonToSeasonId < ActiveRecord::Migration
def change
rename_column :shoes, :season, :season_id
end
end
Learn ReactJs, React Native from akashmittal.com