mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-07-11 06:07:45 +02:00
2017-05-18 Fred Gleason <fredg@paravelsystems.com>
* Added pseudo-schema change 263 to restore missing LOG_MODES table records [GitHub issue #000175]. * Added code to create and remove LOG_MODES table records when adding and removing Host definitions. * Incremented the database version to 263.
This commit is contained in:
parent
0134e46052
commit
1a94f58fff
@ -15785,3 +15785,9 @@
|
||||
dependency when generating RPMs for RHEL6.
|
||||
2017-05-18 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Incremented the package version to 2.15.3int06.
|
||||
2017-05-18 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Added pseudo-schema change 263 to restore missing LOG_MODES table
|
||||
records [GitHub issue #000175].
|
||||
* Added code to create and remove LOG_MODES table records when
|
||||
adding and removing Host definitions.
|
||||
* Incremented the database version to 263.
|
||||
|
@ -24,7 +24,7 @@
|
||||
/*
|
||||
* Current Database Version
|
||||
*/
|
||||
#define RD_VERSION_DATABASE 262
|
||||
#define RD_VERSION_DATABASE 263
|
||||
|
||||
|
||||
#endif // DBVERSION_H
|
||||
|
@ -207,6 +207,17 @@ void AddStation::okData()
|
||||
delete q;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// RDAirPlay Log Modes
|
||||
//
|
||||
for(int i=0;i<RDAIRPLAY_LOG_QUANTITY;i++) {
|
||||
sql=QString().sprintf("insert into LOG_MODES set ")+
|
||||
"STATION_NAME=\""+RDEscapeString(add_name_edit->text())+"\","+
|
||||
QString().sprintf("MACHINE=%d",i);
|
||||
q=new RDSqlQuery(sql);
|
||||
delete q;
|
||||
}
|
||||
}
|
||||
else { // Use Specified Config
|
||||
|
||||
@ -537,6 +548,26 @@ void AddStation::okData()
|
||||
}
|
||||
delete q;
|
||||
|
||||
//
|
||||
// RDAirPlay Log Modes
|
||||
//
|
||||
sql=QString("select ")+
|
||||
"MACHINE,"+
|
||||
"START_MODE,"+
|
||||
"OP_MODE from LOG_MODES where "+
|
||||
"STATION_NAME=\""+RDEscapeString(add_exemplar_box->currentText())+"\"";
|
||||
q=new RDSqlQuery(sql);
|
||||
while(q->next()) {
|
||||
sql=QString().sprintf("insert into LOG_MODES set ")+
|
||||
"STATION_NAME=\""+RDEscapeString(add_name_edit->text())+"\","+
|
||||
QString().sprintf("MACHINE=%d,",q->value(0).toInt())+
|
||||
QString().sprintf("START_MODE=%d,",q->value(1).toInt())+
|
||||
QString().sprintf("OP_MODE=%d",q->value(2).toInt());
|
||||
q1=new RDSqlQuery(sql);
|
||||
delete q1;
|
||||
}
|
||||
delete q;
|
||||
|
||||
//
|
||||
// Clone RDPanel Config
|
||||
//
|
||||
|
@ -8382,6 +8382,28 @@ int UpdateDb(int ver)
|
||||
}
|
||||
}
|
||||
|
||||
if(ver<263) { // Add missing LOG_MODES records
|
||||
sql=QString("select NAME from STATIONS");
|
||||
q=new QSqlQuery(sql);
|
||||
while(q->next()) {
|
||||
for(int i=0;i<3;i++) {
|
||||
sql=QString("select ID from LOG_MODES where ")+
|
||||
"(STATION_NAME=\""+RDEscapeString(q->value(0).toString())+"\")&&"+
|
||||
QString().sprintf("(MACHINE=%d)",i);
|
||||
q1=new QSqlQuery(sql);
|
||||
if(!q1->first()) {
|
||||
sql=QString("insert into LOG_MODES set ")+
|
||||
"STATION_NAME=\""+RDEscapeString(q->value(0).toString())+"\","+
|
||||
QString().sprintf("MACHINE=%d",i);
|
||||
q2=new QSqlQuery(sql);
|
||||
delete q2;
|
||||
}
|
||||
delete q1;
|
||||
}
|
||||
}
|
||||
delete q;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Update Version Field
|
||||
|
@ -216,11 +216,6 @@ EditRDAirPlay::EditRDAirPlay(RDStation *station,RDStation *cae_station,
|
||||
//
|
||||
// Audition/Cue Output
|
||||
//
|
||||
/*
|
||||
label=new QLabel(tr("Audition/Cue Output"),this);
|
||||
label->setFont(small_font);
|
||||
label->setGeometry(25,304,200,16);
|
||||
*/
|
||||
air_card_sel[3]=new RDCardSelector(this);
|
||||
air_card_sel[3]->setId(3);
|
||||
air_card_sel[3]->setGeometry(20,322,120,117);
|
||||
|
@ -328,5 +328,10 @@ void ListStations::DeleteStation(QString name)
|
||||
(const char *)RDEscapeString(name));
|
||||
q=new RDSqlQuery(sql);
|
||||
delete q;
|
||||
|
||||
sql=QString("delete from LOG_MODES where ")+
|
||||
"STATION_NAME=\""+RDEscapeString(name)+"\"";
|
||||
q=new RDSqlQuery(sql);
|
||||
delete q;
|
||||
}
|
||||
|
||||
|
@ -206,6 +206,10 @@ void MainObject::Revert(int schema) const
|
||||
case 262:
|
||||
Revert262();
|
||||
break;
|
||||
|
||||
case 263:
|
||||
Revert263();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -592,6 +596,14 @@ void MainObject::Revert262() const
|
||||
}
|
||||
|
||||
|
||||
void MainObject::Revert263() const
|
||||
{
|
||||
// Nothing to do here as this is a pseudo-schema change.
|
||||
|
||||
SetVersion(262);
|
||||
}
|
||||
|
||||
|
||||
int MainObject::GetVersion() const
|
||||
{
|
||||
QString sql;
|
||||
@ -634,7 +646,7 @@ int MainObject::MapSchema(const QString &ver)
|
||||
version_map["2.13"]=255;
|
||||
version_map["2.14"]=258;
|
||||
version_map["2.15"]=259;
|
||||
version_map["2.16"]=262;
|
||||
version_map["2.16"]=263;
|
||||
|
||||
//
|
||||
// Normalize String
|
||||
|
@ -58,6 +58,7 @@ class MainObject : public QObject
|
||||
void Revert260() const;
|
||||
void Revert261() const;
|
||||
void Revert262() const;
|
||||
void Revert263() const;
|
||||
int GetVersion() const;
|
||||
void SetVersion(int schema) const;
|
||||
int MapSchema(const QString &ver);
|
||||
|
Loading…
x
Reference in New Issue
Block a user