Check out example codes for "change column rails example". It will help you in understanding the concepts better.

Code Example 1

def change
    change_column(:table_name, :column_name, :new_type)
end

Learn ReactJs, React Native from akashmittal.com