diff options
author | Kunnis | 2009-12-05 09:54:33 -0600 |
---|---|---|
committer | Melanie | 2009-12-06 03:57:15 +0000 |
commit | 4c61fcfc401cdf08f5027e3bce21c4b465711c60 (patch) | |
tree | 8f32d613f2eb0ddcc9ec68afa06542a45dbd556d /OpenSim/Data | |
parent | Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff) | |
download | opensim-SC-4c61fcfc401cdf08f5027e3bce21c4b465711c60.zip opensim-SC-4c61fcfc401cdf08f5027e3bce21c4b465711c60.tar.gz opensim-SC-4c61fcfc401cdf08f5027e3bce21c4b465711c60.tar.bz2 opensim-SC-4c61fcfc401cdf08f5027e3bce21c4b465711c60.tar.xz |
Getting rid of the dead field RootInventoryFolderId on UserProfileData, It's not even stored in mysql.
Signed-off-by: Melanie <melanie@t-data.com>
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteUserData.cs | 7 | ||||
-rw-r--r-- | OpenSim/Data/Tests/BasicUserTest.cs | 9 |
2 files changed, 7 insertions, 9 deletions
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 | |||
819 | SQLiteUtil.createCol(users, "homeLookAtZ", typeof (Double)); | 819 | SQLiteUtil.createCol(users, "homeLookAtZ", typeof (Double)); |
820 | SQLiteUtil.createCol(users, "created", typeof (Int32)); | 820 | SQLiteUtil.createCol(users, "created", typeof (Int32)); |
821 | SQLiteUtil.createCol(users, "lastLogin", typeof (Int32)); | 821 | SQLiteUtil.createCol(users, "lastLogin", typeof (Int32)); |
822 | |||
823 | //TODO: Please delete this column. It's now a brick | ||
822 | SQLiteUtil.createCol(users, "rootInventoryFolderID", typeof (String)); | 824 | SQLiteUtil.createCol(users, "rootInventoryFolderID", typeof (String)); |
825 | |||
823 | SQLiteUtil.createCol(users, "userInventoryURI", typeof (String)); | 826 | SQLiteUtil.createCol(users, "userInventoryURI", typeof (String)); |
824 | SQLiteUtil.createCol(users, "userAssetURI", typeof (String)); | 827 | SQLiteUtil.createCol(users, "userAssetURI", typeof (String)); |
825 | SQLiteUtil.createCol(users, "profileCanDoMask", typeof (Int32)); | 828 | SQLiteUtil.createCol(users, "profileCanDoMask", typeof (Int32)); |
@@ -980,7 +983,6 @@ namespace OpenSim.Data.SQLite | |||
980 | 983 | ||
981 | user.Created = Convert.ToInt32(row["created"]); | 984 | user.Created = Convert.ToInt32(row["created"]); |
982 | user.LastLogin = Convert.ToInt32(row["lastLogin"]); | 985 | user.LastLogin = Convert.ToInt32(row["lastLogin"]); |
983 | user.RootInventoryFolderID = new UUID((String) row["rootInventoryFolderID"]); | ||
984 | user.UserInventoryURI = (String) row["userInventoryURI"]; | 986 | user.UserInventoryURI = (String) row["userInventoryURI"]; |
985 | user.UserAssetURI = (String) row["userAssetURI"]; | 987 | user.UserAssetURI = (String) row["userAssetURI"]; |
986 | user.CanDoMask = Convert.ToUInt32(row["profileCanDoMask"]); | 988 | user.CanDoMask = Convert.ToUInt32(row["profileCanDoMask"]); |
@@ -1026,7 +1028,8 @@ namespace OpenSim.Data.SQLite | |||
1026 | 1028 | ||
1027 | row["created"] = user.Created; | 1029 | row["created"] = user.Created; |
1028 | row["lastLogin"] = user.LastLogin; | 1030 | row["lastLogin"] = user.LastLogin; |
1029 | row["rootInventoryFolderID"] = user.RootInventoryFolderID.ToString(); | 1031 | //TODO: Get rid of rootInventoryFolderID in a safe way. |
1032 | row["rootInventoryFolderID"] = UUID.Zero.ToString(); | ||
1030 | row["userInventoryURI"] = user.UserInventoryURI; | 1033 | row["userInventoryURI"] = user.UserInventoryURI; |
1031 | row["userAssetURI"] = user.UserAssetURI; | 1034 | row["userAssetURI"] = user.UserAssetURI; |
1032 | row["profileCanDoMask"] = user.CanDoMask; | 1035 | 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 | |||
170 | { | 170 | { |
171 | UserProfileData u0 = NewUser(zero,fname0,lname0); | 171 | UserProfileData u0 = NewUser(zero,fname0,lname0); |
172 | UserProfileData u4 = NewUser(user4,fname2,lname2); | 172 | UserProfileData u4 = NewUser(user4,fname2,lname2); |
173 | db.AddNewUserProfile(u0); | 173 | db.AddNewUserProfile(u0); //UserID 0 should fail to save. |
174 | db.AddNewUserProfile(u4); | 174 | db.AddNewUserProfile(u4); //The first name and last name are already in use (from T010), so this should fail too |
175 | Assert.That(db.GetUserByUUID(zero),Is.Null); | 175 | Assert.That(db.GetUserByUUID(zero),Is.Null); |
176 | Assert.That(db.GetUserByUUID(user4),Is.Null); | 176 | Assert.That(db.GetUserByUUID(user4),Is.Null); |
177 | } | 177 | } |
@@ -267,8 +267,6 @@ namespace OpenSim.Data.Tests | |||
267 | Assert.That(homelookat,Is.EqualTo(u1a.HomeLookAt), "Assert.That(homelookat,Is.EqualTo(u1a.HomeLookAt))"); | 267 | Assert.That(homelookat,Is.EqualTo(u1a.HomeLookAt), "Assert.That(homelookat,Is.EqualTo(u1a.HomeLookAt))"); |
268 | Assert.That(created,Is.EqualTo(u1a.Created), "Assert.That(created,Is.EqualTo(u1a.Created))"); | 268 | Assert.That(created,Is.EqualTo(u1a.Created), "Assert.That(created,Is.EqualTo(u1a.Created))"); |
269 | Assert.That(lastlogin,Is.EqualTo(u1a.LastLogin), "Assert.That(lastlogin,Is.EqualTo(u1a.LastLogin))"); | 269 | Assert.That(lastlogin,Is.EqualTo(u1a.LastLogin), "Assert.That(lastlogin,Is.EqualTo(u1a.LastLogin))"); |
270 | // RootInventoryFolderID is not tested because it is saved in SQLite, | ||
271 | // but not in MySQL | ||
272 | Assert.That(userinvuri,Is.EqualTo(u1a.UserInventoryURI), "Assert.That(userinvuri,Is.EqualTo(u1a.UserInventoryURI))"); | 270 | Assert.That(userinvuri,Is.EqualTo(u1a.UserInventoryURI), "Assert.That(userinvuri,Is.EqualTo(u1a.UserInventoryURI))"); |
273 | Assert.That(userasseturi,Is.EqualTo(u1a.UserAssetURI), "Assert.That(userasseturi,Is.EqualTo(u1a.UserAssetURI))"); | 271 | Assert.That(userasseturi,Is.EqualTo(u1a.UserAssetURI), "Assert.That(userasseturi,Is.EqualTo(u1a.UserAssetURI))"); |
274 | Assert.That(candomask,Is.EqualTo(u1a.CanDoMask), "Assert.That(candomask,Is.EqualTo(u1a.CanDoMask))"); | 272 | Assert.That(candomask,Is.EqualTo(u1a.CanDoMask), "Assert.That(candomask,Is.EqualTo(u1a.CanDoMask))"); |
@@ -367,8 +365,6 @@ namespace OpenSim.Data.Tests | |||
367 | Assert.That(homelookat,Is.EqualTo(u1a.HomeLookAt), "Assert.That(homelookat,Is.EqualTo(u1a.HomeLookAt))"); | 365 | Assert.That(homelookat,Is.EqualTo(u1a.HomeLookAt), "Assert.That(homelookat,Is.EqualTo(u1a.HomeLookAt))"); |
368 | Assert.That(created,Is.EqualTo(u1a.Created), "Assert.That(created,Is.EqualTo(u1a.Created))"); | 366 | Assert.That(created,Is.EqualTo(u1a.Created), "Assert.That(created,Is.EqualTo(u1a.Created))"); |
369 | Assert.That(lastlogin,Is.EqualTo(u1a.LastLogin), "Assert.That(lastlogin,Is.EqualTo(u1a.LastLogin))"); | 367 | Assert.That(lastlogin,Is.EqualTo(u1a.LastLogin), "Assert.That(lastlogin,Is.EqualTo(u1a.LastLogin))"); |
370 | // RootInventoryFolderID is not tested because it is saved in SQLite, | ||
371 | // but not in MySQL | ||
372 | Assert.That(userasseturi,Is.EqualTo(u1a.UserAssetURI), "Assert.That(userasseturi,Is.EqualTo(u1a.UserAssetURI))"); | 368 | Assert.That(userasseturi,Is.EqualTo(u1a.UserAssetURI), "Assert.That(userasseturi,Is.EqualTo(u1a.UserAssetURI))"); |
373 | Assert.That(candomask,Is.EqualTo(u1a.CanDoMask), "Assert.That(candomask,Is.EqualTo(u1a.CanDoMask))"); | 369 | Assert.That(candomask,Is.EqualTo(u1a.CanDoMask), "Assert.That(candomask,Is.EqualTo(u1a.CanDoMask))"); |
374 | Assert.That(wantdomask,Is.EqualTo(u1a.WantDoMask), "Assert.That(wantdomask,Is.EqualTo(u1a.WantDoMask))"); | 370 | Assert.That(wantdomask,Is.EqualTo(u1a.WantDoMask), "Assert.That(wantdomask,Is.EqualTo(u1a.WantDoMask))"); |
@@ -395,7 +391,6 @@ namespace OpenSim.Data.Tests | |||
395 | Assert.That(u1a, Constraints.PropertyCompareConstraint(u) | 391 | Assert.That(u1a, Constraints.PropertyCompareConstraint(u) |
396 | .IgnoreProperty(x=>x.HomeRegionX) | 392 | .IgnoreProperty(x=>x.HomeRegionX) |
397 | .IgnoreProperty(x=>x.HomeRegionY) | 393 | .IgnoreProperty(x=>x.HomeRegionY) |
398 | .IgnoreProperty(x=>x.RootInventoryFolderID) | ||
399 | ); | 394 | ); |
400 | } | 395 | } |
401 | 396 | ||