Build a Database of Video Game Characters - Build a Database of Video Game Characters

Tell us what’s happening:

I’m doing the “Learn Relational Databases by Building a Database of Video Game Characters” and i’m at this step ‘You should set a primary key on every table and there can only be one per table. Take a look at the details of your characters table to see the primary key at the bottom.’

It’s a very simple step, I’m running exactly what it says in the hints (‘\d characters’) and the output shows the table with the primary key. But it fails. I really don’t understand why, may be some bug?

Your code so far

mario_database=> ALTER TABLE characters ADD PRIMARY KEY(name);
ALTER TABLE
mario_database=> \d characters
Table “public.characters”
±---------------±----------------------±----------±---------±-------------------------------------------------+
| Column | Type | Collation | Nullable | Default |
±---------------±----------------------±----------±---------±-------------------------------------------------+
| character_id | integer | | not null | nextval(‘characters_character_id_seq’::regclass) |
| name | character varying(30) | | not null | |
| homeland | character varying(60) | | | |
| favorite_color | character varying(30) | | | |
±---------------±----------------------±----------±---------±-------------------------------------------------+
Indexes:
“characters_pkey” PRIMARY KEY, btree (name)

Your browser information:

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

Challenge Information:

Build a Database of Video Game Characters - Build a Database of Video Game Characters

try using the reset button, then close the terminal(s) and open a new one

then try to follow the hints if needed

Thanks! I was trying to do that but while closing the terminal codespace became not available. I’ll have to do that lesson from the start hoping i will not get into the same problem.

what do you mean by ‘not available’. If you describe or screenshot the issue we may be able to save you time repeating the course.