Enhance database insertion logic to handle duplicates and ensure unique type names

This commit is contained in:
vista-man committed 2025-03-20 13:41:28 +01:00
1 parent 50cad302cf
commit 65d8752829
3 files changed
+13762 -11

No files matched your search

+1 -1
View File
@@ -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