mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2026-01-12 07:35:55 +01:00
2019-04-23 Fred Gleason <fredg@paravelsystems.com>
* Added a 'STACK_SCHED_CODES' table to the database. * Dropped the 'STACK_LINES.SCHED_CODES' field from the database. * Incremented the database version to 308. * Renamed the 'SchedCartList' class to 'RDSchedCartList' and refactored it to be idiomatic Qt. * Renamed the 'SchedRulesList' class to 'RDSchedRulesList'.
This commit is contained in:
@@ -327,6 +327,16 @@ void MainObject::PurgeStacks()
|
||||
if (q1->next()) {
|
||||
stackid=q1->value(0).toUInt();
|
||||
if (stackid-stacksize > 0) {
|
||||
sql=QString("select ID from STACK_LINES where ")+
|
||||
"SERVICE_NAME=\""+RDEscapeString(q->value(0).toString())+"\" && "+
|
||||
QString().sprintf("SCHED_STACK_ID<=%d",stackid-stacksize);
|
||||
q2=new RDSqlQuery(sql);
|
||||
while(q2->next()) {
|
||||
sql=QString("delete from STACK_SCHED_CODES where ")+
|
||||
QString().sprintf("STACK_LINES_ID=%u",q2->value(0).toUInt());
|
||||
RDSqlQuery::apply(sql);
|
||||
}
|
||||
delete q2;
|
||||
sql=QString("delete from STACK_LINES where ")+
|
||||
"SERVICE_NAME=\""+RDEscapeString(q->value(0).toString())+"\" && "+
|
||||
QString().sprintf("SCHED_STACK_ID<=%d",stackid-stacksize);
|
||||
|
||||
Reference in New Issue
Block a user