mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 14:41:28 +00:00
Rename character expedition lockouts table
This commit is contained in:
parent
3a1eb51890
commit
3ed7215a92
@ -50,6 +50,7 @@ namespace DatabaseSchema {
|
||||
{"character_data", "id"},
|
||||
{"character_disciplines", "id"},
|
||||
{"character_enabledtasks", "charid"},
|
||||
{"character_expedition_lockouts", "character_id"},
|
||||
{"character_inspect_messages", "id"},
|
||||
{"character_item_recast", "id"},
|
||||
{"character_languages", "id"},
|
||||
@ -66,7 +67,6 @@ namespace DatabaseSchema {
|
||||
{"character_tribute", "id"},
|
||||
{"completed_tasks", "charid"},
|
||||
{"data_buckets", "id"},
|
||||
{"expedition_character_lockouts", "character_id"},
|
||||
{"faction_values", "char_id"},
|
||||
{"friends", "charid"},
|
||||
{"guild_members", "char_id"},
|
||||
@ -115,6 +115,7 @@ namespace DatabaseSchema {
|
||||
"character_data",
|
||||
"character_disciplines",
|
||||
"character_enabledtasks",
|
||||
"character_expedition_lockouts",
|
||||
"character_inspect_messages",
|
||||
"character_item_recast",
|
||||
"character_languages",
|
||||
@ -132,7 +133,6 @@ namespace DatabaseSchema {
|
||||
"completed_tasks",
|
||||
"data_buckets",
|
||||
"discovered_items",
|
||||
"expedition_character_lockouts",
|
||||
"faction_values",
|
||||
"friends",
|
||||
"guild_bank",
|
||||
|
||||
@ -40,7 +40,7 @@ COLLATE='utf8mb4_general_ci'
|
||||
ENGINE=InnoDB
|
||||
;
|
||||
|
||||
CREATE TABLE `expedition_character_lockouts` (
|
||||
CREATE TABLE `character_expedition_lockouts` (
|
||||
`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`character_id` INT(10) UNSIGNED NOT NULL,
|
||||
`expedition_name` VARCHAR(128) NOT NULL,
|
||||
|
||||
@ -287,7 +287,7 @@ void ExpeditionDatabase::PurgeExpiredExpeditions()
|
||||
void ExpeditionDatabase::PurgeExpiredCharacterLockouts()
|
||||
{
|
||||
std::string query = SQL(
|
||||
DELETE FROM expedition_character_lockouts
|
||||
DELETE FROM character_expedition_lockouts
|
||||
WHERE expire_time <= NOW();
|
||||
);
|
||||
|
||||
|
||||
@ -109,7 +109,7 @@ std::vector<ExpeditionLockoutTimer> ExpeditionDatabase::LoadCharacterLockouts(ui
|
||||
event_name,
|
||||
UNIX_TIMESTAMP(expire_time),
|
||||
duration
|
||||
FROM expedition_character_lockouts
|
||||
FROM character_expedition_lockouts
|
||||
WHERE character_id = {} AND is_pending = FALSE AND expire_time > NOW();
|
||||
), character_id);
|
||||
|
||||
@ -144,7 +144,7 @@ std::vector<ExpeditionLockoutTimer> ExpeditionDatabase::LoadCharacterLockouts(
|
||||
event_name,
|
||||
UNIX_TIMESTAMP(expire_time),
|
||||
duration
|
||||
FROM expedition_character_lockouts
|
||||
FROM character_expedition_lockouts
|
||||
WHERE
|
||||
character_id = {}
|
||||
AND is_pending = FALSE
|
||||
@ -254,7 +254,7 @@ MySQLRequestResult ExpeditionDatabase::LoadMembersForCreateRequest(
|
||||
lockout.duration,
|
||||
lockout.event_name
|
||||
FROM character_data
|
||||
LEFT JOIN expedition_character_lockouts lockout
|
||||
LEFT JOIN character_expedition_lockouts lockout
|
||||
ON character_data.id = lockout.character_id
|
||||
AND lockout.is_pending = FALSE
|
||||
AND lockout.expire_time > NOW()
|
||||
@ -277,7 +277,7 @@ void ExpeditionDatabase::DeleteAllCharacterLockouts(uint32_t character_id)
|
||||
if (character_id != 0)
|
||||
{
|
||||
std::string query = fmt::format(SQL(
|
||||
DELETE FROM expedition_character_lockouts
|
||||
DELETE FROM character_expedition_lockouts
|
||||
WHERE character_id = {};
|
||||
), character_id);
|
||||
|
||||
@ -293,7 +293,7 @@ void ExpeditionDatabase::DeleteAllCharacterLockouts(
|
||||
if (character_id != 0 && !expedition_name.empty())
|
||||
{
|
||||
std::string query = fmt::format(SQL(
|
||||
DELETE FROM expedition_character_lockouts
|
||||
DELETE FROM character_expedition_lockouts
|
||||
WHERE character_id = {} AND expedition_name = '{}';
|
||||
), character_id, EscapeString(expedition_name));
|
||||
|
||||
@ -309,7 +309,7 @@ void ExpeditionDatabase::DeleteCharacterLockout(
|
||||
);
|
||||
|
||||
auto query = fmt::format(SQL(
|
||||
DELETE FROM expedition_character_lockouts
|
||||
DELETE FROM character_expedition_lockouts
|
||||
WHERE
|
||||
character_id = {}
|
||||
AND is_pending = FALSE
|
||||
@ -337,7 +337,7 @@ void ExpeditionDatabase::DeleteMembersLockout(
|
||||
query_character_ids.pop_back(); // trailing comma
|
||||
|
||||
auto query = fmt::format(SQL(
|
||||
DELETE FROM expedition_character_lockouts
|
||||
DELETE FROM character_expedition_lockouts
|
||||
WHERE character_id
|
||||
IN ({})
|
||||
AND is_pending = FALSE
|
||||
@ -354,7 +354,7 @@ void ExpeditionDatabase::AssignPendingLockouts(uint32_t character_id, const std:
|
||||
LogExpeditionsDetail("Assigning character [{}] pending lockouts [{}]", character_id, expedition_name);
|
||||
|
||||
auto query = fmt::format(SQL(
|
||||
UPDATE expedition_character_lockouts
|
||||
UPDATE character_expedition_lockouts
|
||||
SET is_pending = FALSE
|
||||
WHERE
|
||||
character_id = {}
|
||||
@ -370,7 +370,7 @@ void ExpeditionDatabase::DeletePendingLockouts(uint32_t character_id)
|
||||
LogExpeditionsDetail("Deleting character [{}] pending lockouts", character_id);
|
||||
|
||||
auto query = fmt::format(SQL(
|
||||
DELETE FROM expedition_character_lockouts
|
||||
DELETE FROM character_expedition_lockouts
|
||||
WHERE character_id = {} AND is_pending = TRUE;
|
||||
), character_id);
|
||||
|
||||
@ -392,7 +392,7 @@ void ExpeditionDatabase::DeleteAllMembersPendingLockouts(const std::vector<Exped
|
||||
query_character_ids.pop_back(); // trailing comma
|
||||
|
||||
auto query = fmt::format(SQL(
|
||||
DELETE FROM expedition_character_lockouts
|
||||
DELETE FROM character_expedition_lockouts
|
||||
WHERE character_id IN ({}) AND is_pending = TRUE;
|
||||
), query_character_ids);
|
||||
|
||||
@ -470,7 +470,7 @@ void ExpeditionDatabase::InsertCharacterLockouts(
|
||||
}
|
||||
|
||||
auto query = fmt::format(SQL(
|
||||
INSERT INTO expedition_character_lockouts
|
||||
INSERT INTO character_expedition_lockouts
|
||||
(
|
||||
character_id,
|
||||
expire_time,
|
||||
@ -515,7 +515,7 @@ void ExpeditionDatabase::InsertMembersLockout(
|
||||
insert_values.pop_back(); // trailing comma
|
||||
|
||||
auto query = fmt::format(SQL(
|
||||
INSERT INTO expedition_character_lockouts
|
||||
INSERT INTO character_expedition_lockouts
|
||||
(character_id, expire_time, duration, from_expedition_uuid, expedition_name, event_name)
|
||||
VALUES {}
|
||||
ON DUPLICATE KEY UPDATE
|
||||
@ -716,7 +716,7 @@ void ExpeditionDatabase::AddLockoutDuration(const std::vector<ExpeditionMember>&
|
||||
insert_values.pop_back(); // trailing comma
|
||||
|
||||
auto query = fmt::format(SQL(
|
||||
INSERT INTO expedition_character_lockouts
|
||||
INSERT INTO character_expedition_lockouts
|
||||
(character_id, expire_time, duration, from_expedition_uuid, expedition_name, event_name)
|
||||
VALUES {}
|
||||
ON DUPLICATE KEY UPDATE
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user