You have an UNIQUE index on (content, ref_id), called editor_contentmodel_content_2192f49c_uniq "editor_contentmodel_content_2192f49c_uniq" UNIQUE CONSTRAINT, btree (content, ref_id) I'm not sure why this there to begin with. So let's step back and address what this does. This makes sure that ...