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:
Fred Gleason
2018-06-11 15:59:05 +00:00
parent bcf29e8de3
commit 96fdfff8a0
23 changed files with 410 additions and 178 deletions

View File

@@ -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) {

View File

@@ -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
//

View File

@@ -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;
}

View File

@@ -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: