mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-12 17:43:41 +02:00
2018-05-29 Fred Gleason <fredg@paravelsystems.com>
* Dropped the 'RDAIRPLAY.INSTANCE' field from the database. * Dropped the 'RDAIRPLAY.CARD<n>' fields from the database. * Dropped the 'RDAIRPLAY.PORT<n>' fields from the database. * Dropped the 'RDAIRPLAY.START_RML<n>' fields from the database. * Dropped the 'RDAIRPLAY.STOP_RML<n>' fields from the database. * Dropped the 'RDAIRPLAY.OP_MODE' field from the database. * Dropped the 'RDAIRPLAY.START_MODE' field from the database. * Dropped the 'RDPANEL.INSTANCE' field from the database. * Dropped the 'RDPANEL.CARD<n>' fields from the database. * Dropped the 'RDPANEL.PORT<n>' fields from the database. * Dropped the 'RDPANEL.START_RML<n>' fields from the database. * Dropped the 'RDPANEL.STOP_RML<n>' fields from the database. * Altered the default value of the 'MATRICES.PORT field to 0. * Altered the default value of the 'MATRICES.PORT_2 field to 0. * Altered the default value of the 'MATRICES.INPUTS field to 0. * Altered the default value of the 'MATRICES.OUTPUTS field to 0. * Altered the default value of the 'MATRICES.GPIS field to 0. * Altered the default value of the 'MATRICES.GPOS field to 0. * Incremented the database version to 284. * Fixed bugs in rdcatch(1) that incorrectly escaped host names in SQL calls. * Fixed a bug in 'RDLog::create()' that failed to initialize the modified datetime correctly.
This commit is contained in:
@@ -291,6 +291,10 @@ void MainObject::Revert(int schema) const
|
||||
case 283:
|
||||
Revert283();
|
||||
break;
|
||||
|
||||
case 284:
|
||||
Revert284();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1228,6 +1232,130 @@ void MainObject::Revert283() const
|
||||
}
|
||||
|
||||
|
||||
void MainObject::Revert284() const
|
||||
{
|
||||
QString sql;
|
||||
RDSqlQuery *q;
|
||||
|
||||
sql=QString("alter table RDAIRPLAY add column INSTANCE int unsigned ")+
|
||||
"not null default 0 after STATION";
|
||||
q=new RDSqlQuery(sql,false);
|
||||
delete q;
|
||||
|
||||
for(int i=9;i>=0;i--) {
|
||||
sql=QString("alter table RDAIRPLAY add column ")+
|
||||
QString().sprintf("STOP_RML%d char(255) after INSTANCE",i);
|
||||
q=new RDSqlQuery(sql,false);
|
||||
delete q;
|
||||
|
||||
sql=QString("alter table RDAIRPLAY add column ")+
|
||||
QString().sprintf("START_RML%d char(255) after INSTANCE",i);
|
||||
q=new RDSqlQuery(sql,false);
|
||||
delete q;
|
||||
|
||||
sql=QString("alter table RDAIRPLAY add column ")+
|
||||
QString().sprintf("PORT%d int default 0 after INSTANCE",i);
|
||||
q=new RDSqlQuery(sql,false);
|
||||
delete q;
|
||||
|
||||
sql=QString("alter table RDAIRPLAY add column ")+
|
||||
QString().sprintf("CARD%d int default 0 after INSTANCE",i);
|
||||
q=new RDSqlQuery(sql,false);
|
||||
delete q;
|
||||
}
|
||||
|
||||
sql=QString("alter table RDAIRPLAY add column ")+
|
||||
"OP_MODE int default 2 after TRANS_LENGTH";
|
||||
q=new RDSqlQuery(sql,false);
|
||||
delete q;
|
||||
|
||||
sql=QString("alter table RDAIRPLAY add column ")+
|
||||
"START_MODE int default 0 after OP_MODE";
|
||||
q=new RDSqlQuery(sql,false);
|
||||
delete q;
|
||||
|
||||
|
||||
|
||||
sql=QString("alter table RDPANEL add column INSTANCE int unsigned ")+
|
||||
"not null default 0 after STATION";
|
||||
q=new RDSqlQuery(sql,false);
|
||||
delete q;
|
||||
|
||||
for(int i=9;i>=6;i--) {
|
||||
sql=QString("alter table RDPANEL add column ")+
|
||||
QString().sprintf("STOP_RML%d char(255) after INSTANCE",i);
|
||||
q=new RDSqlQuery(sql,false);
|
||||
delete q;
|
||||
|
||||
sql=QString("alter table RDPANEL add column ")+
|
||||
QString().sprintf("START_RML%d char(255) after INSTANCE",i);
|
||||
q=new RDSqlQuery(sql,false);
|
||||
delete q;
|
||||
|
||||
sql=QString("alter table RDPANEL add column ")+
|
||||
QString().sprintf("PORT%d int default 0 after INSTANCE",i);
|
||||
q=new RDSqlQuery(sql,false);
|
||||
delete q;
|
||||
|
||||
sql=QString("alter table RDPANEL add column ")+
|
||||
QString().sprintf("CARD%d int default 0 after INSTANCE",i);
|
||||
q=new RDSqlQuery(sql,false);
|
||||
delete q;
|
||||
}
|
||||
for(int i=3;i>=2;i--) {
|
||||
sql=QString("alter table RDPANEL add column ")+
|
||||
QString().sprintf("STOP_RML%d char(255) after INSTANCE",i);
|
||||
q=new RDSqlQuery(sql,false);
|
||||
delete q;
|
||||
|
||||
sql=QString("alter table RDPANEL add column ")+
|
||||
QString().sprintf("START_RML%d char(255) after INSTANCE",i);
|
||||
q=new RDSqlQuery(sql,false);
|
||||
delete q;
|
||||
|
||||
sql=QString("alter table RDPANEL add column ")+
|
||||
QString().sprintf("PORT%d int default 0 after INSTANCE",i);
|
||||
q=new RDSqlQuery(sql,false);
|
||||
delete q;
|
||||
|
||||
sql=QString("alter table RDPANEL add column ")+
|
||||
QString().sprintf("CARD%d int default 0 after INSTANCE",i);
|
||||
q=new RDSqlQuery(sql,false);
|
||||
delete q;
|
||||
}
|
||||
|
||||
sql=QString("alter table MATRICES alter column PORT drop default");
|
||||
q=new RDSqlQuery(sql,false);
|
||||
delete q;
|
||||
|
||||
sql=QString("alter table MATRICES alter column PORT_2 drop default");
|
||||
q=new RDSqlQuery(sql,false);
|
||||
delete q;
|
||||
|
||||
sql=QString("alter table MATRICES alter column INPUTS drop default");
|
||||
q=new RDSqlQuery(sql,false);
|
||||
delete q;
|
||||
|
||||
sql=QString("alter table MATRICES alter column OUTPUTS drop default");
|
||||
q=new RDSqlQuery(sql,false);
|
||||
delete q;
|
||||
|
||||
sql=QString("alter table MATRICES alter column GPIS drop default");
|
||||
q=new RDSqlQuery(sql,false);
|
||||
delete q;
|
||||
|
||||
sql=QString("alter table MATRICES alter column GPOS drop default");
|
||||
q=new RDSqlQuery(sql,false);
|
||||
delete q;
|
||||
|
||||
sql=QString("alter table REPLICATORS alter column TYPE_ID drop default");
|
||||
q=new RDSqlQuery(sql,false);
|
||||
delete q;
|
||||
|
||||
SetVersion(283);
|
||||
}
|
||||
|
||||
|
||||
int MainObject::GetVersion() const
|
||||
{
|
||||
QString sql;
|
||||
@@ -1274,7 +1402,7 @@ int MainObject::MapSchema(const QString &ver)
|
||||
version_map["2.17"]=268;
|
||||
version_map["2.18"]=272;
|
||||
version_map["2.19"]=275;
|
||||
version_map["2.20"]=283;
|
||||
version_map["2.20"]=284;
|
||||
|
||||
//
|
||||
// Normalize String
|
||||
|
@@ -79,6 +79,7 @@ class MainObject : public QObject
|
||||
void Revert281() const;
|
||||
void Revert282() const;
|
||||
void Revert283() const;
|
||||
void Revert284() const;
|
||||
int GetVersion() const;
|
||||
void SetVersion(int schema) const;
|
||||
int MapSchema(const QString &ver);
|
||||
|
Reference in New Issue
Block a user