Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Binu Alexander
4,081 PointsHow to add 2 fields into migration from command line ?
How to add 2 columns in a single migration ?
rails generate migration AddDetailsToContacts first_name:string, last_name:string
2 Answers

Maciej Czuchnowski
36,440 PointsRemoving the comma should do the trick.

Binu Alexander
4,081 Pointsrails generate migration contacts first_name:string last_name:string
this is working
Binu Alexander
4,081 PointsBinu Alexander
4,081 PointsThis is my code :rails generate migration AddDetailsToContacts first_name :string last_name :string
This is the error : The first argument should be the name of the table.
I removed the comma , still the error
jordans
1,609 Pointsjordans
1,609 PointsTry putting in:
rails generate migration contacts first_name:string last_name:string
Maciej Czuchnowski
36,440 PointsMaciej Czuchnowski
36,440 PointsWeird, it should assume contacts table by default from the name of the migration. Try:
rails generate migration add_details_to_contacts first_name:string last_name:string