CharDB Schema/Cleanup: cleanup character_tutorial table:

* rename table to account_tutorial, because it holds account specific data;
* rename column account to accountId;
* introduce prepared statements for table.
This commit is contained in:
Azazel
2011-02-25 00:45:57 +06:00
parent 20ab3e4bda
commit bcd7e45e12
10 changed files with 102 additions and 88 deletions
+4 -2
View File
@@ -74,8 +74,10 @@ AccountOpResult AccountMgr::DeleteAccount(uint32 accid)
}
// table realm specific but common for all characters of account for realm
CharacterDatabase.PExecute("DELETE FROM character_tutorial WHERE account = '%u'",accid);
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_ACCOUNT_DATA);
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_TUTORIALS);
stmt->setUInt32(0, accid);
CharacterDatabase.Execute(stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_ACCOUNT_DATA);
stmt->setUInt32(0, accid);
CharacterDatabase.Execute(stmt);