Ignore:
Timestamp:
01/27/10 16:31:10 (12 years ago)
Author:
pavelpa <pavelpa@…>
Branches:
master, qt5
Children:
a790a90
Parents:
07ae23a
Message:

removed appsettings

  • created 'active' column in 'conference' table
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sql/sqlengine.cpp

    r07ae23a r0bb39f5  
    77
    88#include <QDir>
    9 #include <appsettings.h>
    109#include "sqlengine.h"
    1110#include <track.h>
     
    9594                             .arg(-QTime::fromString(aConference["day_change"],TIME_FORMAT).secsTo(QTime(0,0))) \
    9695                             .arg(-QTime::fromString(aConference["timeslot_duration"],TIME_FORMAT).secsTo(QTime(0,0)));
    97 
    98             QString query = QString("INSERT INTO CONFERENCE (title,subtitle,venue,city,start,end,days,day_change,timeslot_duration) VALUES (%1)").arg(values);
     96                             values.append(QString(", '%1'").arg(confsList.count()>0?"0":"1"));
     97
     98            QString query = QString("INSERT INTO CONFERENCE (title,subtitle,venue,city,start,end,days,day_change,timeslot_duration,active) VALUES (%1)").arg(values);
    9999            QSqlQuery result (query, db);
    100100            aConference["id"] = result.lastInsertId().toString(); // 'id' is assigned automatically
    101 
    102             if(!AppSettings::confId()) // default conf Id isn't set yet => set it up
    103                 AppSettings::setConfId(confId);
    104101        }
    105102    }
     
    241238            "days INTEGER, "
    242239            "day_change INTEGER, "
    243             "timeslot_duration INTEGER);");
     240            "timeslot_duration INTEGER, "
     241            "active INTEGER DEFAULT 0);");
    244242
    245243        query.exec("CREATE TABLE TRACK ( "
Note: See TracChangeset for help on using the changeset viewer.