method

migrations_status

Importance_0
Ruby on Rails latest stable (v7.1.3.2) - 0 notes - Class: MigrationContext
migrations_status() public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/migration.rb, line 1329
    def migrations_status # :nodoc:
      db_list = schema_migration.normalized_versions

      file_list = migration_files.filter_map do |file|
        version, name, scope = parse_migration_filename(file)
        raise IllegalMigrationNameError.new(file) unless version
        version = schema_migration.normalize_migration_number(version)
        status = db_list.delete(version) ? "up" : "down"
        [status, version, (name + scope).humanize]
      end

      db_list.map! do |version|
        ["up", version, "********** NO FILE **********"]
      end

      (db_list + file_list).sort_by { |_, version, _| version.to_i }
    end
Register or log in to add new notes.