Work around Rails schema noise with one weird trick?
12-Apr-2024 514
In this project, db/schema.rb has almost 4000 lines, and over 800 get automatically changed any time I run a migration. It’s a little annoying.Not every change is exactly like the above example with precision. There are a few other small issues, but they all have the same root cause and fix.It’s me, hi, I’m the root cause, it’s me.The problem is that I’m lazy.I know that the changes are because I’ve let my local database fall out of sync with what my local versions of Rails and Postgres work together to generate. In the case of these “precision” changes, it’s because the project has been upgraded to Rails 7 sometime after I created my database.
Work around Rails schema noise with one weird trick? #ruby #rubydeveloper #rubyonrails #around #Rails #schema #noise #weird #trick? https://rubyonrails.ba/link/work-around-rails-schema-noise-with-one-weird-trick