Don't insert empty string into picture column.
authorgregor herrmann <gregoa@debian.org>
Tue, 25 Sep 2012 18:25:56 +0000 (18:25 +0000)
committergregor herrmann <gregoa@debian.org>
Tue, 25 Sep 2012 18:25:56 +0000 (18:25 +0000)
(NOT NULL constraint removed from db schema.)

src/sql/sqlengine.cpp

index b8408bd..c067745 100644 (file)
@@ -276,7 +276,7 @@ void SqlEngine::addRoomToDB(QHash<QString,QString> &aRoom) {
     else // ROOM record doesn't exist yet, need to create it
     {
         query = QSqlQuery(db);
     else // ROOM record doesn't exist yet, need to create it
     {
         query = QSqlQuery(db);
-        query.prepare("INSERT INTO ROOM (xid_conference,name,picture) VALUES (:xid_conference, :name, '')");
+        query.prepare("INSERT INTO ROOM (xid_conference,name) VALUES (:xid_conference, :name)");
         query.bindValue(":xid_conference", aRoom["conference_id"]);
         query.bindValue(":xid_name", aRoom["name"]);
         emitSqlQueryError(query);
         query.bindValue(":xid_conference", aRoom["conference_id"]);
         query.bindValue(":xid_name", aRoom["name"]);
         emitSqlQueryError(query);