DB scheme changes

This commit is contained in:
Michael Cook (mackal)
2019-06-10 22:40:05 -04:00
parent ece9251bd6
commit 1304b9c80f
3 changed files with 16 additions and 16 deletions
+2 -2
View File
@@ -384,7 +384,7 @@ int ClientListEntry::GetTaskLockoutTimeLeft(int id) const
bool ClientListEntry::CleanExpiredTaskLockouts() const
{
std::string query =
StringFormat("DELETE FROM `character_task_lockouts` WHERE `charid` = %i AND `timestamp` > %i", pcharid,
StringFormat("DELETE FROM `character_task_lockouts` WHERE `character_id` = %i AND `timestamp` > %i", pcharid,
Timer::GetCurrentTime());
auto results = database.QueryDatabase(query);
return results.Success();
@@ -397,7 +397,7 @@ bool ClientListEntry::LoadTaskLockouts()
{
CleanExpiredTaskLockouts();
std::string query = StringFormat(
"SELECT `replay_group`, `original_id`, `timestamp` FROM `character_task_lockouts` WHERE `charid` = %i",
"SELECT `replay_group`, `original_id`, `timestamp` FROM `character_task_lockouts` WHERE `character_id` = %i",
pcharid);
auto results = database.QueryDatabase(query);
if (!results.Success())
+2 -2
View File
@@ -374,7 +374,7 @@ bool SharedTaskManager::LoadSharedTaskState()
{
// one may think we should clean up expired tasks, but we don't just in case world is booting back up after a crash
// we will clean them up in the normal process loop so zones get told to clean up
std::string query = "SELECT `id`, `taskid`, `acceptedtime`, `locked` FROM `shared_task_state`";
std::string query = "SELECT `id`, `task_id`, `accepted_time`, `is_locked` FROM `shared_task_state`";
auto results = database.QueryDatabase(query);
if (results.Success() && results.RowCount() > 0) {
@@ -389,7 +389,7 @@ bool SharedTaskManager::LoadSharedTaskState()
}
}
query = "SELECT `shared_id`, `charid`, `name`, `leader` FROM `shared_task_members` ORDER BY shared_id ASC";
query = "SELECT `shared_task_id`, `character_id`, `character_name`, `is_leader` FROM `shared_task_members` ORDER BY shared_task_id ASC";
results = database.QueryDatabase(query);
if (results.Success() && results.RowCount() > 0) {
for (auto row = results.begin(); row != results.end(); ++row) {