class Table
Ruby on Rails 6.1.7.10
Since v2.2.3Represents 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.change_null t.rename t.references t.belongs_to t.check_constraint 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_check_constraint t.remove_timestamps end
Inherits from
Includes
Attributes
Methods (defined here)
- # belongs_to
- # change
- # change_default
- # change_null
- # check_constraint
- # column
- # column_exists?
- # foreign_key
- # foreign_key_exists?
- # index
- # index_exists?
- # references
- # remove
- # remove_belongs_to
- # remove_check_constraint
- # remove_foreign_key
- # remove_index
- # remove_references
- # remove_timestamps
- # rename
- # rename_index
- # timestamps
- self. new
Used by
Subclasses (2)
Methods (inherited)
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
From ActiveRecord::TestFixtures (4)
From ActiveSupport::Concern (3)
- # class_methods
- # included
- # prepended