Refactor index creation to use index definition visitor#39203
Refactor index creation to use index definition visitor#39203kamipo merged 2 commits intorails:masterfrom
Conversation
|
Nice refactoring! 👍 |
549ca34 to
6ea1b48
Compare
jeremy
left a comment
There was a problem hiding this comment.
Nice move. The comment bugfix feels hidden within this refactoring. I think it's worth making that fix a separate commit and mentioning it in the changelog.
There was a problem hiding this comment.
Is this a behavior change? Looks like support_index_using? was not checked previously.
There was a problem hiding this comment.
Nope, This is to keep the behavior as before.
Before, the code generation is not shared, now it is shared by SQLite3 and PostgreSQL, but SQLite3 doesn't support USING syntax, so it will raise syntax error unless the supports_index_using? guard.
There was a problem hiding this comment.
SQLite3:
PostgreSQL:
6ea1b48 to
4a32780
Compare
👍 I've separated a commit that fixes a bug and added a CHANGELOG entry. 5e1576d796cae96caaaa27e77d6a27e714d14314 |
I've found the bug when I'm refactoring index creation code in rails#39203.
Current SQL generation code is hard to maintenance, I've found a bug that create index comment in bulk change table when I'm refactoring that.
4a32780 to
2c1b012
Compare
I've found the bug when I'm refactoring index creation code in #39203.
Breaking changes introduced by rails/rails#39203
Breaking changes introduced by rails/rails#39203
Current SQL generation code is hard to maintenance, I've found a bug
that create index comment in bulk change table when I'm refactoring
that.