mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-06 18:08:26 +00:00
Merge feeb1f4df1 into 21a7b58c82
This commit is contained in:
commit
e57dd2ba74
@ -21,12 +21,12 @@
|
|||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
Migration_RemoveWorkshopMaptiers, // 0
|
Migration_RemoveWorkshopMaptiers, // 0 // safe with newly-created tables
|
||||||
Migration_RemoveWorkshopMapzones,
|
Migration_RemoveWorkshopMapzones, // safe with newly-created tables
|
||||||
Migration_RemoveWorkshopPlayertimes,
|
Migration_RemoveWorkshopPlayertimes, // safe with newly-created tables
|
||||||
Migration_LastLoginIndex,
|
Migration_LastLoginIndex, // safe with newly-created tables
|
||||||
Migration_RemoveCountry,
|
Migration_RemoveCountry, // safe with newly-created tables -- doesn't work on sqlite
|
||||||
Migration_ConvertIPAddresses, // 5
|
Migration_ConvertIPAddresses, // 5 //
|
||||||
Migration_ConvertSteamIDsUsers,
|
Migration_ConvertSteamIDsUsers,
|
||||||
Migration_ConvertSteamIDsPlayertimes,
|
Migration_ConvertSteamIDsPlayertimes,
|
||||||
Migration_ConvertSteamIDsChat,
|
Migration_ConvertSteamIDsChat,
|
||||||
@ -380,8 +380,11 @@ void ApplyMigration(int migration)
|
|||||||
|
|
||||||
void ApplyMigration_LastLoginIndex()
|
void ApplyMigration_LastLoginIndex()
|
||||||
{
|
{
|
||||||
char sQuery[128];
|
char sQuery[512];
|
||||||
FormatEx(sQuery, 128, "ALTER TABLE `%susers` ADD INDEX `lastlogin` (`lastlogin`);", gS_SQLPrefix);
|
if (gI_Driver == Driver_sqlite)
|
||||||
|
FormatEx(sQuery, 512, "CREATE INDEX IF NOT EXISTS lastlogin ON `%susers` (lastlogin);", gS_SQLPrefix);
|
||||||
|
else
|
||||||
|
FormatEx(sQuery, 512, "ALTER TABLE `%susers` ADD INDEX `lastlogin` (`lastlogin`);", gS_SQLPrefix);
|
||||||
QueryLog(gH_SQL, SQL_TableMigrationSingleQuery_Callback, sQuery, Migration_LastLoginIndex, DBPrio_High);
|
QueryLog(gH_SQL, SQL_TableMigrationSingleQuery_Callback, sQuery, Migration_LastLoginIndex, DBPrio_High);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user