Module: ActiveRecord::Schema::Definition
- Extended by:
- ActiveSupport::Concern
- Included in:
- ActiveRecord::Schema
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/active_record/schema.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
-
#define(info, &block) ⇒ Object
:nodoc:.
Methods included from ActiveSupport::Concern
append_features, class_methods, extended, included, prepend_features, prepended
Instance Method Details
#define(info, &block) ⇒ Object
:nodoc:
54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/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 |