mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-11-26 23:30:20 +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:
@@ -984,6 +984,10 @@ bool CreateDb(QString name,QString pwd,RDConfig *config)
|
||||
"TRAFFIC_LINKS int default 0,"+
|
||||
"TRAFFIC_LINKED enum('N','Y') default 'N',"+
|
||||
"NEXT_ID int default 0,"+
|
||||
"LOCK_USER_NAME char(255),"+
|
||||
"LOCK_STATION_NAME char(64),"+
|
||||
"LOCK_IPV4_ADDRESS char(16),"+
|
||||
"LOCK_DATETIME datetime,"+
|
||||
"index NAME_IDX (NAME,LOG_EXISTS),"+
|
||||
"index SERVICE_IDX (SERVICE),"+
|
||||
"index DESCRIPTION_IDX (DESCRIPTION),"+
|
||||
@@ -7975,6 +7979,28 @@ int UpdateDb(int ver,RDConfig *config)
|
||||
delete q;
|
||||
}
|
||||
|
||||
if(ver<273) {
|
||||
sql=QString("alter table LOGS ")+
|
||||
"add column LOCK_USER_NAME char(255) after NEXT_ID";
|
||||
q=new RDSqlQuery(sql,false);
|
||||
delete q;
|
||||
|
||||
sql=QString("alter table LOGS ")+
|
||||
"add column LOCK_STATION_NAME char(64) after LOCK_USER_NAME";
|
||||
q=new RDSqlQuery(sql,false);
|
||||
delete q;
|
||||
|
||||
sql=QString("alter table LOGS ")+
|
||||
"add column LOCK_IPV4_ADDRESS char(16) after LOCK_STATION_NAME";
|
||||
q=new RDSqlQuery(sql,false);
|
||||
delete q;
|
||||
|
||||
sql=QString("alter table LOGS ")+
|
||||
"add column LOCK_DATETIME datetime after LOCK_IPV4_ADDRESS";
|
||||
q=new RDSqlQuery(sql,false);
|
||||
delete q;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Maintainer's Note:
|
||||
|
||||
Reference in New Issue
Block a user