1
0
Fork 0
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:
Wojciech Wnętrzak 2020-03-31 10:21:21 +02:00
parent 1239b22e22
commit 46b89340a7
No known key found for this signature in database
GPG key ID: 0EABD3BE530ECAC6

View file

@ -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|