darktable-org/darktable — pull request #173 by TurboGit (2013-02-03 17:57:24+00:00)
Title: Create a unique index constraint for imgid/color for color_labels table.

This is a constraint that must be obeyed, nice to let SQLite a
chance to check.

Found while working on lr 2 dt import for rating. Now we can use:

INSERT OR IGNORE INTO color_labels VALUES (5643,3)

And it will not add a duplicate entry into color_labels.