Table Definition
create_table :table_name do |t|
# t.class
# => ActiveRecord::ConnectionAdapters::TableDefinition
endcolumnremove_column
columns
index
primary_key
timestamps
belongs_to & references最后更新于
create_table :table_name do |t|
# t.class
# => ActiveRecord::ConnectionAdapters::TableDefinition
endcolumnremove_column
columns
index
primary_key
timestamps
belongs_to & references最后更新于
:indexes
:indexes=
:name
:temporary
:options
:as
:columns
:primary_key
:[]
:column
:remove_column
:string
:text
:integer
:float
:decimal
:datetime
:timestamp
:time
:date
:binary
:boolean
:index
:timestamps
:references
:belongs_to
:new_column_definition