Ensure no UUID.Zero region ID is ever written to presence. Add a Migration
to add a LastSeen field of type "Timestamp" to Presence for MySQLviewer-2-initial-appearance
parent
b4c718f93b
commit
01728fb19e
|
@ -78,6 +78,9 @@ namespace OpenSim.Data.MySQL
|
|||
if (pd.Length == 0)
|
||||
return false;
|
||||
|
||||
if (regionID == UUID.Zero)
|
||||
return;
|
||||
|
||||
MySqlCommand cmd = new MySqlCommand();
|
||||
|
||||
cmd.CommandText = String.Format("update {0} set RegionID=?RegionID where `SessionID`=?SessionID", m_Realm);
|
||||
|
@ -90,6 +93,5 @@ namespace OpenSim.Data.MySQL
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,3 +13,11 @@ CREATE UNIQUE INDEX SessionID ON Presence(SessionID);
|
|||
CREATE INDEX UserID ON Presence(UserID);
|
||||
|
||||
COMMIT;
|
||||
|
||||
:VERSION 1 # --------------------------
|
||||
|
||||
BEGIN;
|
||||
|
||||
ALTER TABLE `Presence` ADD COLUMN LastSeen timestamp;
|
||||
|
||||
COMMIT;
|
||||
|
|
Loading…
Reference in New Issue