From 4c61fcfc401cdf08f5027e3bce21c4b465711c60 Mon Sep 17 00:00:00 2001 From: Kunnis Date: Sat, 5 Dec 2009 09:54:33 -0600 Subject: Getting rid of the dead field RootInventoryFolderId on UserProfileData, It's not even stored in mysql. Signed-off-by: Melanie --- OpenSim/Data/SQLite/SQLiteUserData.cs | 7 +++++-- OpenSim/Data/Tests/BasicUserTest.cs | 9 ++------- 2 files changed, 7 insertions(+), 9 deletions(-) (limited to 'OpenSim/Data') diff --git a/OpenSim/Data/SQLite/SQLiteUserData.cs b/OpenSim/Data/SQLite/SQLiteUserData.cs index b9f3515..caddcf8 100644 --- a/OpenSim/Data/SQLite/SQLiteUserData.cs +++ b/OpenSim/Data/SQLite/SQLiteUserData.cs @@ -819,7 +819,10 @@ namespace OpenSim.Data.SQLite SQLiteUtil.createCol(users, "homeLookAtZ", typeof (Double)); SQLiteUtil.createCol(users, "created", typeof (Int32)); SQLiteUtil.createCol(users, "lastLogin", typeof (Int32)); + + //TODO: Please delete this column. It's now a brick SQLiteUtil.createCol(users, "rootInventoryFolderID", typeof (String)); + SQLiteUtil.createCol(users, "userInventoryURI", typeof (String)); SQLiteUtil.createCol(users, "userAssetURI", typeof (String)); SQLiteUtil.createCol(users, "profileCanDoMask", typeof (Int32)); @@ -980,7 +983,6 @@ namespace OpenSim.Data.SQLite user.Created = Convert.ToInt32(row["created"]); user.LastLogin = Convert.ToInt32(row["lastLogin"]); - user.RootInventoryFolderID = new UUID((String) row["rootInventoryFolderID"]); user.UserInventoryURI = (String) row["userInventoryURI"]; user.UserAssetURI = (String) row["userAssetURI"]; user.CanDoMask = Convert.ToUInt32(row["profileCanDoMask"]); @@ -1026,7 +1028,8 @@ namespace OpenSim.Data.SQLite row["created"] = user.Created; row["lastLogin"] = user.LastLogin; - row["rootInventoryFolderID"] = user.RootInventoryFolderID.ToString(); + //TODO: Get rid of rootInventoryFolderID in a safe way. + row["rootInventoryFolderID"] = UUID.Zero.ToString(); row["userInventoryURI"] = user.UserInventoryURI; row["userAssetURI"] = user.UserAssetURI; row["profileCanDoMask"] = user.CanDoMask; diff --git a/OpenSim/Data/Tests/BasicUserTest.cs b/OpenSim/Data/Tests/BasicUserTest.cs index 1f472a5..d3b6041 100644 --- a/OpenSim/Data/Tests/BasicUserTest.cs +++ b/OpenSim/Data/Tests/BasicUserTest.cs @@ -170,8 +170,8 @@ namespace OpenSim.Data.Tests { UserProfileData u0 = NewUser(zero,fname0,lname0); UserProfileData u4 = NewUser(user4,fname2,lname2); - db.AddNewUserProfile(u0); - db.AddNewUserProfile(u4); + db.AddNewUserProfile(u0); //UserID 0 should fail to save. + db.AddNewUserProfile(u4); //The first name and last name are already in use (from T010), so this should fail too Assert.That(db.GetUserByUUID(zero),Is.Null); Assert.That(db.GetUserByUUID(user4),Is.Null); } @@ -267,8 +267,6 @@ namespace OpenSim.Data.Tests Assert.That(homelookat,Is.EqualTo(u1a.HomeLookAt), "Assert.That(homelookat,Is.EqualTo(u1a.HomeLookAt))"); Assert.That(created,Is.EqualTo(u1a.Created), "Assert.That(created,Is.EqualTo(u1a.Created))"); Assert.That(lastlogin,Is.EqualTo(u1a.LastLogin), "Assert.That(lastlogin,Is.EqualTo(u1a.LastLogin))"); - // RootInventoryFolderID is not tested because it is saved in SQLite, - // but not in MySQL Assert.That(userinvuri,Is.EqualTo(u1a.UserInventoryURI), "Assert.That(userinvuri,Is.EqualTo(u1a.UserInventoryURI))"); Assert.That(userasseturi,Is.EqualTo(u1a.UserAssetURI), "Assert.That(userasseturi,Is.EqualTo(u1a.UserAssetURI))"); Assert.That(candomask,Is.EqualTo(u1a.CanDoMask), "Assert.That(candomask,Is.EqualTo(u1a.CanDoMask))"); @@ -367,8 +365,6 @@ namespace OpenSim.Data.Tests Assert.That(homelookat,Is.EqualTo(u1a.HomeLookAt), "Assert.That(homelookat,Is.EqualTo(u1a.HomeLookAt))"); Assert.That(created,Is.EqualTo(u1a.Created), "Assert.That(created,Is.EqualTo(u1a.Created))"); Assert.That(lastlogin,Is.EqualTo(u1a.LastLogin), "Assert.That(lastlogin,Is.EqualTo(u1a.LastLogin))"); - // RootInventoryFolderID is not tested because it is saved in SQLite, - // but not in MySQL Assert.That(userasseturi,Is.EqualTo(u1a.UserAssetURI), "Assert.That(userasseturi,Is.EqualTo(u1a.UserAssetURI))"); Assert.That(candomask,Is.EqualTo(u1a.CanDoMask), "Assert.That(candomask,Is.EqualTo(u1a.CanDoMask))"); Assert.That(wantdomask,Is.EqualTo(u1a.WantDoMask), "Assert.That(wantdomask,Is.EqualTo(u1a.WantDoMask))"); @@ -395,7 +391,6 @@ namespace OpenSim.Data.Tests Assert.That(u1a, Constraints.PropertyCompareConstraint(u) .IgnoreProperty(x=>x.HomeRegionX) .IgnoreProperty(x=>x.HomeRegionY) - .IgnoreProperty(x=>x.RootInventoryFolderID) ); } -- cgit v1.1