Celestial Bodies Database - Foreign Key Check

Tell us what’s happening:

I’m passing all the tests except these two;
Says to have an FK that references the thing above it (star->galaxy, planet->star, moon->planet) and each one does (I only included the star->galaxy one but it’s the same in the other three).

I only count 4 tables that need to be created, galaxy , star , planet , and moon. Am I missing something?

Here’s a link to the pg dump: learn-celestial-bodies-database/universe.sql at main · SeGePop/learn-celestial-bodies-database (github.com)

Thank you!

Your code so far

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0

Challenge Information:

Celestial Bodies Database - Build a Celestial Bodies Database

Had a revelation last night:

For example my stars weren’t referencing any galaxy (galaxy_id is empty) so I used

UPDATE star SET galaxy_id=1;

Because they’re all in the Milky Way, which has the galaxy_id=1.
Updated the stars, planets, and moons, and now they all work.

This one feels obvious in hindsight; they want you to create a fifth one after already giving you 4 (moon, planet, star, galaxy), so just make up one like black_holes or super_clusters. Make sure to populate them, too, so they have 3 columns, a primary key, and foreign key (optional).