aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/MySQL')
-rw-r--r--OpenSim/Data/MySQL/MySQLUserData.cs18
-rw-r--r--OpenSim/Data/MySQL/Resources/CreateAvatarAppearance.sql (renamed from OpenSim/Data/MySQL/Resources/AvatarAppearance.sql)0
2 files changed, 18 insertions, 0 deletions
diff --git a/OpenSim/Data/MySQL/MySQLUserData.cs b/OpenSim/Data/MySQL/MySQLUserData.cs
index f7d5659..56bdcbf 100644
--- a/OpenSim/Data/MySQL/MySQLUserData.cs
+++ b/OpenSim/Data/MySQL/MySQLUserData.cs
@@ -54,6 +54,7 @@ namespace OpenSim.Data.MySQL
54 private string m_agentsTableName; 54 private string m_agentsTableName;
55 private string m_usersTableName; 55 private string m_usersTableName;
56 private string m_userFriendsTableName; 56 private string m_userFriendsTableName;
57 private string m_appearanceTableName = "avatarappearance";
57 private string m_connectString; 58 private string m_connectString;
58 private BaseDatabaseConnector m_databaseMapper; 59 private BaseDatabaseConnector m_databaseMapper;
59 private AppearanceTableMapper m_appearanceMapper; 60 private AppearanceTableMapper m_appearanceMapper;
@@ -130,11 +131,13 @@ namespace OpenSim.Data.MySQL
130 tableList[m_agentsTableName] = null; 131 tableList[m_agentsTableName] = null;
131 tableList[m_usersTableName] = null; 132 tableList[m_usersTableName] = null;
132 tableList[m_userFriendsTableName] = null; 133 tableList[m_userFriendsTableName] = null;
134 tableList[m_appearanceTableName] = null;
133 database.GetTableVersion(tableList); 135 database.GetTableVersion(tableList);
134 136
135 UpgradeAgentsTable(tableList[m_agentsTableName]); 137 UpgradeAgentsTable(tableList[m_agentsTableName]);
136 UpgradeUsersTable(tableList[m_usersTableName]); 138 UpgradeUsersTable(tableList[m_usersTableName]);
137 UpgradeFriendsTable(tableList[m_userFriendsTableName]); 139 UpgradeFriendsTable(tableList[m_userFriendsTableName]);
140 UpgradeAppearanceTable(tableList[m_appearanceTableName]);
138 } 141 }
139 142
140 /// <summary> 143 /// <summary>
@@ -188,6 +191,21 @@ namespace OpenSim.Data.MySQL
188 } 191 }
189 } 192 }
190 193
194 /// <summary>
195 /// Create or upgrade the table if necessary
196 /// </summary>
197 /// <param name="oldVersion">A null indicates that the table does not
198 /// currently exist</param>
199 private void UpgradeAppearanceTable(string oldVersion)
200 {
201 // null as the version, indicates that the table didn't exist
202 if (oldVersion == null)
203 {
204 database.ExecuteResourceSql("CreateAvatarAppearance.sql");
205 return;
206 }
207 }
208
191 #endregion 209 #endregion
192 210
193 // see IUserData 211 // see IUserData
diff --git a/OpenSim/Data/MySQL/Resources/AvatarAppearance.sql b/OpenSim/Data/MySQL/Resources/CreateAvatarAppearance.sql
index 0deb099..0deb099 100644
--- a/OpenSim/Data/MySQL/Resources/AvatarAppearance.sql
+++ b/OpenSim/Data/MySQL/Resources/CreateAvatarAppearance.sql