mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-11-26 23:30:20 +01:00
2016-04-25 Fred Gleason <fredg@paravelsystems.com>
* Added a 'Cut Log' report in 'lib/export_cutlog.cpp'. * Added 'DESCRIPTION' and 'OUTCUE' fields to the '_SRT' table schema. * Incremented the database version to 255.
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
#include <rdcreate_log.h>
|
||||
#include <rdescape_string.h>
|
||||
#include <rdevent.h>
|
||||
#include <rdsvc.h>
|
||||
|
||||
#include "rdrevert.h"
|
||||
|
||||
@@ -162,6 +163,10 @@ void MainObject::Revert(int schema) const
|
||||
case 254:
|
||||
Revert254();
|
||||
break;
|
||||
|
||||
case 255:
|
||||
Revert255();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -376,6 +381,31 @@ void MainObject::Revert254() const
|
||||
}
|
||||
|
||||
|
||||
void MainObject::Revert255() const
|
||||
{
|
||||
QString sql;
|
||||
QSqlQuery *q;
|
||||
QSqlQuery *q1;
|
||||
|
||||
sql=QString("select NAME from SERVICES");
|
||||
q=new QSqlQuery(sql);
|
||||
while(q->next()) {
|
||||
sql=QString("alter table `")+RDSvc::svcTableName(q->value(0).toString())+
|
||||
"` drop column DESCRIPTION";
|
||||
q1=new QSqlQuery(sql);
|
||||
delete q1;
|
||||
|
||||
sql=QString("alter table `")+RDSvc::svcTableName(q->value(0).toString())+
|
||||
"` drop column OUTCUE";
|
||||
q1=new QSqlQuery(sql);
|
||||
delete q1;
|
||||
}
|
||||
delete q;
|
||||
|
||||
SetVersion(254);
|
||||
}
|
||||
|
||||
|
||||
int MainObject::GetVersion() const
|
||||
{
|
||||
QString sql;
|
||||
|
||||
@@ -50,6 +50,7 @@ class MainObject : public QObject
|
||||
void Revert252() const;
|
||||
void Revert253() const;
|
||||
void Revert254() const;
|
||||
void Revert255() const;
|
||||
int GetVersion() const;
|
||||
void SetVersion(int schema) const;
|
||||
int MapSchema(const QString &ver);
|
||||
|
||||
Reference in New Issue
Block a user