Fix for database schema conversion where character_ table has 0 characters present. This will allow the tables to still be created properly and the old one renamed.

This commit is contained in:
akkadius 2014-09-23 18:28:17 -05:00
parent 4cbccfdce2
commit 973aa94cb5

View File

@ -924,9 +924,9 @@ bool Database::CheckDatabaseConversions() {
int runconvert = 0;
/* Check For Legacy Storage Method */
std::string rquery = StringFormat("SELECT `profile` FROM `character_` LIMIT 1");
std::string rquery = StringFormat("SHOW TABLES LIKE 'character_'");
auto results = QueryDatabase(rquery);
for (auto row = results.begin(); row != results.end(); ++row) {
if (results.RowCount() == 1){
runconvert = 1;
printf("\n\n::: Legacy Character Data Binary Blob Storage Detected... \n");
printf("----------------------------------------------------------\n\n");