Skip to content

Commit

Permalink
Fixes a typo and some cosmetic changes for migration documentation ad…
Browse files Browse the repository at this point in the history
…ded in #40806  [ci skip]
  • Loading branch information
abhaynikam committed Feb 12, 2021
1 parent bddb2c9 commit f2d05a2
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions activerecord/lib/active_record/migration.rb
Expand Up @@ -1051,9 +1051,9 @@ def load_migration
# MigrationContext sets the context in which a migration is run.
#
# A migration context requires the path to the migrations is set
# in the `migrations_paths` parameter. Optionally a `schema_migration`
# class can be provided. For most applications, `SchemaMigration` is
# sufficient. Multiple database applications need a `SchemaMigration`
# in the +migrations_paths+ parameter. Optionally a +schema_migration+
# class can be provided. For most applications, +SchemaMigration+ is
# sufficient. Multiple database applications need a +SchemaMigration+
# per primary database.
class MigrationContext
attr_reader :migrations_paths, :schema_migration
Expand All @@ -1063,19 +1063,19 @@ def initialize(migrations_paths, schema_migration = SchemaMigration)
@schema_migration = schema_migration
end

# Runs the migrations in the `migrations_path`.
# Runs the migrations in the +migrations_path+.
#
# If `target_version` is `nil`, `migrate will run `up`.
# If +target_version+ is +nil+, +migrate+ will run +up+.
#
# If the `current_version` and `target_version` are both
# If the +current_version+ and +target_version+ are both
# 0 then an empty array will be returned and no migrations
# will be run.
#
# If the `current_version` in the schema is less than
# the `target_version`, then `down` will be run.
# If the +current_version+ in the schema is less than
# the +target_version+, then +down+ will be run.
#
# If none of the conditions are met, `up` will be run with
# the `target_version`.
# If none of the conditions are met, +up+ will be run with
# the +target_version+.
def migrate(target_version = nil, &block)
case
when target_version.nil?
Expand Down

0 comments on commit f2d05a2

Please sign in to comment.