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

Introduce AllCops: MigratedSchemaVersion config #1383

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Nov 8, 2024

  1. Introduce AllCops: MigratedSchemaVersion config

    This PR introduces `AllCops: MigratedSchemaVersion` config.
    
    By specifying `MigratedSchemaVersion` option, migration files that have been migrated can be ignored.
    When `MigratedSchemaVersion: '20241231000000'` is set. Migration files lower than or equal to '20250101000000' will be ignored.
    For example, this is the timestamp in db/migrate/20250101000000_create_articles.rb.
    
    ```yaml
    AllCops
      MigratedSchemaVersion: 20250101000000
    ```
    
    This prevents inspecting schema settings for already applied migration files and avoids having different database schemas
    depending on when `bin/rails db:migrate` is executed.
    koic committed Nov 8, 2024
    Configuration menu
    Copy the full SHA
    b2bbf6f View commit details
    Browse the repository at this point in the history