class Table
Ruby on Rails 6.0.6
Represents an SQL table in an abstract way for updating a table. Also see TableDefinition and connection.create_table
Available transformations are:
change_table :table do |t|
t.primary_key
t.column
t.index
t.rename_index
t.timestamps
t.change
t.change_default
t.rename
t.references
t.belongs_to
t.string
t.text
t.integer
t.bigint
t.float
t.decimal
t.numeric
t.datetime
t.timestamp
t.time
t.date
t.binary
t.boolean
t.foreign_key
t.json
t.virtual
t.remove
t.remove_foreign_key
t.remove_references
t.remove_belongs_to
t.remove_index
t.remove_timestamps
end
Inherits from
Includes
Attributes
Methods (defined here)
- # belongs_to
- # change
- # change_default
- # column
- # column_exists?
- # foreign_key
- # foreign_key_exists?
- # index
- # index_exists?
- # references
- # remove
- # remove_belongs_to
- # remove_foreign_key
- # remove_index
- # remove_references
- # remove_timestamps
- # rename
- # rename_index
- # timestamps
- self. new
Used by
Subclasses (2)
Methods (inherited)
From ActiveRecord::ConnectionAdapters::ColumnMethods
(2)
- # column
- # primary_key
From Object
(17)
- # acts_like?
- # blank?
- # deep_dup
- # duplicable?
- # html_safe?
- # in?
- # instance_values
- # instance_variable_names
- # presence
- # presence_in
- # present?
- # to_param
- # to_query
- # try
- # try!
- # unescape
- # with_options