What are the functions performed by Rails migration? - Ruby on Rails

What are the functions performed by Rails migration?



-Rails migration allows the creation of the table and provides the functionality that can be performed on a table with the following commands:
create_table(name, options)
drop_table(name)
rename_table(old_name, new_name)
add_column(table_name, column_name, type, options)
rename_column(table_name, column_name, type, options)

-Rails Migration also allows the use of pre-defined data type in the application as it supports all the data types. The data types consist of string, integer, float, etc.

-Rails Migration allows the users to use the valid column options like limit (:limit=> “50”), default (:default => “hello”), and null (:null => false implies NOT NULL)
Post your comment