Module: ActiveRecord::Schema::Definition
- Extended by:
- ActiveSupport::Concern
- Included in:
- ActiveRecord::Schema
- Defined in:
- lib/active_record/schema.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
-
#define(info, &block) ⇒ Object
:nodoc:.
Instance Method Details
#define(info, &block) ⇒ Object
:nodoc:
54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/active_record/schema.rb', line 54 def define(info, &block) # :nodoc: instance_eval(&block) if info[:version].present? connection.schema_migration.create_table connection.assume_migrated_upto_version(info[:version]) end ActiveRecord::InternalMetadata.create_table ActiveRecord::InternalMetadata[:environment] = connection.migration_context.current_environment end |