Commit Graph

2 Commits

Author SHA1 Message Date
Stan Hu dfdf22c7d8 Fix PostgreSQL implementation of migration 2017-12-27 04:12:18 -08:00
Stan Hu 5cacdc4ec1 Fix migration for removing orphaned issues.moved_to_id values in MySQL
According to https://dev.mysql.com/doc/refman/5.7/en/update.html,
"You cannot update a table and select from the same table in a subquery."
Attempting to do so results in the error:

```
Mysql2::Error: Table 'issues' is specified twice, both as a target for 'UPDATE' and as a separate source for data
```

Instead, we can use a LEFT JOIN on the same table to make MySQL do the right
thing.

Closes #41498
2017-12-26 22:29:15 -08:00