mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Add an example how to change column in "change_table" block.
[ci skip]
This commit is contained in:
parent
1239b22e22
commit
46b89340a7
1 changed files with 6 additions and 0 deletions
|
@ -421,6 +421,12 @@ module ActiveRecord
|
|||
# t.column :name, :string, limit: 60
|
||||
# end
|
||||
#
|
||||
# ====== Change type of a column
|
||||
#
|
||||
# change_table(:suppliers) do |t|
|
||||
# t.change :metadata, :json
|
||||
# end
|
||||
#
|
||||
# ====== Add 2 integer columns
|
||||
#
|
||||
# change_table(:suppliers) do |t|
|
||||
|
|
Loading…
Reference in a new issue