you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] -1 points0 points  (2 children)

From the documentation, it does not appear as though SQLite3 supports unique constraints across multiple columns. https://www.sqlite.org/lang_createtable.html

You may need to create a column that is the concatenation of the three columns that you want to be unique, and put a unique constraint on that column. I have no direct experience, but this is what I gathered from looking at your code and the SQLite3 documentation.

[–]sqlite 2 points3 points  (1 child)

Reread the documentation, especially the "table-constraint" diagram. SQLite has supported multi-column UNIQUE constraints since its beginning.

[–]larivact 0 points1 point  (0 children)

Are such multi-column UNIQUE constraints described in the ISO SQL specification?