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.

Ruby ActiveRecord Basics Migrations and Relationships Single Table Inheritance

John Simoneau
PLUS
John Simoneau
Courses Plus Student 8,105 Points

Forgot to add a part of RemoveOldTables :(

I was a dope and forgot to add:

Employee.all.each do |e|
        Account.create(name: e.name, email: e.email)
    end

In the RemoveOldTables ActiveRecord Migration file so it only moved 1 of the accounts into the new Accounts. How do I fix this so I can proceed since I can't backtrack? Can I add the employee back in manually now via the rails console?

Or what is involved in downloading the project files from the last lesson and starting at that point again? Possible or complicated?

Or if I have to start over entirely... how should I proceed since I have the database somewhere etc?

Thanks

John Simoneau
John Simoneau
Courses Plus Student 8,105 Points

Could I just add the employees data in via MySQL Workbench like we learned how to use in the MySQL course in the track or will that mess up Rails and there is more too it?

John Simoneau
John Simoneau
Courses Plus Student 8,105 Points

Ok, I put this into the Rails console and I'm hoping it solved my problem. Looks like it did when I view it in MySQL Workbench and run his command to check the number of accounts in the Rails console.

Employee.create(name: "Hampton", email: "hcatlin@gmail.com")