2017-03-29 Fred Gleason <fredg@paravelsystems.com>

* Added a 'CUTS.SHA1_HASH' field to the database.
	* Incremented the database version to 261.
	* Added a 'Sha1' column to the Cut List in 'rdlibrary/audio_cart.cpp'.
	* Added 'RDCut::sha1Hash()' and 'RDCut::setSha1Hash()' methods in
	'lib/rdcut.cpp' and 'lib/rdcut.h'.
	* Added a '--rehash=' directive to rddbcheck(8).
	* Added a 'Rehash' Web API call.
	* Added an 'RDRehash' class in 'lib/rdrehash.cpp' and 'lib/rdrehash.h'.
This commit is contained in:
Fred Gleason
2017-03-29 11:09:15 -04:00
parent bc2c441680
commit 5dc6fa92a9
50 changed files with 1124 additions and 24 deletions

View File

@@ -763,6 +763,7 @@ bool CreateDb(QString name,QString pwd)
ISRC char(12),\
ISCI char(32),\
LENGTH INT UNSIGNED,\
SHA1_HASH char(40),\
ORIGIN_DATETIME DATETIME,\
START_DATETIME DATETIME,\
END_DATETIME DATETIME,\
@@ -8346,6 +8347,20 @@ int UpdateDb(int ver)
}
}
if(ver<261) {
sql=QString("alter table CUTS add column ")+
"SHA1_HASH char(40) after LENGTH";
if(!RunQuery(sql)) {
return false;
}
sql="create index SHA1_HASH_IDX on CUTS(SHA1_HASH)";
if(!RunQuery(sql)) {
return false;
}
}
//
// Update Version Field