Foreign Keys Problem - Celestial Bodies Database

I’m working on the final step in the project list (foreign keys must have the same names as what is referenced). I’m stuck and clueless as to how to get this to pass. I would greatly appreciate some guidance on how to fix whatever it is I’ve screwed up. My code on Github can be found here:

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36

Challenge: Celestial Bodies Database - Build a Celestial Bodies Database

Link to the challenge:

Please provide schemas of all the tables you have…do \d table for every table in the database and upload the results showing in the psql command line



Do your tables have any values? If not you cannot see a check mark in the foreign key steps.

What hbar1st said,but i think your planet table has 2 foreign keys…the planet_id foreign key isn’t needed…I cannot check this right now…check how many foreign keys you have on your tables and how many you need

ALTER TABLE star DROP CONSTRAINT star_star_id_fkey;
ALTER TABLE planet DROP CONSTRAINT planet_planet_id_fkey;

Do these two commands to drop the additional constraints you have and you should be good.

This worked!!! Thank you!!!