2017-10-16 Fred Gleason <fredg@paravelsystems.com>

* Added 'DROPBOXES.SEGUE_LEVEL' and 'DROPBOXES.SEGUE_LENGTH' fields
	to the database.
	* Incremented the database version to 271.
	* Applied a pull request from Dennis Graiani <dennis.graiani@gmail.com>
	the added Segue parameters to the 'Edit Dropbox' dialog.
	* Modified the 'Segue Length' control in the 'Edit Dropbox' dialog
	to take mS as units.
This commit is contained in:
Fred Gleason
2017-10-16 10:12:25 -04:00
18 changed files with 258 additions and 26 deletions

View File

@@ -2,7 +2,7 @@
//
// Revert the Rivendell database schema to an earlier version.
//
// (C) Copyright 2016 Fred Gleason <fredg@paravelsystems.com>
// (C) Copyright 2016-2017 Fred Gleason <fredg@paravelsystems.com>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as
@@ -239,6 +239,10 @@ void MainObject::Revert(int schema) const
case 270:
Revert270();
break;
case 271:
Revert271();
break;
}
}
@@ -709,7 +713,6 @@ void MainObject::Revert269() const
SetVersion(268);
}
void MainObject::Revert270() const
{
QString sql;
@@ -723,6 +726,19 @@ void MainObject::Revert270() const
}
void MainObject::Revert271() const
{
QString sql;
QSqlQuery *q;
sql=QString("alter table DROPBOXES drop column SEGUE_LEVEL, ")+
"drop column SEGUE_LENGTH";
q=new QSqlQuery(sql);
delete q;
SetVersion(270);
}
int MainObject::GetVersion() const
{
QString sql;
@@ -767,7 +783,7 @@ int MainObject::MapSchema(const QString &ver)
version_map["2.15"]=259;
version_map["2.16"]=263;
version_map["2.17"]=268;
version_map["2.18"]=270;
version_map["2.18"]=271;
//
// Normalize String

View File

@@ -66,6 +66,7 @@ class MainObject : public QObject
void Revert268() const;
void Revert269() const;
void Revert270() const;
void Revert271() const;
int GetVersion() const;
void SetVersion(int schema) const;
int MapSchema(const QString &ver);