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

Databases

Bummer! You're missing the 'fk_genre_id' column. Around 9:45 in the video is a good place to get help.

I've watched this video over and over and paused it and copied the code down as a cheat note! I can't seem to get this to work and don't have a clue what I'm doing wrong.

On the quiz this is all on one line, but I thought it would be easier to read this way:

ALTER TABLE t_movies 
ADD COLUMN fk_genre_id INTEGER NULL 
ADD CONSTRAINT FOREIGN KEY (fk_genre_id) 
REFERENCES t_genres(pk_id)

2 Answers

Cindy Lea
PLUS
Cindy Lea
Courses Plus Student 6,497 Points

Can you link your quiz so we can try it out? The code looks good to me. I want to see if I get an error too.

I'm not sure how to add the quiz information. I tried posting again from the "development tools" where the database fundamentals course is. I included the other answers to you can get to the problem task quicker.

Finally solved it! I was missing a comma between the ADD COLUMN stuff and ADD CONSTRAINT...