<!-- Morning -->
SQL
- There can be problems if you use the same index for a unique constraint and
foreign key on a column.
- To remove the index you need to:
- Remove the foreign key:
ALTER TABLE \
contact_person` DROP FOREIGN KEY
`contact_person_ibfk_1`;` - Remove the unique index:
ALTER TABLE \
contact_person` DROP INDEX
`contact_id`;` - Re-add the foreign key:
ALTER TABLE \
contact_person` ADD CONSTRAINT
`contact_person_ibfk_1` FOREIGN KEY `contact_id`(`contact_id`)
REFERENCES `contact`(`contact_id`)`
<!-- What do I want to do today? -->
<!-- Evening -->
<!-- What did I learn today? -->
<!-- Things I learned -->
<!-- Useful tools and libraries -->