Repo Added
|
Files
143
|
Badge
Embed ▾
README BADGES
|
travis-ci
Set null attribute of timestamps in migrations to match schema Rails has flipped the default back and forth between `null: true` and `null: false` (full history below). As a result, our database schema has a mixture of them. Explicitly set `null: true` or `null: false` in the migrations to reliably match the current schema. Rails History: - In Rails 3.2 the default was changed to `null: false`. Release notes: https://guides.rubyonrails.org/3_2_release_notes.html#active-record Pull request: #3334 Commit: 3dbedd282 - In Rails 4.0 this was reverted, with the the explanation that when timestamp columns are added to an existing table, the existing records don't have timestamps and the "not null" constraint fails Commit: fcef72890 Commit: ccf7cd05a (pull request #7095) - In Rails 4.2, `timestamps` without an explicit `null` option was deprecated in preparation for making `null: false` the default Release notes: https://guides.rubyonrails.org/4_2_release_notes.html#active-record-deprecations Pull request: #16481 - In Rails 5, the default was changed back to `null: false` Release notes: https://guides.rubyonrails.org/5_0_release_notes.html#active-record-notable-changes Commit: a939506f2
2309 of 6982 relevant lines covered (33.07%)
4.69 hits per line
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|