# Rails 7.0 schema.rb changes

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.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725344489375/e7bfc949-9c57-4756-8f92-c89c7a637619.png align="center")

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

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725344657574/0d52722f-8f41-4fc5-afe9-c0f3d7479b96.png align="center")

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.

[https://github.com/rails/rails/blob/aed8feae3b7a3f7df59de69355cc3bda1d5479d6/activerecord/lib/active\_record/connection\_adapters/abstract/schema\_statements.rb#L1322](https://github.com/rails/rails/blob/aed8feae3b7a3f7df59de69355cc3bda1d5479d6/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb#L1322)

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1725345398419/29fa49a5-ed60-4cbf-bce9-458fc00d8acc.png align="center")

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.

[https://github.com/rails/rails/commit/57015cdfa2083351f64a82f7566965172a41efcb#diff-868f1dccfcbed26a288bf9f3fd8a39c863a4413ab0075e12b6805d9798f556d1R714-R716](https://github.com/rails/rails/commit/57015cdfa2083351f64a82f7566965172a41efcb#diff-868f1dccfcbed26a288bf9f3fd8a39c863a4413ab0075e12b6805d9798f556d1R714-R716)

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!
