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

Delete migrations from before 2023 #2217

Merged
merged 1 commit into from
Jun 21, 2023
Merged

Delete migrations from before 2023 #2217

merged 1 commit into from
Jun 21, 2023

Conversation

chrislo
Copy link
Contributor

@chrislo chrislo commented Jun 20, 2023

I don't think there's much utility in keeping very old migrations hanging around in the codebase. They make it slightly harder to grep and apply style/linting changes and are very unlikely to be re-run.

I don't think there's much utility in keeping very old migrations
hanging around in the codebase. They make it slightly harder to grep
and apply style/linting changes and are very unlikely to be re-run.
@chrislo chrislo requested a review from chrisroos June 20, 2023 14:12
Copy link
Contributor

@chrisroos chrisroos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable to me 👍

@chrislo chrislo merged commit 6679d51 into main Jun 21, 2023
@chrislo chrislo deleted the delete-old-migrations branch June 21, 2023 13:23
ChrisBAshton added a commit to alphagov/content-publisher that referenced this pull request Sep 16, 2024
There is precedent in removing old migrations, e.g. in
alphagov/whitehall#7675 and
alphagov/signon#2217

Keeping migrations around makes it harder to grep, and to apply
changes en-masse (such as linting updates). #3198 is currently
failing because of a single lint failure in one of these migration
files:

```
Offenses:

db/migrate/20200206153428_remove_null_constraints_from_whitehall_migrations.rb:3:5: C: Rails/BulkChangeTable: You can use change_table :whitehall_migrations, bulk: true to combine alter queries. (https://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html#method-i-change_table, https://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/Table.html)
    change_column_null :whitehall_migrations, :document_type, true
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

603 files inspected, 1 offense detected
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants