Module: ActiveRecord::Schema::Definition
Relationships & Source Files | |
Namespace Children | |
Modules:
| |
Extension / Inclusion / Inheritance Descendants | |
Included In:
| |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
::ActiveSupport::Concern
|
|
Defined in: | activerecord/lib/active_record/schema.rb |
Class Method Summary
::ActiveSupport::Concern
- Extended
class_methods | Define class methods from given block. |
included | Evaluate given block in context of base class, so that you can write class macros here. |
prepended | Evaluate given block in context of base class, so that you can write class macros here. |
append_features, prepend_features |
Instance Method Summary
- #define(info, &block) Internal use only
Instance Method Details
#define(info, &block)
This method is for internal use only.
[ GitHub ]
# File 'activerecord/lib/active_record/schema.rb', line 54
def define(info, &block) # :nodoc: connection_pool.with_connection do |connection| instance_eval(&block) connection_pool.schema_migration.create_table if info[:version].present? connection.assume_migrated_upto_version(info[:version]) end connection_pool. .create_table_and_set_flags(connection_pool.migration_context.current_environment) end end