Build a Celestial Bodies Database - Build a Celestial Bodies Database

Tell us what’s happening:

Fails ‘all tables should have a primary key’ but using \d on each table shows they all do have a primary key. How do I proceed?

_name JOIN information_schema.key_column_usage kcu ON tc.constraint_name = kcu.constraint_name WHERE t.table_schema = 'public' AND tc.constraint_type = 'PRIMARY KEY';
+---------------+-------------+
|  table_name   | primary_key |
+---------------+-------------+
| constellation | id          |
| constellation | star_id     |
| galaxy        | galaxy_id   |
| moon          | moon_id     |
| planet        | planet_id   |
| star          | star_id     |
+---------------+——————+```

### Your code so far


### Your browser information:

User Agent is: <code>Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.1 Safari/605.1.15 Ddg/26.1</code>

### Challenge Information:
Build a Celestial Bodies Database - Build a Celestial Bodies Database
https://www.freecodecamp.org/learn/relational-databases-v9/lab-celestial-bodies-database/lab-celestial-bodies-database

read again the user story on the primary key names, iirc it’s specific

I fixed the id column on constellation and am still getting the same error: All tables should have a primary key.

can you share your dump file?

My GitHub repo with universe.sql

here I see id not constellation_id for column name

and I think that your primary key for constellation should also be constellation_id, not two columns

I forgot to push the updated universe.sql to GitHub, have now done so. And I need constellation’s primary key to be composite, as each constellation can (must) have more than one star associated with it.

Here’s the GitHub link again:

https://github.com/dhorowitz001/learn-celestial-bodies-database.git

I am not sure you can pass the tests with that setup

it expects the same number of primary key columns and tables

OK, thanks, I’ll redesign it.