Merged 'stable'

This commit is contained in:
Fred Gleason 2018-07-06 11:34:42 -04:00
commit d3795f5d0c
3 changed files with 24 additions and 9 deletions

View File

@ -17092,3 +17092,9 @@
* Incremented the database version to 290.
* Removed the 'RDEvent::preimportTableName()' method.
* Removed the 'RDEvent::postimportTableName()' method.
2018-07-07 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in rddbmgr(8) that caused the 'AUDIO_CARDS',
'AUDIO_INPUTS' and 'AUDIO_OUTPUTS' table to be created with the
incorrect engine type when using '--modify'.
* Updated the 'init_template_host.py' script to work with
schema version 287.

View File

@ -3,7 +3,7 @@
# init_template_host.py
#
# Initialize a template-only host profile so it can be used as a
# template.
# template. (Requires the 'mysql-connector-python' package).
#
# (C) Copyright 2018 Fred Gleason <fredg@paravelsystems.com>
#
@ -90,13 +90,19 @@ if(len(q.fetchall()) != 1):
q.close()
#
# Write host record
# Write host records
#
sql='update AUDIO_CARDS set '
sql+='DRIVER=2,'
sql+='NAME="Dummy Template Card",'
sql+='INPUTS='+str(inputs)+','
sql+='OUTPUTS='+str(outputs)
sql+=' where STATION_NAME="'+args.host+'" && CARD_NUMBER='+str(cardnum)
q=db.cursor()
q.execute(sql)
q.close()
sql='update STATIONS set '
sql+='CARD'+str(cardnum)+'_DRIVER=2,'
sql+='CARD'+str(cardnum)+'_NAME="Dummy Template Card",'
sql+='CARD'+str(cardnum)+'_INPUTS='+str(inputs)+','
sql+='CARD'+str(cardnum)+'_OUTPUTS='+str(outputs)+','
sql+='STATION_SCANNED="Y" where '
sql+='NAME="'+args.host+'"'
q=db.cursor()

View File

@ -6766,7 +6766,8 @@ bool MainObject::UpdateSchema(int cur_schema,int set_schema,QString *err_msg) co
"NAME char(64),"+
"INPUTS int not null default -1,"+
"OUTPUTS int not null default -1,"+
"unique index STATION_NAME_IDX(STATION_NAME,CARD_NUMBER))";
"unique index STATION_NAME_IDX(STATION_NAME,CARD_NUMBER))"+
db_table_create_postfix;
if(!RDSqlQuery::apply(sql,err_msg)) {
return false;
}
@ -6841,7 +6842,8 @@ bool MainObject::UpdateSchema(int cur_schema,int set_schema,QString *err_msg) co
"LEVEL int not null default 0,"+
"TYPE int not null default 0,"
"MODE int not null default 0,"+
"unique index STATION_NAME_IDX(STATION_NAME,CARD_NUMBER,PORT_NUMBER))";
"unique index STATION_NAME_IDX(STATION_NAME,CARD_NUMBER,PORT_NUMBER))"+
db_table_create_postfix;
if(!RDSqlQuery::apply(sql,err_msg)) {
return false;
}
@ -6891,7 +6893,8 @@ bool MainObject::UpdateSchema(int cur_schema,int set_schema,QString *err_msg) co
"CARD_NUMBER int not null,"+
"PORT_NUMBER int not null,"+
"LEVEL int not null default 0,"+
"unique index STATION_NAME_IDX(STATION_NAME,CARD_NUMBER,PORT_NUMBER))";
"unique index STATION_NAME_IDX(STATION_NAME,CARD_NUMBER,PORT_NUMBER))"+
db_table_create_postfix;
if(!RDSqlQuery::apply(sql,err_msg)) {
return false;
}