I have a unique constraint on one of my tables:
CREATE UNIQUE INDEX `role_contextid_targetid_ownerid_type_endedat_unique` on `role` (`contextId`, `targetId`, `ownerId`, `type`, `endedAt`)
You can see it is part of the db definition here:
But for some reason it is still allowing multiple entries which share all of their contextId, targetId, ownerId, type, endedAt
values. Notice the last three items below:
Am I misunderstanding what a multi-column unique index is supposed to do? In not, why did SQLite allow me to add items that break these rules?