From: Oleg Broytman Date: Sun, 20 Dec 2015 20:23:46 +0000 (+0300) Subject: Make names unique X-Git-Tag: 0.0.2~2 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=387467eafb0d9fa9977700502a39188aa168921c;p=m_librarian.git Make names unique --- diff --git a/m_librarian/db.py b/m_librarian/db.py index d63fd41..e02b95b 100755 --- a/m_librarian/db.py +++ b/m_librarian/db.py @@ -38,7 +38,7 @@ sqlhub.processConnection = connectionForURI(db_uri) class Author(SQLObject): - name = UnicodeCol() + name = UnicodeCol(unique=True) count = IntCol() @@ -58,18 +58,18 @@ class Book(SQLObject): class Extension(SQLObject): - name = StringCol() + name = StringCol(unique=True) count = IntCol() class Genre(SQLObject): - name = StringCol() + name = StringCol(unique=True) title = UnicodeCol() count = IntCol() class Language(SQLObject): - name = StringCol() + name = StringCol(unique=True) count = IntCol()