未验证 提交 221491fd 编写于 作者: R Rafael França 提交者: Rafael Mendonça França

Merge pull request #36525 from eileencodes/revert-integer-change-to-schema-migration

Revert schema dumper to use strings rather than integers
上级 868c3c52
......@@ -1073,7 +1073,7 @@ def open
def get_all_versions
if schema_migration.table_exists?
schema_migration.all_versions
schema_migration.all_versions.map(&:to_i)
else
[]
end
......@@ -1249,7 +1249,7 @@ def migrated
end
def load_migrated
@migrated_versions = Set.new(@schema_migration.all_versions)
@migrated_versions = Set.new(@schema_migration.all_versions.map(&:to_i))
end
private
......
......@@ -49,7 +49,7 @@ def normalized_versions
end
def all_versions
order(:version).pluck(:version).map(&:to_i)
order(:version).pluck(:version)
end
end
......
......@@ -33,6 +33,7 @@ def test_dump_schema_information_outputs_lexically_ordered_versions
schema_info = ActiveRecord::Base.connection.dump_schema_information
assert_match(/20100201010101.*20100301010101/m, schema_info)
assert_includes schema_info, "20100101010101"
ensure
ActiveRecord::SchemaMigration.delete_all
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册