mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Add the TABLE_SCHEMA condition to the SELECT statement in table_comment (#25945)
[Rafael Mendonça França + Takeshi AKIMA]
This commit is contained in:
parent
a64d9835f1
commit
ea1dcbbc99
2 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
* Fix the SELECT statement in `#table_comment` for MySQL.
|
||||
|
||||
*Takeshi Akima*
|
||||
|
||||
* Virtual attributes will no longer raise when read on models loaded from the
|
||||
database
|
||||
|
||||
|
|
|
@ -413,7 +413,8 @@ module ActiveRecord
|
|||
select_value(<<-SQL.strip_heredoc, 'SCHEMA')
|
||||
SELECT table_comment
|
||||
FROM information_schema.tables
|
||||
WHERE table_name=#{quote(table_name)}
|
||||
WHERE table_schema=#{quote(current_database)}
|
||||
AND table_name=#{quote(table_name)}
|
||||
SQL
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue