mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2026-01-10 06:37:07 +01:00
2018-06-11 Fred Gleason <fredg@paravelsystems.com>
* Added a 'STATIONS.JACK_PORT' field to the database. * Incremented the database version to 287. * Added an 'Initial Audio Ports' control to the 'JACK Configuration' dialog in rdadmin(1). * Implemented 'Activate JACK Port' ['JA'] and 'Remove JACK Port' ['JR'] RMLs.
This commit is contained in:
@@ -317,11 +317,11 @@ MainObject::MainObject(QObject *parent)
|
||||
}
|
||||
else {
|
||||
if(set_version.isEmpty()) {
|
||||
set_schema=RD_VERSION_DATABASE;
|
||||
if(set_schema<schema) {
|
||||
fprintf(stderr,"rddbmgr: reversion implied, you must explicitly specify the target schema\n");
|
||||
exit(1);
|
||||
}
|
||||
set_schema=RD_VERSION_DATABASE;
|
||||
}
|
||||
else {
|
||||
if((set_schema=GetVersionSchema(set_version))==0) {
|
||||
|
||||
@@ -29,6 +29,25 @@ bool MainObject::RevertSchema(int cur_schema,int set_schema,QString *err_msg) co
|
||||
RDSqlQuery *q;
|
||||
QString tablename;
|
||||
|
||||
//
|
||||
// Maintainer's Note:
|
||||
//
|
||||
// When adding a schema reversion here, be sure also to implement the
|
||||
// corresponding update in updateschema.cpp!
|
||||
//
|
||||
|
||||
//
|
||||
// Revert 287
|
||||
//
|
||||
if((cur_schema==287)&&(set_schema<cur_schema)) {
|
||||
sql=QString("alter table STATIONS drop column JACK_PORTS");
|
||||
if(!RDSqlQuery::apply(sql,err_msg)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
cur_schema--;
|
||||
}
|
||||
|
||||
//
|
||||
// Revert 286
|
||||
//
|
||||
|
||||
@@ -56,7 +56,7 @@ void MainObject::InitializeSchemaMap() {
|
||||
global_version_map["2.17"]=268;
|
||||
global_version_map["2.18"]=272;
|
||||
global_version_map["2.19"]=275;
|
||||
global_version_map["2.20"]=286;
|
||||
global_version_map["2.20"]=287;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -7157,6 +7157,17 @@ bool MainObject::UpdateSchema(int cur_schema,int set_schema,QString *err_msg) co
|
||||
cur_schema++;
|
||||
}
|
||||
|
||||
if((cur_schema<287)&&(set_schema>cur_schema)) {
|
||||
sql=QString("alter table STATIONS add column ")+
|
||||
"JACK_PORTS int not null default 8 after JACK_COMMAND_LINE";
|
||||
if(!RDSqlQuery::apply(sql,err_msg)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
cur_schema++;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Maintainer's Note:
|
||||
|
||||
Reference in New Issue
Block a user