diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2018-09-16 05:02:40 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2018-09-16 08:57:09 +0900 |
commit | d681adbbb5e945994580a4e3b5103081888491b9 (patch) | |
tree | b41f9a14c5d3a40c31fb5fa45185389af60d397a /Rakefile | |
parent | 68d6c1353acd9235d3f73db04684ea82d26c9a98 (diff) | |
download | rails-d681adbbb5e945994580a4e3b5103081888491b9.tar.gz rails-d681adbbb5e945994580a4e3b5103081888491b9.tar.bz2 rails-d681adbbb5e945994580a4e3b5103081888491b9.zip |
Use table name qualified column name for update counters
MySQL supports JOINs to UPDATE, so if column name isn't qualified by
table name, it would cause an ambiguous error:
```
Mysql2::Error: Column 'integer' in field list is ambiguous: UPDATE `pets` INNER JOIN `toys` ON `toys`.`pet_id` = `pets`.`pet_id` SET `integer` = COALESCE(`integer`, 0) + 1 WHERE `toys`.`name` = ?
```
Diffstat (limited to 'Rakefile')
0 files changed, 0 insertions, 0 deletions