mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix a bug with initialize schema_migrations table
This line causes an error when executing the command: `rails db:drop db:create db:schema:load` ActiveRecord::StatementInvalid: PG::SyntaxError: ERROR: syntax error at or near "{" LINE 1: ...NSERT INTO "schema_migrations" (version) VALUES (#{v}), (#{v...
This commit is contained in:
parent
1ac3fb9f06
commit
e0026e2327
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue