Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disable BulkChangeTable cop #55

Merged

Commits on Jul 29, 2024

  1. disable BulkChangeTable cop

    While this cop can offer faster migrations for very large databases, it
    also leads to more complex, more error-prone, and less understandable
    migrations for smaller (most) projects. For example, `change_table` with
    `bulk: true` does not properly reverse migrations that add columns and
    indices on those columns. The columns are dropped first and it then
    attempts to drop the indices, which were automatically dropped when the
    columns were dropped, resulting in an error. Furthermore, this situation
    is harder to debug with `bulk: true` as the standard rails migration
    logging just logs `change_table(:bulk=>true)`, not the individual columns
    and indices being added/dropped. Finally, it only alerts on a subset of
    alter table statements, allowing some to be outside a `change_table` but
    forcing others to be inside the `change_table` block.
    Cohen-Carlisle committed Jul 29, 2024
    Configuration menu
    Copy the full SHA
    68ccc3b View commit details
    Browse the repository at this point in the history