class
ActiveRecord::ConnectionAdapters::ColumnMethods::TableDefinition
v7.1.3.2 -
Show latest stable
- Superclass: Object
Active Record Connection Adapters Table Definition
Represents the schema of an SQL table in an abstract way. This class provides methods for manipulating the schema representation.
Inside migration files, the t object in {create_table}[rdoc-ref:SchemaStatements#create_table] is actually of this type:
class SomeMigration < ActiveRecord::Migration[7.1] def up create_table :foo do |t| puts t.class # => "ActiveRecord::ConnectionAdapters::TableDefinition" end end def down ... end end
Included modules
- ActiveRecord::ConnectionAdapters::ColumnMethods
Attributes
| [R] | as |
| [R] | check_constraints |
| [R] | comment |
| [R] | foreign_keys |
| [R] | if_not_exists |
| [R] | indexes |
| [R] | name |
| [R] | options |
| [R] | temporary |
Files
- activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb