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

[SOLVED IT IS A BUG] PRIMARY KEY not working think it's a bug.

The task keeps bringing up: 'Make sure you're id only allows unique values. Hint: ID PRIMARY KEY'

But from the code below I believe I have done this and i'm not sure if it's a bug or not.

Thanks

CREATE TABLE members ( id PRIMARY KEY, first_name, last_name, favorite_rock_id REFERENCES rocks(id) );

1 Answer

Ok there is nothing wrong with my program. I had to restart the challenge and do it again and it worked. Think there is an error with this challenge.

Challenge: https://teamtreehouse.com/library/creating-and-modifying-database-tables/creating-and-modifying-database-tables/making-changes-to-a-database