mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2026-01-12 07:35:55 +01:00
2017-12-18 Fred Gleason <fredg@paravelsystems.com>
* Added a 'LOGS.LOCK_USER_NAME' field to the database. * Added a 'LOGS.LOCK_STATION_NAME' field to the database. * Added a 'LOGS.LOCK_IPV4_ADDRESS' field to the database. * Added a 'LOGS.LOCK_DATETIME' field to the database. * Incremented the database version to 273. * Added log locking logic to rdlogedit(1).
This commit is contained in:
@@ -247,6 +247,10 @@ void MainObject::Revert(int schema) const
|
||||
case 272:
|
||||
Revert272();
|
||||
break;
|
||||
|
||||
case 273:
|
||||
Revert273();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -758,6 +762,31 @@ void MainObject::Revert272() const
|
||||
}
|
||||
|
||||
|
||||
void MainObject::Revert273() const
|
||||
{
|
||||
QString sql;
|
||||
QSqlQuery *q;
|
||||
|
||||
sql=QString("alter table LOGS drop column LOCK_DATETIME");
|
||||
q=new QSqlQuery(sql);
|
||||
delete q;
|
||||
|
||||
sql=QString("alter table LOGS drop column LOCK_IPV4_ADDRESS");
|
||||
q=new QSqlQuery(sql);
|
||||
delete q;
|
||||
|
||||
sql=QString("alter table LOGS drop column LOCK_STATION_NAME");
|
||||
q=new QSqlQuery(sql);
|
||||
delete q;
|
||||
|
||||
sql=QString("alter table LOGS drop column LOCK_USER_NAME");
|
||||
q=new QSqlQuery(sql);
|
||||
delete q;
|
||||
|
||||
SetVersion(272);
|
||||
}
|
||||
|
||||
|
||||
int MainObject::GetVersion() const
|
||||
{
|
||||
QString sql;
|
||||
@@ -803,6 +832,7 @@ int MainObject::MapSchema(const QString &ver)
|
||||
version_map["2.16"]=263;
|
||||
version_map["2.17"]=268;
|
||||
version_map["2.18"]=272;
|
||||
version_map["2.19"]=273;
|
||||
|
||||
//
|
||||
// Normalize String
|
||||
|
||||
@@ -68,6 +68,7 @@ class MainObject : public QObject
|
||||
void Revert270() const;
|
||||
void Revert271() const;
|
||||
void Revert272() const;
|
||||
void Revert273() const;
|
||||
int GetVersion() const;
|
||||
void SetVersion(int schema) const;
|
||||
int MapSchema(const QString &ver);
|
||||
|
||||
Reference in New Issue
Block a user