File: //opt/kw-schueler.bak.21032025/remove_unique_constraint.sql
-- SQL-Skript zum Entfernen des UNIQUE KEY-Constraints auf assignment_types.name
USE klausurenweb_db;
-- Überprüfen, ob der UNIQUE KEY existiert und ihn entfernen
SELECT CONSTRAINT_NAME
FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS
WHERE TABLE_NAME = 'assignment_types'
AND CONSTRAINT_TYPE = 'UNIQUE'
AND TABLE_SCHEMA = 'klausurenweb_db';
-- Entfernen des UNIQUE KEY-Constraints (der Name könnte name oder assignment_types_name_key sein)
ALTER TABLE assignment_types DROP INDEX name;
-- Alternativ, falls der Index einen anderen Namen hat
-- ALTER TABLE assignment_types DROP INDEX assignment_types_name_key;
-- Bestätigung
SELECT 'UNIQUE KEY auf assignment_types.name wurde entfernt' AS Ergebnis;