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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove: the webdack gem #5727

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Remove: the webdack gem #5727

wants to merge 3 commits into from

Conversation

colinbruce
Copy link
Contributor

@colinbruce colinbruce commented Sep 11, 2023

What

Try removing the webdack gem as it was used 5 years ago to change a table and has only been referenced in migration files, not actively used, since.

  • To simulate a normal branch, I had to add an empty commit and allow github to build a standard image and deploy it, before we remove the gem and migrations

Discussion

How do people feel about older migrations being deleted?
The opinion online is that devs should use rails db:schema:load or rails db:prepare instead of rails db:migrate and running everything since day one.

I found one medium article saying they deleted migrations older than 3 months!? 馃
https://medium.com/clutter-engineering/cleaning-up-old-rails-migrations-1b55b638abb5

Checklist

Before you ask people to review this PR:

  • Tests and rubocop should be passing: bundle exec rake
  • Github should not be reporting conflicts; you should have recently run git rebase main.
  • There should be no unnecessary whitespace changes. These make diffs harder to read and conflicts more likely.
  • The PR description should say what you changed and why, with a link to the JIRA story.
  • You should have looked at the diff against main and ensured that nothing unexpected is included in your changes.
  • You should have checked that the commit messages say why the change was made.

To simulate a normal branch, allow github to build a
standard image and deploy it, before we remove the
gem and migrations
Replace final webdack migration with an error

This is based on an older [medium post](https://medium.com/clutter-engineering/cleaning-up-old-rails-migrations-1b55b638abb5)
describing how to clean up your codebase by removing old migrations
and using `db:schema:load`.  I updated the error message with more
explanation and replaced with newer rails db commands

When the db:prepare finds a database with an existing migrations
table, it tries to run them all again.  This unless should ensure
that new migrations are run in uat, staging and prod, while alerting
devs trying to run locally
@sonarcloud
Copy link

sonarcloud bot commented Sep 11, 2023

Kudos, SonarCloud Quality Gate passed!聽 聽 Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant