Rails 7.0 schema.rb changes

10+ years most with Ruby on Rails and JavaScript frontend and some Go. My first language is C for 3 years in university.
Search for a command to run...

10+ years most with Ruby on Rails and JavaScript frontend and some Go. My first language is C for 3 years in university.
No comments yet. Be the first to comment.
I recently updated from Slim template to ERB to use Herb (Thanks Marco). I had to update a test that was very strict on the format. I realized that Capybara::Node::Simple doesn’t provide a selector for regex. The page object doesn’t have a match? met...

It is as simple as: rustup completions zsh > ~/.zfunc/_rustup rustup completions zsh cargo > ~/.zfunc/_cargo With a TAB you get the auto-complete or the options available: ❯ cargo b b -- alias: build bench -- Execute all benchmarks of a local ...
Let’s not re-write a good article, go to: https://joyofrails.com/articles/mastering-custom-configuration-in-rails I mostly used config.x configuration that loads a yaml file with config_for that do the multi-environment by default: module YourApp c...
No need to re-write the wheel, let me redirect to this great article from Lily Reile. Obviously still up-to-date and really useful as the official Rails doc is mostly showing the value before and after. https://lilyreile.medium.com/rails-6-1-new-fram...
I came around to update Appsignal gem to the new major version of Appsignal released at the end of August 2024: https://rubygems.org/gems/appsignal/versions/4.0.0 The upgrade was smooth. The real change for my application was to remove the parameter ...
During a recent (and first) upgrade of Rails to 7.0, I found a lot of changes in the schema.rb file.
There is the self explanatory one: add versioning to the schema file.

And the noisy change of every single datatime field's precision attribute.

Looking at this, I find out that the precision default to 6. It explains why some attributes got precision: nil and some other got their precision: 6 removed.

This was a change made in 2019 and released from Rails 7.0 in December 2021. So, 2.5 years after but I'm happy to discover that and sharing it.
For people following here, Rails 7.1 is already planned and is already passing the entire test suite. Hopefully, it won't take long.
Cheers!