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 Migrations

'customers' table not showing up after running 'show tables'

I'm following the video command by command, etc. and yet when I run 'show tables' all I see is 'schema_migrations'. The 'customers' table isn't coming up. Did I save the migration file in Sublime? Yes.

Did I run 'rake db:migrate'? No. Why? Because the video didn't show that step.

Just want to reach out to the community and make sure I'm not missing something. Is there another way to migrate without the 'rake db:migrate' command?

Here's a copy of the code in both Sublime as well as Terminal:

```class CreateCustomers < ActiveRecord::Migration def change create_table :customers do |t| t.string :name, :about t.integer :balance t.timestamps null: false end end end


mysql> use biller_development; Database changed mysql> show tables; +------------------------------+ | Tables_in_biller_development | +------------------------------+ | schema_migrations | +------------------------------+ 1 row in set (0.00 sec)

mysql>

1 Answer

Tim Knight
Tim Knight
28,888 Points

Beau,

The instructor actually does run rake db:migrate at 10:13 into the video. Yes you'll need to run that to generate the table.

Thanks Tim. I'm not sure how I missed that in the video. I appreciate the response.