diff options
Diffstat (limited to 'OpenSim/Data/MySQL')
29 files changed, 194 insertions, 321 deletions
diff --git a/OpenSim/Data/MySQL/MySQLEstateData.cs b/OpenSim/Data/MySQL/MySQLEstateData.cs index eeedf02..2406ee6 100644 --- a/OpenSim/Data/MySQL/MySQLEstateData.cs +++ b/OpenSim/Data/MySQL/MySQLEstateData.cs | |||
@@ -285,7 +285,7 @@ namespace OpenSim.Data.MySQL | |||
285 | 285 | ||
286 | using (MySqlCommand cmd = dbcon.CreateCommand()) | 286 | using (MySqlCommand cmd = dbcon.CreateCommand()) |
287 | { | 287 | { |
288 | cmd.CommandText = "select bannedUUID from estateban where EstateID = ?EstateID"; | 288 | cmd.CommandText = "select * from estateban where EstateID = ?EstateID"; |
289 | cmd.Parameters.AddWithValue("?EstateID", es.EstateID); | 289 | cmd.Parameters.AddWithValue("?EstateID", es.EstateID); |
290 | 290 | ||
291 | using (IDataReader r = cmd.ExecuteReader()) | 291 | using (IDataReader r = cmd.ExecuteReader()) |
@@ -293,13 +293,11 @@ namespace OpenSim.Data.MySQL | |||
293 | while (r.Read()) | 293 | while (r.Read()) |
294 | { | 294 | { |
295 | EstateBan eb = new EstateBan(); | 295 | EstateBan eb = new EstateBan(); |
296 | 296 | eb.BannedUserID = DBGuid.FromDB(r["bannedUUID"]); ; | |
297 | UUID uuid = new UUID(); | ||
298 | UUID.TryParse(r["bannedUUID"].ToString(), out uuid); | ||
299 | |||
300 | eb.BannedUserID = uuid; | ||
301 | eb.BannedHostAddress = "0.0.0.0"; | 297 | eb.BannedHostAddress = "0.0.0.0"; |
302 | eb.BannedHostIPMask = "0.0.0.0"; | 298 | eb.BannedHostIPMask = "0.0.0.0"; |
299 | eb.BanningUserID = DBGuid.FromDB(r["banningUUID"]); | ||
300 | eb.BanTime = Convert.ToInt32(r["banTime"]); | ||
303 | es.AddBan(eb); | 301 | es.AddBan(eb); |
304 | } | 302 | } |
305 | } | 303 | } |
@@ -323,12 +321,14 @@ namespace OpenSim.Data.MySQL | |||
323 | 321 | ||
324 | cmd.Parameters.Clear(); | 322 | cmd.Parameters.Clear(); |
325 | 323 | ||
326 | cmd.CommandText = "insert into estateban (EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask) values ( ?EstateID, ?bannedUUID, '', '', '' )"; | 324 | cmd.CommandText = "insert into estateban (EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask, banningUUID, banTime) values ( ?EstateID, ?bannedUUID, '', '', '', ?banningUUID, ?banTime)"; |
327 | 325 | ||
328 | foreach (EstateBan b in es.EstateBans) | 326 | foreach (EstateBan b in es.EstateBans) |
329 | { | 327 | { |
330 | cmd.Parameters.AddWithValue("?EstateID", es.EstateID.ToString()); | 328 | cmd.Parameters.AddWithValue("?EstateID", es.EstateID.ToString()); |
331 | cmd.Parameters.AddWithValue("?bannedUUID", b.BannedUserID.ToString()); | 329 | cmd.Parameters.AddWithValue("?bannedUUID", b.BannedUserID.ToString()); |
330 | cmd.Parameters.AddWithValue("?banningUUID", b.BanningUserID.ToString()); | ||
331 | cmd.Parameters.AddWithValue("?banTime", b.BanTime); | ||
332 | 332 | ||
333 | cmd.ExecuteNonQuery(); | 333 | cmd.ExecuteNonQuery(); |
334 | cmd.Parameters.Clear(); | 334 | cmd.Parameters.Clear(); |
diff --git a/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs b/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs index 9bd3c0c..ce228b5 100644 --- a/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs +++ b/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs | |||
@@ -29,11 +29,9 @@ using System; | |||
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Data; | 30 | using System.Data; |
31 | using System.Reflection; | 31 | using System.Reflection; |
32 | using log4net; | 32 | using System.Text; |
33 | using MySql.Data.MySqlClient; | 33 | using MySql.Data.MySqlClient; |
34 | using OpenMetaverse; | 34 | using OpenMetaverse; |
35 | using OpenSim.Framework; | ||
36 | using OpenSim.Region.Framework.Interfaces; | ||
37 | 35 | ||
38 | namespace OpenSim.Data.MySQL | 36 | namespace OpenSim.Data.MySQL |
39 | { | 37 | { |
@@ -118,8 +116,40 @@ namespace OpenSim.Data.MySQL | |||
118 | } | 116 | } |
119 | 117 | ||
120 | public virtual T[] Get(string field, string key) | 118 | public virtual T[] Get(string field, string key) |
119 | { | ||
120 | using (MySqlCommand cmd = new MySqlCommand()) | ||
121 | { | ||
122 | cmd.Parameters.AddWithValue(field, key); | ||
123 | cmd.CommandText = string.Format("select * from {0} where `{1}` = ?{1}", m_Realm, field); | ||
124 | return DoQuery(cmd); | ||
125 | } | ||
126 | } | ||
127 | |||
128 | public virtual T[] Get(string field, string[] keys) | ||
121 | { | 129 | { |
122 | return Get(new string[] { field }, new string[] { key }); | 130 | int flen = keys.Length; |
131 | if(flen == 0) | ||
132 | return new T[0]; | ||
133 | |||
134 | int flast = flen - 1; | ||
135 | StringBuilder sb = new StringBuilder(1024); | ||
136 | sb.AppendFormat("select * from {0} where {1} IN (?", m_Realm, field); | ||
137 | using (MySqlCommand cmd = new MySqlCommand()) | ||
138 | { | ||
139 | for (int i = 0 ; i < flen ; i++) | ||
140 | { | ||
141 | string fname = field + i.ToString(); | ||
142 | cmd.Parameters.AddWithValue(fname, keys[i]); | ||
143 | |||
144 | sb.Append(fname); | ||
145 | if(i < flast) | ||
146 | sb.Append(",?"); | ||
147 | else | ||
148 | sb.Append(")"); | ||
149 | } | ||
150 | cmd.CommandText = sb.ToString(); | ||
151 | return DoQuery(cmd); | ||
152 | } | ||
123 | } | 153 | } |
124 | 154 | ||
125 | public virtual T[] Get(string[] fields, string[] keys) | 155 | public virtual T[] Get(string[] fields, string[] keys) |
@@ -129,25 +159,27 @@ namespace OpenSim.Data.MySQL | |||
129 | 159 | ||
130 | public virtual T[] Get(string[] fields, string[] keys, string options) | 160 | public virtual T[] Get(string[] fields, string[] keys, string options) |
131 | { | 161 | { |
132 | if (fields.Length != keys.Length) | 162 | int flen = fields.Length; |
163 | if (flen == 0 || flen != keys.Length) | ||
133 | return new T[0]; | 164 | return new T[0]; |
134 | 165 | ||
135 | List<string> terms = new List<string>(); | 166 | int flast = flen - 1; |
167 | StringBuilder sb = new StringBuilder(1024); | ||
168 | sb.AppendFormat("select * from {0} where ", m_Realm); | ||
136 | 169 | ||
137 | using (MySqlCommand cmd = new MySqlCommand()) | 170 | using (MySqlCommand cmd = new MySqlCommand()) |
138 | { | 171 | { |
139 | for (int i = 0 ; i < fields.Length ; i++) | 172 | for (int i = 0 ; i < flen ; i++) |
140 | { | 173 | { |
141 | cmd.Parameters.AddWithValue(fields[i], keys[i]); | 174 | cmd.Parameters.AddWithValue(fields[i], keys[i]); |
142 | terms.Add("`" + fields[i] + "` = ?" + fields[i]); | 175 | if(i < flast) |
176 | sb.AppendFormat("`{0}` = ?{0} and ", fields[i]); | ||
177 | else | ||
178 | sb.AppendFormat("`{0}` = ?{0} ", fields[i]); | ||
143 | } | 179 | } |
144 | 180 | ||
145 | string where = String.Join(" and ", terms.ToArray()); | 181 | sb.Append(options); |
146 | 182 | cmd.CommandText = sb.ToString(); | |
147 | string query = String.Format("select * from {0} where {1} {2}", | ||
148 | m_Realm, where, options); | ||
149 | |||
150 | cmd.CommandText = query; | ||
151 | 183 | ||
152 | return DoQuery(cmd); | 184 | return DoQuery(cmd); |
153 | } | 185 | } |
@@ -204,7 +236,7 @@ namespace OpenSim.Data.MySQL | |||
204 | if (m_Fields[name].FieldType == typeof(bool)) | 236 | if (m_Fields[name].FieldType == typeof(bool)) |
205 | { | 237 | { |
206 | int v = Convert.ToInt32(reader[name]); | 238 | int v = Convert.ToInt32(reader[name]); |
207 | m_Fields[name].SetValue(row, v != 0 ? true : false); | 239 | m_Fields[name].SetValue(row, v != 0); |
208 | } | 240 | } |
209 | else if (m_Fields[name].FieldType == typeof(UUID)) | 241 | else if (m_Fields[name].FieldType == typeof(UUID)) |
210 | { | 242 | { |
@@ -323,25 +355,26 @@ namespace OpenSim.Data.MySQL | |||
323 | // "[MYSQL GENERIC TABLE HANDLER]: Delete(string[] fields, string[] keys) invoked with {0}:{1}", | 355 | // "[MYSQL GENERIC TABLE HANDLER]: Delete(string[] fields, string[] keys) invoked with {0}:{1}", |
324 | // string.Join(",", fields), string.Join(",", keys)); | 356 | // string.Join(",", fields), string.Join(",", keys)); |
325 | 357 | ||
326 | if (fields.Length != keys.Length) | 358 | int flen = fields.Length; |
359 | if (flen == 0 || flen != keys.Length) | ||
327 | return false; | 360 | return false; |
328 | 361 | ||
329 | List<string> terms = new List<string>(); | 362 | int flast = flen - 1; |
363 | StringBuilder sb = new StringBuilder(1024); | ||
364 | sb.AppendFormat("delete from {0} where ", m_Realm); | ||
330 | 365 | ||
331 | using (MySqlCommand cmd = new MySqlCommand()) | 366 | using (MySqlCommand cmd = new MySqlCommand()) |
332 | { | 367 | { |
333 | for (int i = 0 ; i < fields.Length ; i++) | 368 | for (int i = 0 ; i < flen ; i++) |
334 | { | 369 | { |
335 | cmd.Parameters.AddWithValue(fields[i], keys[i]); | 370 | cmd.Parameters.AddWithValue(fields[i], keys[i]); |
336 | terms.Add("`" + fields[i] + "` = ?" + fields[i]); | 371 | if(i < flast) |
372 | sb.AppendFormat("`{0}` = ?{0} and ", fields[i]); | ||
373 | else | ||
374 | sb.AppendFormat("`{0}` = ?{0}", fields[i]); | ||
337 | } | 375 | } |
338 | 376 | ||
339 | string where = String.Join(" and ", terms.ToArray()); | 377 | cmd.CommandText = sb.ToString(); |
340 | |||
341 | string query = String.Format("delete from {0} where {1}", m_Realm, where); | ||
342 | |||
343 | cmd.CommandText = query; | ||
344 | |||
345 | return ExecuteNonQuery(cmd) > 0; | 378 | return ExecuteNonQuery(cmd) > 0; |
346 | } | 379 | } |
347 | } | 380 | } |
@@ -353,27 +386,27 @@ namespace OpenSim.Data.MySQL | |||
353 | 386 | ||
354 | public long GetCount(string[] fields, string[] keys) | 387 | public long GetCount(string[] fields, string[] keys) |
355 | { | 388 | { |
356 | if (fields.Length != keys.Length) | 389 | int flen = fields.Length; |
390 | if (flen == 0 || flen != keys.Length) | ||
357 | return 0; | 391 | return 0; |
358 | 392 | ||
359 | List<string> terms = new List<string>(); | 393 | int flast = flen - 1; |
394 | StringBuilder sb = new StringBuilder(1024); | ||
395 | sb.AppendFormat("select count(*) from {0} where ", m_Realm); | ||
360 | 396 | ||
361 | using (MySqlCommand cmd = new MySqlCommand()) | 397 | using (MySqlCommand cmd = new MySqlCommand()) |
362 | { | 398 | { |
363 | for (int i = 0; i < fields.Length; i++) | 399 | for (int i = 0 ; i < flen ; i++) |
364 | { | 400 | { |
365 | cmd.Parameters.AddWithValue(fields[i], keys[i]); | 401 | cmd.Parameters.AddWithValue(fields[i], keys[i]); |
366 | terms.Add("`" + fields[i] + "` = ?" + fields[i]); | 402 | if(i < flast) |
403 | sb.AppendFormat("`{0}` = ?{0} and ", fields[i]); | ||
404 | else | ||
405 | sb.AppendFormat("`{0}` = ?{0}", fields[i]); | ||
367 | } | 406 | } |
368 | 407 | ||
369 | string where = String.Join(" and ", terms.ToArray()); | 408 | cmd.CommandText = sb.ToString(); |
370 | 409 | object result = DoQueryScalar(cmd); | |
371 | string query = String.Format("select count(*) from {0} where {1}", | ||
372 | m_Realm, where); | ||
373 | |||
374 | cmd.CommandText = query; | ||
375 | |||
376 | Object result = DoQueryScalar(cmd); | ||
377 | 410 | ||
378 | return Convert.ToInt64(result); | 411 | return Convert.ToInt64(result); |
379 | } | 412 | } |
@@ -403,7 +436,7 @@ namespace OpenSim.Data.MySQL | |||
403 | dbcon.Open(); | 436 | dbcon.Open(); |
404 | cmd.Connection = dbcon; | 437 | cmd.Connection = dbcon; |
405 | 438 | ||
406 | Object ret = cmd.ExecuteScalar(); | 439 | object ret = cmd.ExecuteScalar(); |
407 | cmd.Connection = null; | 440 | cmd.Connection = null; |
408 | dbcon.Close(); | 441 | dbcon.Close(); |
409 | return ret; | 442 | return ret; |
diff --git a/OpenSim/Data/MySQL/MySQLGroupsData.cs b/OpenSim/Data/MySQL/MySQLGroupsData.cs index 4e73ee7..77cb2f4 100644 --- a/OpenSim/Data/MySQL/MySQLGroupsData.cs +++ b/OpenSim/Data/MySQL/MySQLGroupsData.cs | |||
@@ -90,7 +90,7 @@ namespace OpenSim.Data.MySQL | |||
90 | else | 90 | else |
91 | pattern = string.Format("Name LIKE '%{0}%'", MySqlHelper.EscapeString(pattern)); | 91 | pattern = string.Format("Name LIKE '%{0}%'", MySqlHelper.EscapeString(pattern)); |
92 | 92 | ||
93 | return m_Groups.Get(string.Format("ShowInList=1 AND ({0}) ORDER BY Name LIMIT 100", pattern)); | 93 | return m_Groups.Get(string.Format("ShowInList=1 AND ({0})", pattern)); |
94 | } | 94 | } |
95 | 95 | ||
96 | public bool DeleteGroup(UUID groupID) | 96 | public bool DeleteGroup(UUID groupID) |
diff --git a/OpenSim/Data/MySQL/MySQLPresenceData.cs b/OpenSim/Data/MySQL/MySQLPresenceData.cs index b9114eb..23d9683 100644 --- a/OpenSim/Data/MySQL/MySQLPresenceData.cs +++ b/OpenSim/Data/MySQL/MySQLPresenceData.cs | |||
@@ -119,4 +119,4 @@ namespace OpenSim.Data.MySQL | |||
119 | return true; | 119 | return true; |
120 | } | 120 | } |
121 | } | 121 | } |
122 | } \ No newline at end of file | 122 | } |
diff --git a/OpenSim/Data/MySQL/MySQLRaw.cs b/OpenSim/Data/MySQL/MySQLRaw.cs deleted file mode 100644 index bb8c96c..0000000 --- a/OpenSim/Data/MySQL/MySQLRaw.cs +++ /dev/null | |||
@@ -1,197 +0,0 @@ | |||
1 | // https://dev.mysql.com/doc/connector-net/en/ | ||
2 | |||
3 | |||
4 | using System; | ||
5 | using System.Collections; | ||
6 | using System.Collections.Generic; | ||
7 | using System.Data; | ||
8 | using System.Reflection; | ||
9 | using System.Text; | ||
10 | using log4net; | ||
11 | using MySql.Data.MySqlClient; | ||
12 | |||
13 | namespace OpenSim.Data.MySQL | ||
14 | { | ||
15 | public class MySQLRaw | ||
16 | { | ||
17 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
18 | private string m_connectString; | ||
19 | |||
20 | public MySQLRaw(string connect) | ||
21 | { | ||
22 | m_connectString = connect; | ||
23 | } | ||
24 | |||
25 | public int Count(string table) | ||
26 | { | ||
27 | return Count(table, ""); | ||
28 | } | ||
29 | public int Count(string table, string wher) | ||
30 | { | ||
31 | string query = "SELECT Count(*) FROM " + table; | ||
32 | if ("" != wher) | ||
33 | query = query + " WHERE " + wher; | ||
34 | int result = -1; | ||
35 | |||
36 | object r = doScalarQuery(query); | ||
37 | if (r != null) | ||
38 | result = Convert.ToInt32(r); | ||
39 | |||
40 | return result; | ||
41 | } | ||
42 | |||
43 | public List< Hashtable > Join(string table, string select, string join, string wher, string order) | ||
44 | { | ||
45 | if ("" == select) | ||
46 | select = "*"; | ||
47 | string query = "SELECT " + select + " FROM " + table; | ||
48 | if ("" != join) | ||
49 | query = query + " " + join; | ||
50 | if ("" != wher) | ||
51 | query = query + " WHERE " + wher; | ||
52 | if ("" != order) | ||
53 | query = query + " ORDER BY " + order; | ||
54 | |||
55 | using (MySqlConnection dbcon = new MySqlConnection(m_connectString)) | ||
56 | { | ||
57 | dbcon.Open(); | ||
58 | MySqlCommand cmd = new MySqlCommand(query, dbcon); | ||
59 | MySqlDataReader rdr = cmd.ExecuteReader(); | ||
60 | List<string> names = new List<string>(); | ||
61 | DataTable schema = rdr.GetSchemaTable(); | ||
62 | List< Hashtable > list = new List< Hashtable >(); | ||
63 | |||
64 | foreach (DataRow row in schema.Rows) | ||
65 | { | ||
66 | string tbl = ""; | ||
67 | string nm = ""; | ||
68 | string tp = ""; | ||
69 | foreach (DataColumn col in schema.Columns) | ||
70 | { | ||
71 | if ("BaseTableName" == col.ColumnName) tbl = row[col].ToString(); | ||
72 | if ("ColumnName" == col.ColumnName) nm = row[col].ToString(); | ||
73 | if ("DataType" == col.ColumnName) tp = row[col].ToString(); | ||
74 | } | ||
75 | names.Add(nm); | ||
76 | } | ||
77 | |||
78 | while (rdr.Read()) | ||
79 | { | ||
80 | Hashtable r = new Hashtable(); | ||
81 | foreach (string name in names) | ||
82 | { | ||
83 | r[name] = rdr[name]; | ||
84 | } | ||
85 | list.Add(r); | ||
86 | } | ||
87 | |||
88 | rdr.Close(); | ||
89 | dbcon.Close(); | ||
90 | return list; | ||
91 | } | ||
92 | } | ||
93 | |||
94 | public List< Hashtable > Select(string table, string select, string wher, string order) | ||
95 | { | ||
96 | if ("" == select) | ||
97 | select = "*"; | ||
98 | string query = "SELECT " + select + " FROM " + table; | ||
99 | if ("" != wher) | ||
100 | query = query + " WHERE " + wher; | ||
101 | if ("" != order) | ||
102 | query = query + " ORDER BY " + order; | ||
103 | |||
104 | using (MySqlConnection dbcon = new MySqlConnection(m_connectString)) | ||
105 | { | ||
106 | dbcon.Open(); | ||
107 | MySqlCommand cmd = new MySqlCommand(query, dbcon); | ||
108 | MySqlDataReader rdr = cmd.ExecuteReader(); | ||
109 | List<string> names = new List<string>(); | ||
110 | DataTable schema = rdr.GetSchemaTable(); | ||
111 | List< Hashtable > list = new List< Hashtable >(); | ||
112 | |||
113 | foreach (DataRow row in schema.Rows) | ||
114 | { | ||
115 | string tbl = ""; | ||
116 | string nm = ""; | ||
117 | string tp = ""; | ||
118 | foreach (DataColumn col in schema.Columns) | ||
119 | { | ||
120 | if ("BaseTableName" == col.ColumnName) tbl = row[col].ToString(); | ||
121 | if ("ColumnName" == col.ColumnName) nm = row[col].ToString(); | ||
122 | if ("DataType" == col.ColumnName) tp = row[col].ToString(); | ||
123 | } | ||
124 | names.Add(nm); | ||
125 | } | ||
126 | |||
127 | while (rdr.Read()) | ||
128 | { | ||
129 | Hashtable r = new Hashtable(); | ||
130 | foreach (string name in names) | ||
131 | { | ||
132 | r[name] = rdr[name]; | ||
133 | } | ||
134 | list.Add(r); | ||
135 | } | ||
136 | |||
137 | rdr.Close(); | ||
138 | dbcon.Close(); | ||
139 | return list; | ||
140 | } | ||
141 | } | ||
142 | |||
143 | private object doScalarQuery(string query) | ||
144 | { | ||
145 | try | ||
146 | { | ||
147 | using (MySqlConnection dbcon = new MySqlConnection(m_connectString)) | ||
148 | { | ||
149 | dbcon.Open(); | ||
150 | MySqlCommand cmd = new MySqlCommand(query, dbcon); | ||
151 | Object ret = cmd.ExecuteScalar(); | ||
152 | dbcon.Close(); | ||
153 | return ret; | ||
154 | } | ||
155 | } | ||
156 | catch (MySqlException e) | ||
157 | { | ||
158 | m_log.ErrorFormat("[MYSQL RAW]: Problem connecting to the database {0}", e.Message); | ||
159 | return null; | ||
160 | } | ||
161 | } | ||
162 | |||
163 | private void doNonQuery(string query) | ||
164 | { | ||
165 | using (MySqlConnection dbcon = new MySqlConnection(m_connectString)) | ||
166 | { | ||
167 | dbcon.Open(); | ||
168 | MySqlCommand cmd = new MySqlCommand(query, dbcon); | ||
169 | cmd.ExecuteNonQuery(); | ||
170 | dbcon.Close(); | ||
171 | } | ||
172 | } | ||
173 | |||
174 | public void Insert(string table) | ||
175 | { | ||
176 | string query = "INSERT INTO " + table + " (name, age) VALUES('John Smith', '33')"; | ||
177 | doNonQuery(query); | ||
178 | } | ||
179 | |||
180 | public void Update(string table, string wher) | ||
181 | { | ||
182 | string query = "UPDATE " + table + " SET name='Joe', age='22'"; | ||
183 | if ("" != wher) | ||
184 | query = query + " WHERE " + wher; | ||
185 | doNonQuery(query); | ||
186 | } | ||
187 | |||
188 | public void Delete(string table, string wher) | ||
189 | { | ||
190 | string query = "DELETE FROM " + table; | ||
191 | if ("" != wher) | ||
192 | query = query + " WHERE " + wher; | ||
193 | doNonQuery(query); | ||
194 | } | ||
195 | |||
196 | } | ||
197 | } | ||
diff --git a/OpenSim/Data/MySQL/MySQLRegionData.cs b/OpenSim/Data/MySQL/MySQLRegionData.cs index 46df421..9115e93 100644 --- a/OpenSim/Data/MySQL/MySQLRegionData.cs +++ b/OpenSim/Data/MySQL/MySQLRegionData.cs | |||
@@ -81,17 +81,15 @@ namespace OpenSim.Data.MySQL | |||
81 | } | 81 | } |
82 | } | 82 | } |
83 | 83 | ||
84 | public RegionData Get(int posX, int posY, UUID scopeID) | 84 | public RegionData GetSpecific(string regionName, UUID scopeID) |
85 | { | 85 | { |
86 | /* fixed size regions | 86 | string command = "select * from `" + m_Realm + "` where regionName = ?regionName"; |
87 | string command = "select * from `"+m_Realm+"` where locX = ?posX and locY = ?posY"; | ||
88 | if (scopeID != UUID.Zero) | 87 | if (scopeID != UUID.Zero) |
89 | command += " and ScopeID = ?scopeID"; | 88 | command += " and ScopeID = ?scopeID"; |
90 | 89 | ||
91 | using (MySqlCommand cmd = new MySqlCommand(command)) | 90 | using (MySqlCommand cmd = new MySqlCommand(command)) |
92 | { | 91 | { |
93 | cmd.Parameters.AddWithValue("?posX", posX.ToString()); | 92 | cmd.Parameters.AddWithValue("?regionName", regionName); |
94 | cmd.Parameters.AddWithValue("?posY", posY.ToString()); | ||
95 | cmd.Parameters.AddWithValue("?scopeID", scopeID.ToString()); | 93 | cmd.Parameters.AddWithValue("?scopeID", scopeID.ToString()); |
96 | 94 | ||
97 | List<RegionData> ret = RunCommand(cmd); | 95 | List<RegionData> ret = RunCommand(cmd); |
@@ -100,8 +98,11 @@ namespace OpenSim.Data.MySQL | |||
100 | 98 | ||
101 | return ret[0]; | 99 | return ret[0]; |
102 | } | 100 | } |
103 | */ | 101 | |
104 | // extend database search for maximum region size area | 102 | } |
103 | |||
104 | public RegionData Get(int posX, int posY, UUID scopeID) | ||
105 | { | ||
105 | string command = "select * from `" + m_Realm + "` where locX between ?startX and ?endX and locY between ?startY and ?endY"; | 106 | string command = "select * from `" + m_Realm + "` where locX between ?startX and ?endX and locY between ?startY and ?endY"; |
106 | if (scopeID != UUID.Zero) | 107 | if (scopeID != UUID.Zero) |
107 | command += " and ScopeID = ?scopeID"; | 108 | command += " and ScopeID = ?scopeID"; |
diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs index e754522..3db30d8 100644 --- a/OpenSim/Data/MySQL/MySQLSimulationData.cs +++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs | |||
@@ -189,7 +189,7 @@ namespace OpenSim.Data.MySQL | |||
189 | "AttachedPosY, AttachedPosZ, " + | 189 | "AttachedPosY, AttachedPosZ, " + |
190 | "PhysicsShapeType, Density, GravityModifier, " + | 190 | "PhysicsShapeType, Density, GravityModifier, " + |
191 | "Friction, Restitution, Vehicle, PhysInertia, DynAttrs, " + | 191 | "Friction, Restitution, Vehicle, PhysInertia, DynAttrs, " + |
192 | "RotationAxisLocks" + | 192 | "RotationAxisLocks, sopanims" + |
193 | ") values (" + "?UUID, " + | 193 | ") values (" + "?UUID, " + |
194 | "?CreationDate, ?Name, ?Text, " + | 194 | "?CreationDate, ?Name, ?Text, " + |
195 | "?Description, ?SitName, ?TouchName, " + | 195 | "?Description, ?SitName, ?TouchName, " + |
@@ -226,7 +226,7 @@ namespace OpenSim.Data.MySQL | |||
226 | "?AttachedPosY, ?AttachedPosZ, " + | 226 | "?AttachedPosY, ?AttachedPosZ, " + |
227 | "?PhysicsShapeType, ?Density, ?GravityModifier, " + | 227 | "?PhysicsShapeType, ?Density, ?GravityModifier, " + |
228 | "?Friction, ?Restitution, ?Vehicle, ?PhysInertia, ?DynAttrs," + | 228 | "?Friction, ?Restitution, ?Vehicle, ?PhysInertia, ?DynAttrs," + |
229 | "?RotationAxisLocks)"; | 229 | "?RotationAxisLocks, ?sopanims)"; |
230 | 230 | ||
231 | FillPrimCommand(cmd, prim, obj.UUID, regionUUID); | 231 | FillPrimCommand(cmd, prim, obj.UUID, regionUUID); |
232 | 232 | ||
@@ -598,7 +598,7 @@ namespace OpenSim.Data.MySQL | |||
598 | // Legacy entry point for when terrain was always a 256x256 hieghtmap | 598 | // Legacy entry point for when terrain was always a 256x256 hieghtmap |
599 | public void StoreTerrain(double[,] ter, UUID regionID) | 599 | public void StoreTerrain(double[,] ter, UUID regionID) |
600 | { | 600 | { |
601 | StoreTerrain(new HeightmapTerrainData(ter), regionID); | 601 | StoreTerrain(new TerrainData(ter), regionID); |
602 | } | 602 | } |
603 | 603 | ||
604 | public void StoreTerrain(TerrainData terrData, UUID regionID) | 604 | public void StoreTerrain(TerrainData terrData, UUID regionID) |
@@ -1403,7 +1403,10 @@ namespace OpenSim.Data.MySQL | |||
1403 | 1403 | ||
1404 | prim.Sound = DBGuid.FromDB(row["LoopedSound"].ToString()); | 1404 | prim.Sound = DBGuid.FromDB(row["LoopedSound"].ToString()); |
1405 | prim.SoundGain = (float)(double)row["LoopedSoundGain"]; | 1405 | prim.SoundGain = (float)(double)row["LoopedSoundGain"]; |
1406 | prim.SoundFlags = 1; // If it's persisted at all, it's looped | 1406 | if (prim.Sound != UUID.Zero) |
1407 | prim.SoundFlags = 1; // If it's persisted at all, it's looped | ||
1408 | else | ||
1409 | prim.SoundFlags = 0; | ||
1407 | 1410 | ||
1408 | if (!(row["TextureAnimation"] is DBNull)) | 1411 | if (!(row["TextureAnimation"] is DBNull)) |
1409 | prim.TextureAnimation = (byte[])row["TextureAnimation"]; | 1412 | prim.TextureAnimation = (byte[])row["TextureAnimation"]; |
@@ -1463,7 +1466,7 @@ namespace OpenSim.Data.MySQL | |||
1463 | if (!(row["DynAttrs"] is System.DBNull)) | 1466 | if (!(row["DynAttrs"] is System.DBNull)) |
1464 | prim.DynAttrs = DAMap.FromXml((string)row["DynAttrs"]); | 1467 | prim.DynAttrs = DAMap.FromXml((string)row["DynAttrs"]); |
1465 | else | 1468 | else |
1466 | prim.DynAttrs = new DAMap(); | 1469 | prim.DynAttrs = null; |
1467 | 1470 | ||
1468 | if (!(row["KeyframeMotion"] is DBNull)) | 1471 | if (!(row["KeyframeMotion"] is DBNull)) |
1469 | { | 1472 | { |
@@ -1499,6 +1502,19 @@ namespace OpenSim.Data.MySQL | |||
1499 | pdata = PhysicsInertiaData.FromXml2(row["PhysInertia"].ToString()); | 1502 | pdata = PhysicsInertiaData.FromXml2(row["PhysInertia"].ToString()); |
1500 | prim.PhysicsInertia = pdata; | 1503 | prim.PhysicsInertia = pdata; |
1501 | 1504 | ||
1505 | if (!(row["sopanims"] is DBNull)) | ||
1506 | { | ||
1507 | Byte[] data = (byte[])row["sopanims"]; | ||
1508 | if (data.Length > 0) | ||
1509 | prim.DeSerializeAnimations(data); | ||
1510 | else | ||
1511 | prim.Animations = null; | ||
1512 | } | ||
1513 | else | ||
1514 | { | ||
1515 | prim.Animations = null; | ||
1516 | } | ||
1517 | |||
1502 | return prim; | 1518 | return prim; |
1503 | } | 1519 | } |
1504 | 1520 | ||
@@ -1867,7 +1883,7 @@ namespace OpenSim.Data.MySQL | |||
1867 | else | 1883 | else |
1868 | cmd.Parameters.AddWithValue("Vehicle", String.Empty); | 1884 | cmd.Parameters.AddWithValue("Vehicle", String.Empty); |
1869 | 1885 | ||
1870 | if (prim.DynAttrs.CountNamespaces > 0) | 1886 | if (prim.DynAttrs != null && prim.DynAttrs.CountNamespaces > 0) |
1871 | cmd.Parameters.AddWithValue("DynAttrs", prim.DynAttrs.ToXml()); | 1887 | cmd.Parameters.AddWithValue("DynAttrs", prim.DynAttrs.ToXml()); |
1872 | else | 1888 | else |
1873 | cmd.Parameters.AddWithValue("DynAttrs", null); | 1889 | cmd.Parameters.AddWithValue("DynAttrs", null); |
@@ -1878,6 +1894,11 @@ namespace OpenSim.Data.MySQL | |||
1878 | cmd.Parameters.AddWithValue("Friction", (double)prim.Friction); | 1894 | cmd.Parameters.AddWithValue("Friction", (double)prim.Friction); |
1879 | cmd.Parameters.AddWithValue("Restitution", (double)prim.Restitution); | 1895 | cmd.Parameters.AddWithValue("Restitution", (double)prim.Restitution); |
1880 | cmd.Parameters.AddWithValue("RotationAxisLocks", prim.RotationAxisLocks); | 1896 | cmd.Parameters.AddWithValue("RotationAxisLocks", prim.RotationAxisLocks); |
1897 | |||
1898 | if (prim.Animations!= null) | ||
1899 | cmd.Parameters.AddWithValue("sopanims", prim.SerializeAnimations()); | ||
1900 | else | ||
1901 | cmd.Parameters.AddWithValue("sopanims", null); | ||
1881 | } | 1902 | } |
1882 | 1903 | ||
1883 | /// <summary> | 1904 | /// <summary> |
diff --git a/OpenSim/Data/MySQL/MySQLUserProfilesData.cs b/OpenSim/Data/MySQL/MySQLUserProfilesData.cs index 16637c3..2669aca 100644 --- a/OpenSim/Data/MySQL/MySQLUserProfilesData.cs +++ b/OpenSim/Data/MySQL/MySQLUserProfilesData.cs | |||
@@ -836,7 +836,7 @@ namespace OpenSim.Data.MySQL | |||
836 | 836 | ||
837 | const string queryB = "SELECT `profileImage`, `profileFirstImage` FROM `userprofile` WHERE `useruuid` = ?Id"; | 837 | const string queryB = "SELECT `profileImage`, `profileFirstImage` FROM `userprofile` WHERE `useruuid` = ?Id"; |
838 | 838 | ||
839 | using (MySqlCommand cmd = new MySqlCommand(string.Format (queryB,"`userpicks`"), dbcon)) | 839 | using (MySqlCommand cmd = new MySqlCommand(queryB, dbcon)) |
840 | { | 840 | { |
841 | cmd.Parameters.AddWithValue("?Id", avatarId.ToString()); | 841 | cmd.Parameters.AddWithValue("?Id", avatarId.ToString()); |
842 | 842 | ||
diff --git a/OpenSim/Data/MySQL/MySQLXAssetData.cs b/OpenSim/Data/MySQL/MySQLXAssetData.cs index 9f9c9cf..5c92be9 100644 --- a/OpenSim/Data/MySQL/MySQLXAssetData.cs +++ b/OpenSim/Data/MySQL/MySQLXAssetData.cs | |||
@@ -58,11 +58,6 @@ namespace OpenSim.Data.MySQL | |||
58 | private bool m_enableCompression = false; | 58 | private bool m_enableCompression = false; |
59 | private string m_connectionString; | 59 | private string m_connectionString; |
60 | 60 | ||
61 | /// <summary> | ||
62 | /// We can reuse this for all hashing since all methods are single-threaded through m_dbBLock | ||
63 | /// </summary> | ||
64 | private HashAlgorithm hasher = new SHA256CryptoServiceProvider(); | ||
65 | |||
66 | #region IPlugin Members | 61 | #region IPlugin Members |
67 | 62 | ||
68 | public string Version { get { return "1.0.0.0"; } } | 63 | public string Version { get { return "1.0.0.0"; } } |
@@ -250,7 +245,9 @@ namespace OpenSim.Data.MySQL | |||
250 | } | 245 | } |
251 | } | 246 | } |
252 | 247 | ||
253 | byte[] hash = hasher.ComputeHash(asset.Data); | 248 | byte[] hash; |
249 | using (HashAlgorithm hasher = new SHA256CryptoServiceProvider()) | ||
250 | hash = hasher.ComputeHash(asset.Data); | ||
254 | 251 | ||
255 | // m_log.DebugFormat( | 252 | // m_log.DebugFormat( |
256 | // "[XASSET DB]: Compressed data size for {0} {1}, hash {2} is {3}", | 253 | // "[XASSET DB]: Compressed data size for {0} {1}, hash {2} is {3}", |
diff --git a/OpenSim/Data/MySQL/Resources/AgentPrefs.migrations b/OpenSim/Data/MySQL/Resources/AgentPrefs.migrations index d41ae66..6d864aa 100644 --- a/OpenSim/Data/MySQL/Resources/AgentPrefs.migrations +++ b/OpenSim/Data/MySQL/Resources/AgentPrefs.migrations | |||
@@ -13,6 +13,6 @@ CREATE TABLE IF NOT EXISTS `AgentPrefs` ( | |||
13 | `PermNextOwner` INT(6) NOT NULL DEFAULT 532480, | 13 | `PermNextOwner` INT(6) NOT NULL DEFAULT 532480, |
14 | UNIQUE KEY `PrincipalID` (`PrincipalID`), | 14 | UNIQUE KEY `PrincipalID` (`PrincipalID`), |
15 | PRIMARY KEY(`PrincipalID`) | 15 | PRIMARY KEY(`PrincipalID`) |
16 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | 16 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; |
17 | 17 | ||
18 | COMMIT; | 18 | COMMIT; |
diff --git a/OpenSim/Data/MySQL/Resources/AssetStore.migrations b/OpenSim/Data/MySQL/Resources/AssetStore.migrations index 07f521b..dc0b084 100644 --- a/OpenSim/Data/MySQL/Resources/AssetStore.migrations +++ b/OpenSim/Data/MySQL/Resources/AssetStore.migrations | |||
@@ -16,6 +16,6 @@ CREATE TABLE IF NOT EXISTS `assets` ( | |||
16 | `asset_flags` int(11) NOT NULL DEFAULT '0', | 16 | `asset_flags` int(11) NOT NULL DEFAULT '0', |
17 | `CreatorID` varchar(128) NOT NULL DEFAULT '', | 17 | `CreatorID` varchar(128) NOT NULL DEFAULT '', |
18 | PRIMARY KEY (`id`) | 18 | PRIMARY KEY (`id`) |
19 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | 19 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; |
20 | 20 | ||
21 | COMMIT; | 21 | COMMIT; |
diff --git a/OpenSim/Data/MySQL/Resources/AuthStore.migrations b/OpenSim/Data/MySQL/Resources/AuthStore.migrations index 8d24fbd..ee2fe17 100644 --- a/OpenSim/Data/MySQL/Resources/AuthStore.migrations +++ b/OpenSim/Data/MySQL/Resources/AuthStore.migrations | |||
@@ -9,7 +9,7 @@ CREATE TABLE IF NOT EXISTS `auth` ( | |||
9 | `webLoginKey` varchar(255) NOT NULL DEFAULT '', | 9 | `webLoginKey` varchar(255) NOT NULL DEFAULT '', |
10 | `accountType` varchar(32) NOT NULL DEFAULT 'UserAccount', | 10 | `accountType` varchar(32) NOT NULL DEFAULT 'UserAccount', |
11 | PRIMARY KEY (`UUID`) | 11 | PRIMARY KEY (`UUID`) |
12 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | 12 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; |
13 | 13 | ||
14 | CREATE TABLE IF NOT EXISTS `tokens` ( | 14 | CREATE TABLE IF NOT EXISTS `tokens` ( |
15 | `UUID` char(36) NOT NULL, | 15 | `UUID` char(36) NOT NULL, |
@@ -19,6 +19,6 @@ CREATE TABLE IF NOT EXISTS `tokens` ( | |||
19 | KEY `UUID` (`UUID`), | 19 | KEY `UUID` (`UUID`), |
20 | KEY `token` (`token`), | 20 | KEY `token` (`token`), |
21 | KEY `validity` (`validity`) | 21 | KEY `validity` (`validity`) |
22 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | 22 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; |
23 | 23 | ||
24 | COMMIT; | 24 | COMMIT; |
diff --git a/OpenSim/Data/MySQL/Resources/Avatar.migrations b/OpenSim/Data/MySQL/Resources/Avatar.migrations index 66f75b2..9e11f41 100644 --- a/OpenSim/Data/MySQL/Resources/Avatar.migrations +++ b/OpenSim/Data/MySQL/Resources/Avatar.migrations | |||
@@ -8,6 +8,6 @@ CREATE TABLE IF NOT EXISTS `Avatars` ( | |||
8 | `Value` text, | 8 | `Value` text, |
9 | PRIMARY KEY (`PrincipalID`,`Name`), | 9 | PRIMARY KEY (`PrincipalID`,`Name`), |
10 | KEY `PrincipalID` (`PrincipalID`) | 10 | KEY `PrincipalID` (`PrincipalID`) |
11 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | 11 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; |
12 | 12 | ||
13 | COMMIT; | 13 | COMMIT; |
diff --git a/OpenSim/Data/MySQL/Resources/EstateStore.migrations b/OpenSim/Data/MySQL/Resources/EstateStore.migrations index 9c1ed83..87adcca 100644 --- a/OpenSim/Data/MySQL/Resources/EstateStore.migrations +++ b/OpenSim/Data/MySQL/Resources/EstateStore.migrations | |||
@@ -6,20 +6,20 @@ CREATE TABLE IF NOT EXISTS `estate_groups` ( | |||
6 | `EstateID` int(10) unsigned NOT NULL, | 6 | `EstateID` int(10) unsigned NOT NULL, |
7 | `uuid` char(36) NOT NULL, | 7 | `uuid` char(36) NOT NULL, |
8 | KEY `EstateID` (`EstateID`) | 8 | KEY `EstateID` (`EstateID`) |
9 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | 9 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; |
10 | 10 | ||
11 | CREATE TABLE IF NOT EXISTS `estate_managers` ( | 11 | CREATE TABLE IF NOT EXISTS `estate_managers` ( |
12 | `EstateID` int(10) unsigned NOT NULL, | 12 | `EstateID` int(10) unsigned NOT NULL, |
13 | `uuid` char(36) NOT NULL, | 13 | `uuid` char(36) NOT NULL, |
14 | KEY `EstateID` (`EstateID`) | 14 | KEY `EstateID` (`EstateID`) |
15 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | 15 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; |
16 | 16 | ||
17 | CREATE TABLE IF NOT EXISTS `estate_map` ( | 17 | CREATE TABLE IF NOT EXISTS `estate_map` ( |
18 | `RegionID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', | 18 | `RegionID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', |
19 | `EstateID` int(11) NOT NULL, | 19 | `EstateID` int(11) NOT NULL, |
20 | PRIMARY KEY (`RegionID`), | 20 | PRIMARY KEY (`RegionID`), |
21 | KEY `EstateID` (`EstateID`) | 21 | KEY `EstateID` (`EstateID`) |
22 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | 22 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; |
23 | 23 | ||
24 | CREATE TABLE IF NOT EXISTS `estate_settings` ( | 24 | CREATE TABLE IF NOT EXISTS `estate_settings` ( |
25 | `EstateID` int(10) unsigned NOT NULL AUTO_INCREMENT, | 25 | `EstateID` int(10) unsigned NOT NULL AUTO_INCREMENT, |
@@ -50,13 +50,13 @@ CREATE TABLE IF NOT EXISTS `estate_settings` ( | |||
50 | `AllowParcelChanges` tinyint(4) NOT NULL DEFAULT '1', | 50 | `AllowParcelChanges` tinyint(4) NOT NULL DEFAULT '1', |
51 | `AllowSetHome` tinyint(4) NOT NULL DEFAULT '1', | 51 | `AllowSetHome` tinyint(4) NOT NULL DEFAULT '1', |
52 | PRIMARY KEY (`EstateID`) | 52 | PRIMARY KEY (`EstateID`) |
53 | ) ENGINE=MyISAM AUTO_INCREMENT=101 DEFAULT CHARSET=utf8; | 53 | ) ENGINE=MyISAM AUTO_INCREMENT=101 DEFAULT CHARSET=utf8mb4; |
54 | 54 | ||
55 | CREATE TABLE IF NOT EXISTS `estate_users` ( | 55 | CREATE TABLE IF NOT EXISTS `estate_users` ( |
56 | `EstateID` int(10) unsigned NOT NULL, | 56 | `EstateID` int(10) unsigned NOT NULL, |
57 | `uuid` char(36) NOT NULL, | 57 | `uuid` char(36) NOT NULL, |
58 | KEY `EstateID` (`EstateID`) | 58 | KEY `EstateID` (`EstateID`) |
59 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | 59 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; |
60 | 60 | ||
61 | CREATE TABLE IF NOT EXISTS `estateban` ( | 61 | CREATE TABLE IF NOT EXISTS `estateban` ( |
62 | `EstateID` int(10) unsigned NOT NULL, | 62 | `EstateID` int(10) unsigned NOT NULL, |
@@ -65,7 +65,14 @@ CREATE TABLE IF NOT EXISTS `estateban` ( | |||
65 | `bannedIpHostMask` varchar(16) NOT NULL, | 65 | `bannedIpHostMask` varchar(16) NOT NULL, |
66 | `bannedNameMask` varchar(64) DEFAULT NULL, | 66 | `bannedNameMask` varchar(64) DEFAULT NULL, |
67 | KEY `estateban_EstateID` (`EstateID`) | 67 | KEY `estateban_EstateID` (`EstateID`) |
68 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | 68 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; |
69 | 69 | ||
70 | COMMIT; | 70 | COMMIT; |
71 | 71 | ||
72 | :VERSION 35 | ||
73 | BEGIN; | ||
74 | ALTER TABLE `estateban` | ||
75 | ADD COLUMN `banningUUID` varchar(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', | ||
76 | ADD COLUMN `banTime` int(11) NOT NULL DEFAULT 0; | ||
77 | COMMIT; | ||
78 | |||
diff --git a/OpenSim/Data/MySQL/Resources/FSAssetStore.migrations b/OpenSim/Data/MySQL/Resources/FSAssetStore.migrations index 3f65d9e..c8f5f66 100644 --- a/OpenSim/Data/MySQL/Resources/FSAssetStore.migrations +++ b/OpenSim/Data/MySQL/Resources/FSAssetStore.migrations | |||
@@ -13,6 +13,6 @@ CREATE TABLE IF NOT EXISTS `fsassets` ( | |||
13 | `access_time` int(11) NOT NULL DEFAULT '0', | 13 | `access_time` int(11) NOT NULL DEFAULT '0', |
14 | `asset_flags` int(11) NOT NULL DEFAULT '0', | 14 | `asset_flags` int(11) NOT NULL DEFAULT '0', |
15 | PRIMARY KEY (`id`) | 15 | PRIMARY KEY (`id`) |
16 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | 16 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; |
17 | 17 | ||
18 | COMMIT; | 18 | COMMIT; |
diff --git a/OpenSim/Data/MySQL/Resources/FriendsStore.migrations b/OpenSim/Data/MySQL/Resources/FriendsStore.migrations index 7dc7607..ccb1291 100644 --- a/OpenSim/Data/MySQL/Resources/FriendsStore.migrations +++ b/OpenSim/Data/MySQL/Resources/FriendsStore.migrations | |||
@@ -9,6 +9,6 @@ CREATE TABLE IF NOT EXISTS `Friends` ( | |||
9 | `Offered` varchar(32) NOT NULL DEFAULT '0', | 9 | `Offered` varchar(32) NOT NULL DEFAULT '0', |
10 | PRIMARY KEY (`PrincipalID`(36),`Friend`(36)), | 10 | PRIMARY KEY (`PrincipalID`(36),`Friend`(36)), |
11 | KEY `PrincipalID` (`PrincipalID`) | 11 | KEY `PrincipalID` (`PrincipalID`) |
12 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | 12 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; |
13 | 13 | ||
14 | COMMIT; | 14 | COMMIT; |
diff --git a/OpenSim/Data/MySQL/Resources/GridStore.migrations b/OpenSim/Data/MySQL/Resources/GridStore.migrations index 4116235..d2775c1 100644 --- a/OpenSim/Data/MySQL/Resources/GridStore.migrations +++ b/OpenSim/Data/MySQL/Resources/GridStore.migrations | |||
@@ -46,7 +46,7 @@ CREATE TABLE IF NOT EXISTS `regions` ( | |||
46 | KEY `overrideHandles` (`eastOverrideHandle`,`westOverrideHandle`,`southOverrideHandle`,`northOverrideHandle`), | 46 | KEY `overrideHandles` (`eastOverrideHandle`,`westOverrideHandle`,`southOverrideHandle`,`northOverrideHandle`), |
47 | KEY `ScopeID` (`ScopeID`), | 47 | KEY `ScopeID` (`ScopeID`), |
48 | KEY `flags` (`flags`) | 48 | KEY `flags` (`flags`) |
49 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | 49 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; |
50 | 50 | ||
51 | COMMIT; | 51 | COMMIT; |
52 | 52 | ||
diff --git a/OpenSim/Data/MySQL/Resources/GridUserStore.migrations b/OpenSim/Data/MySQL/Resources/GridUserStore.migrations index dd73974..0cb7d07 100644 --- a/OpenSim/Data/MySQL/Resources/GridUserStore.migrations +++ b/OpenSim/Data/MySQL/Resources/GridUserStore.migrations | |||
@@ -14,6 +14,11 @@ CREATE TABLE IF NOT EXISTS `GridUser` ( | |||
14 | `Login` CHAR(16) NOT NULL DEFAULT '0', | 14 | `Login` CHAR(16) NOT NULL DEFAULT '0', |
15 | `Logout` CHAR(16) NOT NULL DEFAULT '0', | 15 | `Logout` CHAR(16) NOT NULL DEFAULT '0', |
16 | PRIMARY KEY (`UserID`) | 16 | PRIMARY KEY (`UserID`) |
17 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | 17 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; |
18 | |||
19 | COMMIT; | ||
20 | |||
21 | :VERSION 2 # -------------------------- | ||
22 | BEGIN; | ||
18 | 23 | ||
19 | COMMIT; | 24 | COMMIT; |
diff --git a/OpenSim/Data/MySQL/Resources/HGTravelStore.migrations b/OpenSim/Data/MySQL/Resources/HGTravelStore.migrations index ed1fede..0766733 100644 --- a/OpenSim/Data/MySQL/Resources/HGTravelStore.migrations +++ b/OpenSim/Data/MySQL/Resources/HGTravelStore.migrations | |||
@@ -12,6 +12,13 @@ CREATE TABLE IF NOT EXISTS `hg_traveling_data` ( | |||
12 | `TMStamp` timestamp NOT NULL, | 12 | `TMStamp` timestamp NOT NULL, |
13 | PRIMARY KEY (`SessionID`), | 13 | PRIMARY KEY (`SessionID`), |
14 | KEY (`UserID`) | 14 | KEY (`UserID`) |
15 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | 15 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; |
16 | 16 | ||
17 | COMMIT; | 17 | COMMIT; |
18 | |||
19 | :VERSION 2 # -------------------------- | ||
20 | |||
21 | ALTER TABLE `hg_traveling_data` MODIFY `TMStamp` timestamp NOT NULL default CURRENT_TIMESTAMP; | ||
22 | |||
23 | COMMIT; | ||
24 | |||
diff --git a/OpenSim/Data/MySQL/Resources/IM_Store.migrations b/OpenSim/Data/MySQL/Resources/IM_Store.migrations index e271fcc..8394bd9 100644 --- a/OpenSim/Data/MySQL/Resources/IM_Store.migrations +++ b/OpenSim/Data/MySQL/Resources/IM_Store.migrations | |||
@@ -11,6 +11,6 @@ CREATE TABLE IF NOT EXISTS `im_offline` ( | |||
11 | PRIMARY KEY (`ID`), | 11 | PRIMARY KEY (`ID`), |
12 | KEY `PrincipalID` (`PrincipalID`), | 12 | KEY `PrincipalID` (`PrincipalID`), |
13 | KEY `FromID` (`FromID`) | 13 | KEY `FromID` (`FromID`) |
14 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | 14 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; |
15 | 15 | ||
16 | COMMIT; | 16 | COMMIT; |
diff --git a/OpenSim/Data/MySQL/Resources/InventoryStore.migrations b/OpenSim/Data/MySQL/Resources/InventoryStore.migrations index 7283e41..808cdc9 100644 --- a/OpenSim/Data/MySQL/Resources/InventoryStore.migrations +++ b/OpenSim/Data/MySQL/Resources/InventoryStore.migrations | |||
@@ -25,7 +25,7 @@ CREATE TABLE IF NOT EXISTS `inventoryitems` ( | |||
25 | PRIMARY KEY (`inventoryID`), | 25 | PRIMARY KEY (`inventoryID`), |
26 | KEY `inventoryitems_avatarid` (`avatarID`), | 26 | KEY `inventoryitems_avatarid` (`avatarID`), |
27 | KEY `inventoryitems_parentFolderid` (`parentFolderID`) | 27 | KEY `inventoryitems_parentFolderid` (`parentFolderID`) |
28 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | 28 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; |
29 | 29 | ||
30 | CREATE TABLE IF NOT EXISTS `inventoryfolders` ( | 30 | CREATE TABLE IF NOT EXISTS `inventoryfolders` ( |
31 | `folderName` varchar(64) DEFAULT NULL, | 31 | `folderName` varchar(64) DEFAULT NULL, |
@@ -37,6 +37,6 @@ CREATE TABLE IF NOT EXISTS `inventoryfolders` ( | |||
37 | PRIMARY KEY (`folderID`), | 37 | PRIMARY KEY (`folderID`), |
38 | KEY `inventoryfolders_agentid` (`agentID`), | 38 | KEY `inventoryfolders_agentid` (`agentID`), |
39 | KEY `inventoryfolders_parentFolderid` (`parentFolderID`) | 39 | KEY `inventoryfolders_parentFolderid` (`parentFolderID`) |
40 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | 40 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; |
41 | 41 | ||
42 | COMMIT; | 42 | COMMIT; |
diff --git a/OpenSim/Data/MySQL/Resources/LogStore.migrations b/OpenSim/Data/MySQL/Resources/LogStore.migrations index f2990cc..45959d0 100644 --- a/OpenSim/Data/MySQL/Resources/LogStore.migrations +++ b/OpenSim/Data/MySQL/Resources/LogStore.migrations | |||
@@ -10,4 +10,4 @@ CREATE TABLE IF NOT EXISTS `logs` ( | |||
10 | `priority` int(11) default NULL, | 10 | `priority` int(11) default NULL, |
11 | `message` text, | 11 | `message` text, |
12 | PRIMARY KEY (`logID`) | 12 | PRIMARY KEY (`logID`) |
13 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | 13 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; |
diff --git a/OpenSim/Data/MySQL/Resources/MuteListStore.migrations b/OpenSim/Data/MySQL/Resources/MuteListStore.migrations index 164dc51..a84537e 100644 --- a/OpenSim/Data/MySQL/Resources/MuteListStore.migrations +++ b/OpenSim/Data/MySQL/Resources/MuteListStore.migrations | |||
@@ -11,6 +11,6 @@ CREATE TABLE IF NOT EXISTS `MuteList` ( | |||
11 | `Stamp` int(11) NOT NULL, | 11 | `Stamp` int(11) NOT NULL, |
12 | UNIQUE KEY `AgentID_2` (`AgentID`,`MuteID`,`MuteName`), | 12 | UNIQUE KEY `AgentID_2` (`AgentID`,`MuteID`,`MuteName`), |
13 | KEY `AgentID` (`AgentID`) | 13 | KEY `AgentID` (`AgentID`) |
14 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | 14 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; |
15 | 15 | ||
16 | COMMIT; | 16 | COMMIT; |
diff --git a/OpenSim/Data/MySQL/Resources/Presence.migrations b/OpenSim/Data/MySQL/Resources/Presence.migrations index 4d14b9d..50437af 100644 --- a/OpenSim/Data/MySQL/Resources/Presence.migrations +++ b/OpenSim/Data/MySQL/Resources/Presence.migrations | |||
@@ -11,6 +11,6 @@ CREATE TABLE IF NOT EXISTS `Presence` ( | |||
11 | UNIQUE KEY `SessionID` (`SessionID`), | 11 | UNIQUE KEY `SessionID` (`SessionID`), |
12 | KEY `UserID` (`UserID`), | 12 | KEY `UserID` (`UserID`), |
13 | KEY `RegionID` (`RegionID`) | 13 | KEY `RegionID` (`RegionID`) |
14 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | 14 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; |
15 | 15 | ||
16 | COMMIT; | 16 | COMMIT; |
diff --git a/OpenSim/Data/MySQL/Resources/RegionStore.migrations b/OpenSim/Data/MySQL/Resources/RegionStore.migrations index fb7862a..014d227 100644 --- a/OpenSim/Data/MySQL/Resources/RegionStore.migrations +++ b/OpenSim/Data/MySQL/Resources/RegionStore.migrations | |||
@@ -204,7 +204,7 @@ CREATE TABLE IF NOT EXISTS `land` ( | |||
204 | `ObscureMusic` tinyint(1) NOT NULL DEFAULT '0', | 204 | `ObscureMusic` tinyint(1) NOT NULL DEFAULT '0', |
205 | `ObscureMedia` tinyint(1) NOT NULL DEFAULT '0', | 205 | `ObscureMedia` tinyint(1) NOT NULL DEFAULT '0', |
206 | PRIMARY KEY (`UUID`) | 206 | PRIMARY KEY (`UUID`) |
207 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | 207 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; |
208 | 208 | ||
209 | CREATE TABLE IF NOT EXISTS `landaccesslist` ( | 209 | CREATE TABLE IF NOT EXISTS `landaccesslist` ( |
210 | `LandUUID` varchar(255) DEFAULT NULL, | 210 | `LandUUID` varchar(255) DEFAULT NULL, |
@@ -218,7 +218,7 @@ CREATE TABLE IF NOT EXISTS `regionban` ( | |||
218 | `bannedUUID` varchar(36) NOT NULL, | 218 | `bannedUUID` varchar(36) NOT NULL, |
219 | `bannedIp` varchar(16) NOT NULL, | 219 | `bannedIp` varchar(16) NOT NULL, |
220 | `bannedIpHostMask` varchar(16) NOT NULL | 220 | `bannedIpHostMask` varchar(16) NOT NULL |
221 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | 221 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; |
222 | 222 | ||
223 | CREATE TABLE IF NOT EXISTS `regionsettings` ( | 223 | CREATE TABLE IF NOT EXISTS `regionsettings` ( |
224 | `regionUUID` char(36) NOT NULL, | 224 | `regionUUID` char(36) NOT NULL, |
@@ -265,7 +265,7 @@ CREATE TABLE IF NOT EXISTS `regionsettings` ( | |||
265 | `parcel_tile_ID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', | 265 | `parcel_tile_ID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', |
266 | `covenant_datetime` int(10) unsigned NOT NULL DEFAULT '0', | 266 | `covenant_datetime` int(10) unsigned NOT NULL DEFAULT '0', |
267 | PRIMARY KEY (`regionUUID`) | 267 | PRIMARY KEY (`regionUUID`) |
268 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | 268 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; |
269 | 269 | ||
270 | CREATE TABLE IF NOT EXISTS `regionwindlight` ( | 270 | CREATE TABLE IF NOT EXISTS `regionwindlight` ( |
271 | `region_id` varchar(36) NOT NULL DEFAULT '000000-0000-0000-0000-000000000000', | 271 | `region_id` varchar(36) NOT NULL DEFAULT '000000-0000-0000-0000-000000000000', |
@@ -332,28 +332,28 @@ CREATE TABLE IF NOT EXISTS `regionwindlight` ( | |||
332 | `cloud_scroll_y_lock` tinyint(1) unsigned NOT NULL DEFAULT '0', | 332 | `cloud_scroll_y_lock` tinyint(1) unsigned NOT NULL DEFAULT '0', |
333 | `draw_classic_clouds` tinyint(1) unsigned NOT NULL DEFAULT '1', | 333 | `draw_classic_clouds` tinyint(1) unsigned NOT NULL DEFAULT '1', |
334 | PRIMARY KEY (`region_id`) | 334 | PRIMARY KEY (`region_id`) |
335 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | 335 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; |
336 | 336 | ||
337 | CREATE TABLE IF NOT EXISTS `spawn_points` ( | 337 | CREATE TABLE IF NOT EXISTS `spawn_points` ( |
338 | `RegionID` varchar(36) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, | 338 | `RegionID` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8_unicode_ci NOT NULL, |
339 | `Yaw` float NOT NULL, | 339 | `Yaw` float NOT NULL, |
340 | `Pitch` float NOT NULL, | 340 | `Pitch` float NOT NULL, |
341 | `Distance` float NOT NULL, | 341 | `Distance` float NOT NULL, |
342 | KEY `RegionID` (`RegionID`) | 342 | KEY `RegionID` (`RegionID`) |
343 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | 343 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; |
344 | 344 | ||
345 | CREATE TABLE IF NOT EXISTS `regionenvironment` ( | 345 | CREATE TABLE IF NOT EXISTS `regionenvironment` ( |
346 | `region_id` varchar(36) NOT NULL, | 346 | `region_id` varchar(36) NOT NULL, |
347 | `llsd_settings` text NOT NULL, | 347 | `llsd_settings` text NOT NULL, |
348 | PRIMARY KEY (`region_id`) | 348 | PRIMARY KEY (`region_id`) |
349 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | 349 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; |
350 | 350 | ||
351 | CREATE TABLE IF NOT EXISTS `regionextra` ( | 351 | CREATE TABLE IF NOT EXISTS `regionextra` ( |
352 | `RegionID` char(36) NOT NULL, | 352 | `RegionID` char(36) NOT NULL, |
353 | `Name` varchar(32) NOT NULL, | 353 | `Name` varchar(32) NOT NULL, |
354 | `value` text, | 354 | `value` text, |
355 | PRIMARY KEY (`RegionID`,`Name`) | 355 | PRIMARY KEY (`RegionID`,`Name`) |
356 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | 356 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; |
357 | 357 | ||
358 | COMMIT; | 358 | COMMIT; |
359 | 359 | ||
@@ -387,7 +387,7 @@ CREATE TABLE IF NOT EXISTS `bakedterrain` ( | |||
387 | `RegionUUID` varchar(255) DEFAULT NULL, | 387 | `RegionUUID` varchar(255) DEFAULT NULL, |
388 | `Revision` int(11) DEFAULT NULL, | 388 | `Revision` int(11) DEFAULT NULL, |
389 | `Heightfield` longblob | 389 | `Heightfield` longblob |
390 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | 390 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; |
391 | 391 | ||
392 | COMMIT; | 392 | COMMIT; |
393 | 393 | ||
@@ -467,3 +467,10 @@ COMMIT; | |||
467 | BEGIN; | 467 | BEGIN; |
468 | ALTER TABLE `prims` ADD COLUMN `PhysInertia` TEXT default NULL; | 468 | ALTER TABLE `prims` ADD COLUMN `PhysInertia` TEXT default NULL; |
469 | COMMIT; | 469 | COMMIT; |
470 | |||
471 | :VERSION 58 #----- Add sop animations | ||
472 | |||
473 | BEGIN; | ||
474 | ALTER TABLE `prims` ADD COLUMN `sopanims` blob default NULL; | ||
475 | COMMIT; | ||
476 | |||
diff --git a/OpenSim/Data/MySQL/Resources/UserAccount.migrations b/OpenSim/Data/MySQL/Resources/UserAccount.migrations index dcb375e..9679562 100644 --- a/OpenSim/Data/MySQL/Resources/UserAccount.migrations +++ b/OpenSim/Data/MySQL/Resources/UserAccount.migrations | |||
@@ -18,7 +18,7 @@ CREATE TABLE IF NOT EXISTS `UserAccounts` ( | |||
18 | KEY `FirstName` (`FirstName`), | 18 | KEY `FirstName` (`FirstName`), |
19 | KEY `LastName` (`LastName`), | 19 | KEY `LastName` (`LastName`), |
20 | KEY `Name` (`FirstName`,`LastName`) | 20 | KEY `Name` (`FirstName`,`LastName`) |
21 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | 21 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; |
22 | 22 | ||
23 | COMMIT; | 23 | COMMIT; |
24 | 24 | ||
diff --git a/OpenSim/Data/MySQL/Resources/XAssetStore.migrations b/OpenSim/Data/MySQL/Resources/XAssetStore.migrations index 7641a97..42ebd96 100644 --- a/OpenSim/Data/MySQL/Resources/XAssetStore.migrations +++ b/OpenSim/Data/MySQL/Resources/XAssetStore.migrations | |||
@@ -16,13 +16,13 @@ CREATE TABLE IF NOT EXISTS `XAssetsMeta` ( | |||
16 | `AssetFlags` int(11) NOT NULL, | 16 | `AssetFlags` int(11) NOT NULL, |
17 | `CreatorID` varchar(128) NOT NULL, | 17 | `CreatorID` varchar(128) NOT NULL, |
18 | PRIMARY KEY (`id`) | 18 | PRIMARY KEY (`id`) |
19 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Version 1'; | 19 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COMMENT='Version 1'; |
20 | 20 | ||
21 | CREATE TABLE IF NOT EXISTS `XAssetsData` ( | 21 | CREATE TABLE IF NOT EXISTS `XAssetsData` ( |
22 | `Hash` binary(32) NOT NULL, | 22 | `Hash` binary(32) NOT NULL, |
23 | `Data` longblob NOT NULL, | 23 | `Data` longblob NOT NULL, |
24 | PRIMARY KEY (`hash`) | 24 | PRIMARY KEY (`hash`) |
25 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Version 1'; | 25 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COMMENT='Version 1'; |
26 | 26 | ||
27 | COMMIT; | 27 | COMMIT; |
28 | 28 | ||
diff --git a/OpenSim/Data/MySQL/Resources/XMute.migrations b/OpenSim/Data/MySQL/Resources/XMute.migrations deleted file mode 100644 index 084c67b..0000000 --- a/OpenSim/Data/MySQL/Resources/XMute.migrations +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | :VERSION 1 | ||
2 | |||
3 | BEGIN; | ||
4 | |||
5 | CREATE TABLE IF NOT EXISTS `XMute` ( | ||
6 | `AgentID` char(36) NOT NULL, | ||
7 | `MuteID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', | ||
8 | `MuteName` varchar(64) NOT NULL DEFAULT '', | ||
9 | `MuteType` int(11) NOT NULL DEFAULT '1', | ||
10 | `MuteFlags` int(11) NOT NULL DEFAULT '0', | ||
11 | `Stamp` int(11) NOT NULL, | ||
12 | UNIQUE KEY `AgentID_2` (`AgentID`,`MuteID`,`MuteName`), | ||
13 | KEY `AgentID` (`AgentID`) | ||
14 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | ||
15 | |||
16 | COMMIT; | ||
diff --git a/OpenSim/Data/MySQL/Resources/os_groups_Store.migrations b/OpenSim/Data/MySQL/Resources/os_groups_Store.migrations index 0b605ab..e95b768 100644 --- a/OpenSim/Data/MySQL/Resources/os_groups_Store.migrations +++ b/OpenSim/Data/MySQL/Resources/os_groups_Store.migrations | |||
@@ -18,7 +18,7 @@ CREATE TABLE IF NOT EXISTS `os_groups_groups` ( | |||
18 | PRIMARY KEY (`GroupID`), | 18 | PRIMARY KEY (`GroupID`), |
19 | UNIQUE KEY `Name` (`Name`), | 19 | UNIQUE KEY `Name` (`Name`), |
20 | FULLTEXT KEY `Name_2` (`Name`) | 20 | FULLTEXT KEY `Name_2` (`Name`) |
21 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | 21 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; |
22 | 22 | ||
23 | 23 | ||
24 | CREATE TABLE IF NOT EXISTS `os_groups_membership` ( | 24 | CREATE TABLE IF NOT EXISTS `os_groups_membership` ( |
@@ -31,7 +31,7 @@ CREATE TABLE IF NOT EXISTS `os_groups_membership` ( | |||
31 | `AccessToken` char(36) NOT NULL default '', | 31 | `AccessToken` char(36) NOT NULL default '', |
32 | PRIMARY KEY (`GroupID`,`PrincipalID`), | 32 | PRIMARY KEY (`GroupID`,`PrincipalID`), |
33 | KEY `PrincipalID` (`PrincipalID`) | 33 | KEY `PrincipalID` (`PrincipalID`) |
34 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | 34 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; |
35 | 35 | ||
36 | 36 | ||
37 | CREATE TABLE IF NOT EXISTS `os_groups_roles` ( | 37 | CREATE TABLE IF NOT EXISTS `os_groups_roles` ( |
@@ -43,7 +43,7 @@ CREATE TABLE IF NOT EXISTS `os_groups_roles` ( | |||
43 | `Powers` bigint(20) unsigned NOT NULL default '0', | 43 | `Powers` bigint(20) unsigned NOT NULL default '0', |
44 | PRIMARY KEY (`GroupID`,`RoleID`), | 44 | PRIMARY KEY (`GroupID`,`RoleID`), |
45 | KEY `GroupID` (`GroupID`) | 45 | KEY `GroupID` (`GroupID`) |
46 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | 46 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; |
47 | 47 | ||
48 | 48 | ||
49 | CREATE TABLE IF NOT EXISTS `os_groups_rolemembership` ( | 49 | CREATE TABLE IF NOT EXISTS `os_groups_rolemembership` ( |
@@ -52,7 +52,7 @@ CREATE TABLE IF NOT EXISTS `os_groups_rolemembership` ( | |||
52 | `PrincipalID` VARCHAR(255) NOT NULL default '', | 52 | `PrincipalID` VARCHAR(255) NOT NULL default '', |
53 | PRIMARY KEY (`GroupID`,`RoleID`,`PrincipalID`), | 53 | PRIMARY KEY (`GroupID`,`RoleID`,`PrincipalID`), |
54 | KEY `PrincipalID` (`PrincipalID`) | 54 | KEY `PrincipalID` (`PrincipalID`) |
55 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | 55 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; |
56 | 56 | ||
57 | 57 | ||
58 | CREATE TABLE IF NOT EXISTS `os_groups_invites` ( | 58 | CREATE TABLE IF NOT EXISTS `os_groups_invites` ( |
@@ -63,7 +63,7 @@ CREATE TABLE IF NOT EXISTS `os_groups_invites` ( | |||
63 | `TMStamp` timestamp NOT NULL, | 63 | `TMStamp` timestamp NOT NULL, |
64 | PRIMARY KEY (`InviteID`), | 64 | PRIMARY KEY (`InviteID`), |
65 | UNIQUE KEY `PrincipalGroup` (`GroupID`,`PrincipalID`) | 65 | UNIQUE KEY `PrincipalGroup` (`GroupID`,`PrincipalID`) |
66 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | 66 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; |
67 | 67 | ||
68 | 68 | ||
69 | CREATE TABLE IF NOT EXISTS `os_groups_notices` ( | 69 | CREATE TABLE IF NOT EXISTS `os_groups_notices` ( |
@@ -81,13 +81,13 @@ CREATE TABLE IF NOT EXISTS `os_groups_notices` ( | |||
81 | PRIMARY KEY (`NoticeID`), | 81 | PRIMARY KEY (`NoticeID`), |
82 | KEY `GroupID` (`GroupID`), | 82 | KEY `GroupID` (`GroupID`), |
83 | KEY `TMStamp` (`TMStamp`) | 83 | KEY `TMStamp` (`TMStamp`) |
84 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | 84 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; |
85 | 85 | ||
86 | CREATE TABLE IF NOT EXISTS `os_groups_principals` ( | 86 | CREATE TABLE IF NOT EXISTS `os_groups_principals` ( |
87 | `PrincipalID` VARCHAR(255) NOT NULL default '', | 87 | `PrincipalID` VARCHAR(255) NOT NULL default '', |
88 | `ActiveGroupID` char(36) NOT NULL default '', | 88 | `ActiveGroupID` char(36) NOT NULL default '', |
89 | PRIMARY KEY (`PrincipalID`) | 89 | PRIMARY KEY (`PrincipalID`) |
90 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; | 90 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4; |
91 | 91 | ||
92 | COMMIT; | 92 | COMMIT; |
93 | 93 | ||
@@ -113,3 +113,11 @@ DROP TABLE `diva_groups_principals`; | |||
113 | DELETE FROM `migrations` WHERE name='diva_im_Store'; | 113 | DELETE FROM `migrations` WHERE name='diva_im_Store'; |
114 | 114 | ||
115 | COMMIT; | 115 | COMMIT; |
116 | |||
117 | :VERSION 3 # -------------------------- | ||
118 | |||
119 | ALTER TABLE `os_groups_invites` | ||
120 | |||
121 | MODIFY `TMStamp` timestamp NOT NULL default CURRENT_TIMESTAMP; | ||
122 | |||
123 | COMMIT; | ||