mirror of
https://github.com/Alvin-Zilverstand/pokedex.git
synced 2026-03-06 02:57:25 +01:00
Enhance database insertion logic to handle duplicates and ensure unique type names
This commit is contained in:
@@ -15,7 +15,7 @@ CREATE TABLE IF NOT EXISTS pokemon (
|
||||
-- Table to store Pokémon types
|
||||
CREATE TABLE IF NOT EXISTS types (
|
||||
id INT PRIMARY KEY AUTO_INCREMENT,
|
||||
name VARCHAR(50) NOT NULL
|
||||
name VARCHAR(50) NOT NULL UNIQUE
|
||||
);
|
||||
|
||||
-- Table to store Pokémon abilities
|
||||
|
||||
Reference in New Issue
Block a user