1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #23307 from mgrachev/fix-schema-migrations

Fix a bug with initialize schema_migrations table
This commit is contained in:
Eileen M. Uchitelle 2016-01-28 09:27:03 -05:00
commit 2637fb75d8

View file

@ -992,7 +992,7 @@ module ActiveRecord
if (duplicate = inserting.detect {|v| inserting.count(v) > 1}) if (duplicate = inserting.detect {|v| inserting.count(v) > 1})
raise "Duplicate migration #{duplicate}. Please renumber your migrations to resolve the conflict." raise "Duplicate migration #{duplicate}. Please renumber your migrations to resolve the conflict."
end end
execute "INSERT INTO #{sm_table} (version) VALUES #{inserting.map {|v| '(#{v})'}.join(', ') }" execute "INSERT INTO #{sm_table} (version) VALUES #{inserting.map {|v| "('#{v}')"}.join(', ') }"
end end
end end