mirror of
https://github.com/Alvin-Zilverstand/pokedex.git
synced 2026-11-23 06:43:00 +01:00
Add user Pokémon relationships table and improve error handling in competitors data fetching
This commit is contained in:
1 parent
8dc1175dc2
commit
ff5aea83d6
3 files changed
+22
-8
No files matched your search
@@ -97,3 +97,11 @@ CREATE TABLE IF NOT EXISTS pokemon_egg_groups (
|
||||
FOREIGN KEY (pokemon_id) REFERENCES pokemon(id),
|
||||
FOREIGN KEY (egg_group_id) REFERENCES egg_groups(id)
|
||||
);
|
||||
|
||||
-- Table to store user Pokémon relationships
|
||||
CREATE TABLE IF NOT EXISTS user_pokemon (
|
||||
user_id INT NOT NULL,
|
||||
pokemon_id INT NOT NULL,
|
||||
PRIMARY KEY (user_id, pokemon_id),
|
||||
FOREIGN KEY (pokemon_id) REFERENCES pokemon(id)
|
||||
);
|
||||
Reference in new issue
Block a user