From 387467eafb0d9fa9977700502a39188aa168921c Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sun, 20 Dec 2015 23:23:46 +0300 Subject: [PATCH] Make names unique --- m_librarian/db.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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() -- 2.39.5