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

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")