Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby ActiveRecord Basics Migrations and Relationships Single Table Inheritance

why does 't.timestamps' not include 'null :false' in video? (2:30)

This is more out of curiosity seeing as, up until now, nothing has broken. However, out of all the different migrations, the ':accounts' table is the only one so far that doesn't have 'null: false' following 't.timestamps'. It's present in my local file for the 'accounts' migration but not in the video version. See 2:30 in the video for a reference.

1 Answer

Chris McKnight
Chris McKnight
11,045 Points

Adding null: false isn't necessary anymore because it is the default. See https://github.com/rails/rails/pull/3334/files