diff options
Diffstat (limited to '')
243 files changed, 5995 insertions, 4893 deletions
diff --git a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs index 39923cb..6b169bd 100644 --- a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs +++ b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs | |||
@@ -1038,23 +1038,6 @@ namespace OpenSim.Client.MXP.ClientStack | |||
1038 | // Need to translate to MXP somehow | 1038 | // Need to translate to MXP somehow |
1039 | } | 1039 | } |
1040 | 1040 | ||
1041 | public void SendAvatarData(SendAvatarData data) | ||
1042 | { | ||
1043 | //ScenePresence presence=((Scene)this.Scene).GetScenePresence(avatarID); | ||
1044 | UUID ownerID = data.AvatarID; | ||
1045 | MXPSendAvatarData(data.FirstName + " " + data.LastName, ownerID, UUID.Zero, data.AvatarID, data.AvatarLocalID, data.Position, data.Rotation); | ||
1046 | } | ||
1047 | |||
1048 | public void SendAvatarTerseUpdate(SendAvatarTerseData data) | ||
1049 | { | ||
1050 | MovementEventMessage me = new MovementEventMessage(); | ||
1051 | me.ObjectIndex = data.LocalID; | ||
1052 | me.Location = ToOmVector(data.Position); | ||
1053 | me.Orientation = ToOmQuaternion(data.Rotation); | ||
1054 | |||
1055 | Session.Send(me); | ||
1056 | } | ||
1057 | |||
1058 | public void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations) | 1041 | public void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations) |
1059 | { | 1042 | { |
1060 | // Minimap function, not used. | 1043 | // Minimap function, not used. |
@@ -1070,23 +1053,31 @@ namespace OpenSim.Client.MXP.ClientStack | |||
1070 | // Need to translate to MXP somehow | 1053 | // Need to translate to MXP somehow |
1071 | } | 1054 | } |
1072 | 1055 | ||
1073 | public void SendPrimitiveToClient(SendPrimitiveData data) | 1056 | public void SendAvatarDataImmediate(ISceneEntity avatar) |
1074 | { | 1057 | { |
1075 | MXPSendPrimitive(data.localID, data.ownerID, data.acc, data.rvel, data.primShape, data.pos, data.objectID, data.vel, | 1058 | //ScenePresence presence=((Scene)this.Scene).GetScenePresence(avatarID); |
1076 | data.rotation, (uint)data.flags, data.text, data.color, data.parentID, data.particleSystem, data.clickAction, | 1059 | ScenePresence presence = (ScenePresence)avatar; |
1077 | data.material, data.textureanim); | 1060 | UUID ownerID = presence.UUID; |
1061 | MXPSendAvatarData(presence.Firstname + " " + presence.Lastname, ownerID, UUID.Zero, presence.UUID, presence.LocalId, presence.AbsolutePosition, presence.Rotation); | ||
1078 | } | 1062 | } |
1079 | 1063 | ||
1080 | public void SendPrimTerseUpdate(SendPrimitiveTerseData data) | 1064 | public void SendPrimUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags) |
1081 | { | 1065 | { |
1082 | MovementEventMessage me = new MovementEventMessage(); | 1066 | //MovementEventMessage me = new MovementEventMessage(); |
1083 | me.ObjectIndex = data.LocalID; | 1067 | //me.ObjectIndex = data.LocalID; |
1084 | me.Location = ToOmVector(data.Position); | 1068 | //me.Location = ToOmVector(data.Position); |
1085 | me.Orientation = ToOmQuaternion(data.Rotation); | 1069 | //me.Orientation = ToOmQuaternion(data.Rotation); |
1086 | Session.Send(me); | 1070 | |
1071 | //MXPSendPrimitive(data.localID, data.ownerID, data.acc, data.rvel, data.primShape, data.pos, data.objectID, data.vel, | ||
1072 | // data.rotation, (uint)data.flags, data.text, data.color, data.parentID, data.particleSystem, data.clickAction, | ||
1073 | // data.material, data.textureanim); | ||
1074 | |||
1075 | //Session.Send(me); | ||
1076 | |||
1077 | throw new System.NotImplementedException(); | ||
1087 | } | 1078 | } |
1088 | 1079 | ||
1089 | public void ReprioritizeUpdates(StateUpdateTypes type, UpdatePriorityHandler handler) | 1080 | public void ReprioritizeUpdates(UpdatePriorityHandler handler) |
1090 | { | 1081 | { |
1091 | } | 1082 | } |
1092 | 1083 | ||
diff --git a/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs b/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs index 7c8a979..181606b 100644 --- a/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs +++ b/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs | |||
@@ -593,16 +593,6 @@ namespace OpenSim.Client.Sirikata.ClientStack | |||
593 | throw new System.NotImplementedException(); | 593 | throw new System.NotImplementedException(); |
594 | } | 594 | } |
595 | 595 | ||
596 | public void SendAvatarData(SendAvatarData data) | ||
597 | { | ||
598 | throw new System.NotImplementedException(); | ||
599 | } | ||
600 | |||
601 | public void SendAvatarTerseUpdate(SendAvatarTerseData data) | ||
602 | { | ||
603 | throw new System.NotImplementedException(); | ||
604 | } | ||
605 | |||
606 | public void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations) | 596 | public void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations) |
607 | { | 597 | { |
608 | throw new System.NotImplementedException(); | 598 | throw new System.NotImplementedException(); |
@@ -618,27 +608,27 @@ namespace OpenSim.Client.Sirikata.ClientStack | |||
618 | throw new System.NotImplementedException(); | 608 | throw new System.NotImplementedException(); |
619 | } | 609 | } |
620 | 610 | ||
621 | public void SendPrimitiveToClient(SendPrimitiveData data) | 611 | public void SendAvatarDataImmediate(ISceneEntity avatar) |
622 | { | 612 | { |
623 | throw new System.NotImplementedException(); | 613 | throw new System.NotImplementedException(); |
624 | } | 614 | } |
625 | 615 | ||
626 | public void SendPrimTerseUpdate(SendPrimitiveTerseData data) | 616 | public void SendPrimUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags) |
627 | { | 617 | { |
628 | throw new System.NotImplementedException(); | 618 | throw new System.NotImplementedException(); |
629 | } | 619 | } |
630 | 620 | ||
631 | public void ReprioritizeUpdates(StateUpdateTypes type, UpdatePriorityHandler handler) | 621 | public void ReprioritizeUpdates(UpdatePriorityHandler handler) |
632 | { | 622 | { |
633 | throw new System.NotImplementedException(); | 623 | throw new System.NotImplementedException(); |
634 | } | 624 | } |
635 | 625 | ||
636 | public void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List<InventoryItemBase> items, List<InventoryFolderBase> folders, int version, bool fetchFolders, bool fetchItems) | 626 | public void FlushPrimUpdates() |
637 | { | 627 | { |
638 | throw new System.NotImplementedException(); | 628 | throw new System.NotImplementedException(); |
639 | } | 629 | } |
640 | 630 | ||
641 | public void FlushPrimUpdates() | 631 | public void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List<InventoryItemBase> items, List<InventoryFolderBase> folders, int version, bool fetchFolders, bool fetchItems) |
642 | { | 632 | { |
643 | throw new System.NotImplementedException(); | 633 | throw new System.NotImplementedException(); |
644 | } | 634 | } |
diff --git a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs index 5ad1643..febdd1b 100644 --- a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs +++ b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs | |||
@@ -599,16 +599,6 @@ namespace OpenSim.Client.VWoHTTP.ClientStack | |||
599 | throw new System.NotImplementedException(); | 599 | throw new System.NotImplementedException(); |
600 | } | 600 | } |
601 | 601 | ||
602 | public void SendAvatarData(SendAvatarData data) | ||
603 | { | ||
604 | throw new System.NotImplementedException(); | ||
605 | } | ||
606 | |||
607 | public void SendAvatarTerseUpdate(SendAvatarTerseData data) | ||
608 | { | ||
609 | throw new System.NotImplementedException(); | ||
610 | } | ||
611 | |||
612 | public void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations) | 602 | public void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations) |
613 | { | 603 | { |
614 | throw new System.NotImplementedException(); | 604 | throw new System.NotImplementedException(); |
@@ -624,17 +614,17 @@ namespace OpenSim.Client.VWoHTTP.ClientStack | |||
624 | throw new System.NotImplementedException(); | 614 | throw new System.NotImplementedException(); |
625 | } | 615 | } |
626 | 616 | ||
627 | public void SendPrimitiveToClient(SendPrimitiveData data) | 617 | public void SendAvatarDataImmediate(ISceneEntity avatar) |
628 | { | 618 | { |
629 | throw new System.NotImplementedException(); | 619 | throw new System.NotImplementedException(); |
630 | } | 620 | } |
631 | 621 | ||
632 | public void SendPrimTerseUpdate(SendPrimitiveTerseData data) | 622 | public void SendPrimUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags) |
633 | { | 623 | { |
634 | throw new System.NotImplementedException(); | 624 | throw new System.NotImplementedException(); |
635 | } | 625 | } |
636 | 626 | ||
637 | public void ReprioritizeUpdates(StateUpdateTypes type, UpdatePriorityHandler handler) | 627 | public void ReprioritizeUpdates(UpdatePriorityHandler handler) |
638 | { | 628 | { |
639 | throw new System.NotImplementedException(); | 629 | throw new System.NotImplementedException(); |
640 | } | 630 | } |
diff --git a/OpenSim/Data/DBGuids.cs b/OpenSim/Data/DBGuids.cs new file mode 100644 index 0000000..fb6832b --- /dev/null +++ b/OpenSim/Data/DBGuids.cs | |||
@@ -0,0 +1,44 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | using OpenMetaverse; | ||
5 | |||
6 | namespace OpenSim.Data | ||
7 | { | ||
8 | |||
9 | public static class DBGuid | ||
10 | { | ||
11 | /// <summary>This function converts a value returned from the database in one of the | ||
12 | /// supported formats into a UUID. This function is not actually DBMS-specific right | ||
13 | /// now | ||
14 | /// | ||
15 | /// </summary> | ||
16 | /// <param name="id"></param> | ||
17 | /// <returns></returns> | ||
18 | public static UUID FromDB(object id) | ||
19 | { | ||
20 | if( (id == null) || (id == DBNull.Value)) | ||
21 | return UUID.Zero; | ||
22 | |||
23 | if (id.GetType() == typeof(Guid)) | ||
24 | return new UUID((Guid)id); | ||
25 | |||
26 | if (id.GetType() == typeof(byte[])) | ||
27 | { | ||
28 | if (((byte[])id).Length == 0) | ||
29 | return UUID.Zero; | ||
30 | else if (((byte[])id).Length == 16) | ||
31 | return new UUID((byte[])id, 0); | ||
32 | } | ||
33 | else if (id.GetType() == typeof(string)) | ||
34 | { | ||
35 | if (((string)id).Length == 0) | ||
36 | return UUID.Zero; | ||
37 | else if (((string)id).Length == 36) | ||
38 | return new UUID((string)id); | ||
39 | } | ||
40 | |||
41 | throw new Exception("Failed to convert db value to UUID: " + id.ToString()); | ||
42 | } | ||
43 | } | ||
44 | } | ||
diff --git a/OpenSim/Data/MSSQL/MSSQLEstateData.cs b/OpenSim/Data/MSSQL/MSSQLEstateData.cs index 474f706..66931e2 100644 --- a/OpenSim/Data/MSSQL/MSSQLEstateData.cs +++ b/OpenSim/Data/MSSQL/MSSQLEstateData.cs | |||
@@ -101,22 +101,30 @@ namespace OpenSim.Data.MSSQL | |||
101 | { | 101 | { |
102 | foreach (string name in FieldList) | 102 | foreach (string name in FieldList) |
103 | { | 103 | { |
104 | if (_FieldMap[name].GetValue(es) is bool) | 104 | FieldInfo f = _FieldMap[name]; |
105 | object v = reader[name]; | ||
106 | if (f.FieldType == typeof(bool) ) | ||
105 | { | 107 | { |
106 | int v = Convert.ToInt32(reader[name]); | 108 | f.SetValue(es, Convert.ToInt32(v) != 0); |
107 | if (v != 0) | ||
108 | _FieldMap[name].SetValue(es, true); | ||
109 | else | ||
110 | _FieldMap[name].SetValue(es, false); | ||
111 | } | 109 | } |
112 | else if (_FieldMap[name].GetValue(es) is UUID) | 110 | else if (f.FieldType == typeof(UUID) ) |
113 | { | 111 | { |
114 | _FieldMap[name].SetValue(es, new UUID((Guid)reader[name])); // uuid); | 112 | f.SetValue(es, new UUID((Guid)v)); // uuid); |
115 | } | 113 | } |
116 | else | 114 | else if (f.FieldType == typeof(string)) |
115 | { | ||
116 | f.SetValue(es, v.ToString()); | ||
117 | } | ||
118 | else if (f.FieldType == typeof(UInt32)) | ||
117 | { | 119 | { |
118 | es.EstateID = Convert.ToUInt32(reader["EstateID"].ToString()); | 120 | f.SetValue(es, Convert.ToUInt32(v)); |
119 | } | 121 | } |
122 | else if (f.FieldType == typeof(Single)) | ||
123 | { | ||
124 | f.SetValue(es, Convert.ToSingle(v)); | ||
125 | } | ||
126 | else | ||
127 | f.SetValue(es, v); | ||
120 | } | 128 | } |
121 | } | 129 | } |
122 | else | 130 | else |
@@ -288,61 +296,45 @@ namespace OpenSim.Data.MSSQL | |||
288 | private void SaveBanList(EstateSettings es) | 296 | private void SaveBanList(EstateSettings es) |
289 | { | 297 | { |
290 | //Delete first | 298 | //Delete first |
291 | string sql = "delete from estateban where EstateID = @EstateID"; | ||
292 | using (SqlConnection conn = new SqlConnection(m_connectionString)) | 299 | using (SqlConnection conn = new SqlConnection(m_connectionString)) |
293 | using (SqlCommand cmd = new SqlCommand(sql, conn)) | ||
294 | { | 300 | { |
295 | cmd.Parameters.Add(_Database.CreateParameter("@EstateID", es.EstateID)); | ||
296 | conn.Open(); | 301 | conn.Open(); |
297 | cmd.ExecuteNonQuery(); | 302 | using (SqlCommand cmd = conn.CreateCommand()) |
298 | } | ||
299 | |||
300 | //Insert after | ||
301 | sql = "insert into estateban (EstateID, bannedUUID) values ( @EstateID, @bannedUUID )"; | ||
302 | using (SqlConnection conn = new SqlConnection(m_connectionString)) | ||
303 | using (SqlCommand cmd = new SqlCommand(sql, conn)) | ||
304 | { | ||
305 | foreach (EstateBan b in es.EstateBans) | ||
306 | { | 303 | { |
307 | cmd.Parameters.Add(_Database.CreateParameter("@EstateID", es.EstateID)); | 304 | cmd.CommandText = "delete from estateban where EstateID = @EstateID"; |
308 | cmd.Parameters.Add(_Database.CreateParameter("@bannedUUID", b.BannedUserID)); | 305 | cmd.Parameters.AddWithValue("@EstateID", (int)es.EstateID); |
309 | conn.Open(); | ||
310 | cmd.ExecuteNonQuery(); | 306 | cmd.ExecuteNonQuery(); |
311 | cmd.Parameters.Clear(); | 307 | |
308 | //Insert after | ||
309 | cmd.CommandText = "insert into estateban (EstateID, bannedUUID) values ( @EstateID, @bannedUUID )"; | ||
310 | cmd.Parameters.AddWithValue("@bannedUUID", Guid.Empty); | ||
311 | foreach (EstateBan b in es.EstateBans) | ||
312 | { | ||
313 | cmd.Parameters["@bannedUUID"].Value = b.BannedUserID.Guid; | ||
314 | cmd.ExecuteNonQuery(); | ||
315 | } | ||
312 | } | 316 | } |
313 | } | 317 | } |
314 | } | 318 | } |
315 | 319 | ||
316 | private void SaveUUIDList(uint estateID, string table, UUID[] data) | 320 | private void SaveUUIDList(uint estateID, string table, UUID[] data) |
317 | { | 321 | { |
318 | //Delete first | ||
319 | string sql = string.Format("delete from {0} where EstateID = @EstateID", table); | ||
320 | using (SqlConnection conn = new SqlConnection(m_connectionString)) | 322 | using (SqlConnection conn = new SqlConnection(m_connectionString)) |
321 | using (SqlCommand cmd = new SqlCommand(sql, conn)) | ||
322 | { | ||
323 | cmd.Parameters.Add(_Database.CreateParameter("@EstateID", estateID)); | ||
324 | cmd.ExecuteNonQuery(); | ||
325 | } | ||
326 | |||
327 | sql = string.Format("insert into {0} (EstateID, uuid) values ( @EstateID, @uuid )", table); | ||
328 | using (SqlConnection conn = new SqlConnection(m_connectionString)) | ||
329 | using (SqlCommand cmd = new SqlCommand(sql, conn)) | ||
330 | { | 323 | { |
331 | cmd.Parameters.Add(_Database.CreateParameter("@EstateID", estateID)); | 324 | conn.Open(); |
332 | 325 | using (SqlCommand cmd = conn.CreateCommand()) | |
333 | bool createParamOnce = true; | ||
334 | |||
335 | foreach (UUID uuid in data) | ||
336 | { | 326 | { |
337 | if (createParamOnce) | 327 | cmd.Parameters.AddWithValue("@EstateID", (int)estateID); |
328 | cmd.CommandText = string.Format("delete from {0} where EstateID = @EstateID", table); | ||
329 | cmd.ExecuteNonQuery(); | ||
330 | |||
331 | cmd.CommandText = string.Format("insert into {0} (EstateID, uuid) values ( @EstateID, @uuid )", table); | ||
332 | cmd.Parameters.AddWithValue("@uuid", Guid.Empty); | ||
333 | foreach (UUID uuid in data) | ||
338 | { | 334 | { |
339 | cmd.Parameters.Add(_Database.CreateParameter("@uuid", uuid)); | ||
340 | createParamOnce = false; | ||
341 | } | ||
342 | else | ||
343 | cmd.Parameters["@uuid"].Value = uuid.Guid; //.ToString(); //TODO check if this works | 335 | cmd.Parameters["@uuid"].Value = uuid.Guid; //.ToString(); //TODO check if this works |
344 | conn.Open(); | 336 | cmd.ExecuteNonQuery(); |
345 | cmd.ExecuteNonQuery(); | 337 | } |
346 | } | 338 | } |
347 | } | 339 | } |
348 | } | 340 | } |
diff --git a/OpenSim/Data/MSSQL/Resources/001_AssetStore.sql b/OpenSim/Data/MSSQL/Resources/001_AssetStore.sql deleted file mode 100644 index 2b293c7..0000000 --- a/OpenSim/Data/MSSQL/Resources/001_AssetStore.sql +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | CREATE TABLE [assets] ( | ||
2 | [id] [varchar](36) NOT NULL, | ||
3 | [name] [varchar](64) NOT NULL, | ||
4 | [description] [varchar](64) NOT NULL, | ||
5 | [assetType] [tinyint] NOT NULL, | ||
6 | [local] [tinyint] NOT NULL, | ||
7 | [temporary] [tinyint] NOT NULL, | ||
8 | [data] [image] NOT NULL, | ||
9 | PRIMARY KEY CLUSTERED | ||
10 | ( | ||
11 | [id] ASC | ||
12 | )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
13 | ) ON [PRIMARY] | ||
diff --git a/OpenSim/Data/MSSQL/Resources/001_EstateStore.sql b/OpenSim/Data/MSSQL/Resources/001_EstateStore.sql deleted file mode 100644 index 9bb2f75..0000000 --- a/OpenSim/Data/MSSQL/Resources/001_EstateStore.sql +++ /dev/null | |||
@@ -1,85 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE TABLE [dbo].[estate_managers]( | ||
4 | [EstateID] [int] NOT NULL, | ||
5 | [uuid] [varchar](36) NOT NULL, | ||
6 | CONSTRAINT [PK_estate_managers] PRIMARY KEY CLUSTERED | ||
7 | ( | ||
8 | [EstateID] ASC | ||
9 | )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] | ||
10 | ) ON [PRIMARY]; | ||
11 | |||
12 | CREATE TABLE [dbo].[estate_groups]( | ||
13 | [EstateID] [int] NOT NULL, | ||
14 | [uuid] [varchar](36) NOT NULL, | ||
15 | CONSTRAINT [PK_estate_groups] PRIMARY KEY CLUSTERED | ||
16 | ( | ||
17 | [EstateID] ASC | ||
18 | )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] | ||
19 | ) ON [PRIMARY]; | ||
20 | |||
21 | |||
22 | CREATE TABLE [dbo].[estate_users]( | ||
23 | [EstateID] [int] NOT NULL, | ||
24 | [uuid] [varchar](36) NOT NULL, | ||
25 | CONSTRAINT [PK_estate_users] PRIMARY KEY CLUSTERED | ||
26 | ( | ||
27 | [EstateID] ASC | ||
28 | )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] | ||
29 | ) ON [PRIMARY]; | ||
30 | |||
31 | |||
32 | CREATE TABLE [dbo].[estateban]( | ||
33 | [EstateID] [int] NOT NULL, | ||
34 | [bannedUUID] [varchar](36) NOT NULL, | ||
35 | [bannedIp] [varchar](16) NOT NULL, | ||
36 | [bannedIpHostMask] [varchar](16) NOT NULL, | ||
37 | [bannedNameMask] [varchar](64) NULL DEFAULT (NULL), | ||
38 | CONSTRAINT [PK_estateban] PRIMARY KEY CLUSTERED | ||
39 | ( | ||
40 | [EstateID] ASC | ||
41 | )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] | ||
42 | ) ON [PRIMARY]; | ||
43 | |||
44 | CREATE TABLE [dbo].[estate_settings]( | ||
45 | [EstateID] [int] IDENTITY(1,100) NOT NULL, | ||
46 | [EstateName] [varchar](64) NULL DEFAULT (NULL), | ||
47 | [AbuseEmailToEstateOwner] [bit] NOT NULL, | ||
48 | [DenyAnonymous] [bit] NOT NULL, | ||
49 | [ResetHomeOnTeleport] [bit] NOT NULL, | ||
50 | [FixedSun] [bit] NOT NULL, | ||
51 | [DenyTransacted] [bit] NOT NULL, | ||
52 | [BlockDwell] [bit] NOT NULL, | ||
53 | [DenyIdentified] [bit] NOT NULL, | ||
54 | [AllowVoice] [bit] NOT NULL, | ||
55 | [UseGlobalTime] [bit] NOT NULL, | ||
56 | [PricePerMeter] [int] NOT NULL, | ||
57 | [TaxFree] [bit] NOT NULL, | ||
58 | [AllowDirectTeleport] [bit] NOT NULL, | ||
59 | [RedirectGridX] [int] NOT NULL, | ||
60 | [RedirectGridY] [int] NOT NULL, | ||
61 | [ParentEstateID] [int] NOT NULL, | ||
62 | [SunPosition] [float] NOT NULL, | ||
63 | [EstateSkipScripts] [bit] NOT NULL, | ||
64 | [BillableFactor] [float] NOT NULL, | ||
65 | [PublicAccess] [bit] NOT NULL, | ||
66 | [AbuseEmail] [varchar](255) NOT NULL, | ||
67 | [EstateOwner] [varchar](36) NOT NULL, | ||
68 | [DenyMinors] [bit] NOT NULL, | ||
69 | CONSTRAINT [PK_estate_settings] PRIMARY KEY CLUSTERED | ||
70 | ( | ||
71 | [EstateID] ASC | ||
72 | )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] | ||
73 | ) ON [PRIMARY]; | ||
74 | |||
75 | |||
76 | CREATE TABLE [dbo].[estate_map]( | ||
77 | [RegionID] [varchar](36) NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'), | ||
78 | [EstateID] [int] NOT NULL, | ||
79 | CONSTRAINT [PK_estate_map] PRIMARY KEY CLUSTERED | ||
80 | ( | ||
81 | [RegionID] ASC | ||
82 | )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] | ||
83 | ) ON [PRIMARY]; | ||
84 | |||
85 | COMMIT \ No newline at end of file | ||
diff --git a/OpenSim/Data/MSSQL/Resources/001_GridStore.sql b/OpenSim/Data/MSSQL/Resources/001_GridStore.sql deleted file mode 100644 index ff15f54..0000000 --- a/OpenSim/Data/MSSQL/Resources/001_GridStore.sql +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE TABLE [dbo].[regions]( | ||
4 | [regionHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
5 | [regionName] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
6 | [uuid] [varchar](255) COLLATE Latin1_General_CI_AS NOT NULL, | ||
7 | [regionRecvKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
8 | [regionSecret] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
9 | [regionSendKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
10 | [regionDataURI] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
11 | [serverIP] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
12 | [serverPort] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
13 | [serverURI] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
14 | [locX] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
15 | [locY] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
16 | [locZ] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
17 | [eastOverrideHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
18 | [westOverrideHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
19 | [southOverrideHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
20 | [northOverrideHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
21 | [regionAssetURI] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
22 | [regionAssetRecvKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
23 | [regionAssetSendKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
24 | [regionUserURI] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
25 | [regionUserRecvKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
26 | [regionUserSendKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
27 | [regionMapTexture] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
28 | [serverHttpPort] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
29 | [serverRemotingPort] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
30 | [owner_uuid] [varchar](36) COLLATE Latin1_General_CI_AS NULL, | ||
31 | PRIMARY KEY CLUSTERED | ||
32 | ( | ||
33 | [uuid] ASC | ||
34 | )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] | ||
35 | ) ON [PRIMARY] | ||
36 | |||
37 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/001_InventoryStore.sql b/OpenSim/Data/MSSQL/Resources/001_InventoryStore.sql deleted file mode 100644 index 836d2d1..0000000 --- a/OpenSim/Data/MSSQL/Resources/001_InventoryStore.sql +++ /dev/null | |||
@@ -1,64 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE TABLE [inventoryfolders] ( | ||
4 | [folderID] [varchar](36) NOT NULL default '', | ||
5 | [agentID] [varchar](36) default NULL, | ||
6 | [parentFolderID] [varchar](36) default NULL, | ||
7 | [folderName] [varchar](64) default NULL, | ||
8 | [type] [smallint] NOT NULL default 0, | ||
9 | [version] [int] NOT NULL default 0, | ||
10 | PRIMARY KEY CLUSTERED | ||
11 | ( | ||
12 | [folderID] ASC | ||
13 | )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
14 | ) ON [PRIMARY] | ||
15 | |||
16 | CREATE NONCLUSTERED INDEX [owner] ON [inventoryfolders] | ||
17 | ( | ||
18 | [agentID] ASC | ||
19 | )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
20 | |||
21 | CREATE NONCLUSTERED INDEX [parent] ON [inventoryfolders] | ||
22 | ( | ||
23 | [parentFolderID] ASC | ||
24 | )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
25 | |||
26 | |||
27 | CREATE TABLE [inventoryitems] ( | ||
28 | [inventoryID] [varchar](36) NOT NULL default '', | ||
29 | [assetID] [varchar](36) default NULL, | ||
30 | [assetType] [int] default NULL, | ||
31 | [parentFolderID] [varchar](36) default NULL, | ||
32 | [avatarID] [varchar](36) default NULL, | ||
33 | [inventoryName] [varchar](64) default NULL, | ||
34 | [inventoryDescription] [varchar](128) default NULL, | ||
35 | [inventoryNextPermissions] [int] default NULL, | ||
36 | [inventoryCurrentPermissions] [int] default NULL, | ||
37 | [invType] [int] default NULL, | ||
38 | [creatorID] [varchar](36) default NULL, | ||
39 | [inventoryBasePermissions] [int] NOT NULL default 0, | ||
40 | [inventoryEveryOnePermissions] [int] NOT NULL default 0, | ||
41 | [salePrice] [int] default NULL, | ||
42 | [saleType] [tinyint] default NULL, | ||
43 | [creationDate] [int] default NULL, | ||
44 | [groupID] [varchar](36) default NULL, | ||
45 | [groupOwned] [bit] default NULL, | ||
46 | [flags] [int] default NULL, | ||
47 | PRIMARY KEY CLUSTERED | ||
48 | ( | ||
49 | [inventoryID] ASC | ||
50 | )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
51 | ) ON [PRIMARY] | ||
52 | |||
53 | |||
54 | CREATE NONCLUSTERED INDEX [owner] ON [inventoryitems] | ||
55 | ( | ||
56 | [avatarID] ASC | ||
57 | )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
58 | |||
59 | CREATE NONCLUSTERED INDEX [folder] ON [inventoryitems] | ||
60 | ( | ||
61 | [parentFolderID] ASC | ||
62 | )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
63 | |||
64 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/001_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/001_RegionStore.sql deleted file mode 100644 index fe7c58f..0000000 --- a/OpenSim/Data/MSSQL/Resources/001_RegionStore.sql +++ /dev/null | |||
@@ -1,161 +0,0 @@ | |||
1 | CREATE TABLE [dbo].[prims]( | ||
2 | [UUID] [varchar](255) NOT NULL, | ||
3 | [RegionUUID] [varchar](255) NULL, | ||
4 | [ParentID] [int] NULL, | ||
5 | [CreationDate] [int] NULL, | ||
6 | [Name] [varchar](255) NULL, | ||
7 | [SceneGroupID] [varchar](255) NULL, | ||
8 | [Text] [varchar](255) NULL, | ||
9 | [Description] [varchar](255) NULL, | ||
10 | [SitName] [varchar](255) NULL, | ||
11 | [TouchName] [varchar](255) NULL, | ||
12 | [ObjectFlags] [int] NULL, | ||
13 | [CreatorID] [varchar](255) NULL, | ||
14 | [OwnerID] [varchar](255) NULL, | ||
15 | [GroupID] [varchar](255) NULL, | ||
16 | [LastOwnerID] [varchar](255) NULL, | ||
17 | [OwnerMask] [int] NULL, | ||
18 | [NextOwnerMask] [int] NULL, | ||
19 | [GroupMask] [int] NULL, | ||
20 | [EveryoneMask] [int] NULL, | ||
21 | [BaseMask] [int] NULL, | ||
22 | [PositionX] [float] NULL, | ||
23 | [PositionY] [float] NULL, | ||
24 | [PositionZ] [float] NULL, | ||
25 | [GroupPositionX] [float] NULL, | ||
26 | [GroupPositionY] [float] NULL, | ||
27 | [GroupPositionZ] [float] NULL, | ||
28 | [VelocityX] [float] NULL, | ||
29 | [VelocityY] [float] NULL, | ||
30 | [VelocityZ] [float] NULL, | ||
31 | [AngularVelocityX] [float] NULL, | ||
32 | [AngularVelocityY] [float] NULL, | ||
33 | [AngularVelocityZ] [float] NULL, | ||
34 | [AccelerationX] [float] NULL, | ||
35 | [AccelerationY] [float] NULL, | ||
36 | [AccelerationZ] [float] NULL, | ||
37 | [RotationX] [float] NULL, | ||
38 | [RotationY] [float] NULL, | ||
39 | [RotationZ] [float] NULL, | ||
40 | [RotationW] [float] NULL, | ||
41 | [SitTargetOffsetX] [float] NULL, | ||
42 | [SitTargetOffsetY] [float] NULL, | ||
43 | [SitTargetOffsetZ] [float] NULL, | ||
44 | [SitTargetOrientW] [float] NULL, | ||
45 | [SitTargetOrientX] [float] NULL, | ||
46 | [SitTargetOrientY] [float] NULL, | ||
47 | [SitTargetOrientZ] [float] NULL, | ||
48 | PRIMARY KEY CLUSTERED | ||
49 | ( | ||
50 | [UUID] ASC | ||
51 | )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] | ||
52 | ) ON [PRIMARY] | ||
53 | |||
54 | CREATE TABLE [dbo].[primshapes]( | ||
55 | [UUID] [varchar](255) NOT NULL, | ||
56 | [Shape] [int] NULL, | ||
57 | [ScaleX] [float] NULL, | ||
58 | [ScaleY] [float] NULL, | ||
59 | [ScaleZ] [float] NULL, | ||
60 | [PCode] [int] NULL, | ||
61 | [PathBegin] [int] NULL, | ||
62 | [PathEnd] [int] NULL, | ||
63 | [PathScaleX] [int] NULL, | ||
64 | [PathScaleY] [int] NULL, | ||
65 | [PathShearX] [int] NULL, | ||
66 | [PathShearY] [int] NULL, | ||
67 | [PathSkew] [int] NULL, | ||
68 | [PathCurve] [int] NULL, | ||
69 | [PathRadiusOffset] [int] NULL, | ||
70 | [PathRevolutions] [int] NULL, | ||
71 | [PathTaperX] [int] NULL, | ||
72 | [PathTaperY] [int] NULL, | ||
73 | [PathTwist] [int] NULL, | ||
74 | [PathTwistBegin] [int] NULL, | ||
75 | [ProfileBegin] [int] NULL, | ||
76 | [ProfileEnd] [int] NULL, | ||
77 | [ProfileCurve] [int] NULL, | ||
78 | [ProfileHollow] [int] NULL, | ||
79 | [State] [int] NULL, | ||
80 | [Texture] [image] NULL, | ||
81 | [ExtraParams] [image] NULL, | ||
82 | PRIMARY KEY CLUSTERED | ||
83 | ( | ||
84 | [UUID] ASC | ||
85 | )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] | ||
86 | ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] | ||
87 | |||
88 | CREATE TABLE [dbo].[primitems]( | ||
89 | [itemID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, | ||
90 | [primID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, | ||
91 | [assetID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, | ||
92 | [parentFolderID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, | ||
93 | [invType] [int] NULL, | ||
94 | [assetType] [int] NULL, | ||
95 | [name] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, | ||
96 | [description] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, | ||
97 | [creationDate] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, | ||
98 | [creatorID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, | ||
99 | [ownerID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, | ||
100 | [lastOwnerID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, | ||
101 | [groupID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, | ||
102 | [nextPermissions] [int] NULL, | ||
103 | [currentPermissions] [int] NULL, | ||
104 | [basePermissions] [int] NULL, | ||
105 | [everyonePermissions] [int] NULL, | ||
106 | [groupPermissions] [int] NULL, | ||
107 | PRIMARY KEY CLUSTERED | ||
108 | ( | ||
109 | [itemID] ASC | ||
110 | )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] | ||
111 | ) ON [PRIMARY] | ||
112 | |||
113 | CREATE TABLE [dbo].[terrain]( | ||
114 | [RegionUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, | ||
115 | [Revision] [int] NULL, | ||
116 | [Heightfield] [image] NULL | ||
117 | ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] | ||
118 | |||
119 | CREATE TABLE [dbo].[land]( | ||
120 | [UUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, | ||
121 | [RegionUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, | ||
122 | [LocalLandID] [int] NULL, | ||
123 | [Bitmap] [image] NULL, | ||
124 | [Name] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, | ||
125 | [Description] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, | ||
126 | [OwnerUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, | ||
127 | [IsGroupOwned] [int] NULL, | ||
128 | [Area] [int] NULL, | ||
129 | [AuctionID] [int] NULL, | ||
130 | [Category] [int] NULL, | ||
131 | [ClaimDate] [int] NULL, | ||
132 | [ClaimPrice] [int] NULL, | ||
133 | [GroupUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, | ||
134 | [SalePrice] [int] NULL, | ||
135 | [LandStatus] [int] NULL, | ||
136 | [LandFlags] [int] NULL, | ||
137 | [LandingType] [int] NULL, | ||
138 | [MediaAutoScale] [int] NULL, | ||
139 | [MediaTextureUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, | ||
140 | [MediaURL] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, | ||
141 | [MusicURL] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, | ||
142 | [PassHours] [float] NULL, | ||
143 | [PassPrice] [int] NULL, | ||
144 | [SnapshotUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, | ||
145 | [UserLocationX] [float] NULL, | ||
146 | [UserLocationY] [float] NULL, | ||
147 | [UserLocationZ] [float] NULL, | ||
148 | [UserLookAtX] [float] NULL, | ||
149 | [UserLookAtY] [float] NULL, | ||
150 | [UserLookAtZ] [float] NULL, | ||
151 | PRIMARY KEY CLUSTERED | ||
152 | ( | ||
153 | [UUID] ASC | ||
154 | )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] | ||
155 | ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] | ||
156 | |||
157 | CREATE TABLE [dbo].[landaccesslist]( | ||
158 | [LandUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, | ||
159 | [AccessUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, | ||
160 | [Flags] [int] NULL | ||
161 | ) ON [PRIMARY] \ No newline at end of file | ||
diff --git a/OpenSim/Data/MSSQL/Resources/001_UserAccount.sql b/OpenSim/Data/MSSQL/Resources/001_UserAccount.sql deleted file mode 100644 index 3dbf8a4..0000000 --- a/OpenSim/Data/MSSQL/Resources/001_UserAccount.sql +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | CREATE TABLE [UserAccounts] ( | ||
2 | [PrincipalID] uniqueidentifier NOT NULL, | ||
3 | [ScopeID] uniqueidentifier NOT NULL, | ||
4 | [FirstName] [varchar](64) NOT NULL, | ||
5 | [LastName] [varchar](64) NOT NULL, | ||
6 | [Email] [varchar](64) NULL, | ||
7 | [ServiceURLs] [text] NULL, | ||
8 | [Created] [int] default NULL, | ||
9 | |||
10 | PRIMARY KEY CLUSTERED | ||
11 | ( | ||
12 | [PrincipalID] ASC | ||
13 | )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
14 | ) ON [PRIMARY] | ||
diff --git a/OpenSim/Data/MSSQL/Resources/001_UserStore.sql b/OpenSim/Data/MSSQL/Resources/001_UserStore.sql deleted file mode 100644 index 160c457..0000000 --- a/OpenSim/Data/MSSQL/Resources/001_UserStore.sql +++ /dev/null | |||
@@ -1,112 +0,0 @@ | |||
1 | CREATE TABLE [users] ( | ||
2 | [UUID] [varchar](36) NOT NULL default '', | ||
3 | [username] [varchar](32) NOT NULL, | ||
4 | [lastname] [varchar](32) NOT NULL, | ||
5 | [passwordHash] [varchar](32) NOT NULL, | ||
6 | [passwordSalt] [varchar](32) NOT NULL, | ||
7 | [homeRegion] [bigint] default NULL, | ||
8 | [homeLocationX] [float] default NULL, | ||
9 | [homeLocationY] [float] default NULL, | ||
10 | [homeLocationZ] [float] default NULL, | ||
11 | [homeLookAtX] [float] default NULL, | ||
12 | [homeLookAtY] [float] default NULL, | ||
13 | [homeLookAtZ] [float] default NULL, | ||
14 | [created] [int] NOT NULL, | ||
15 | [lastLogin] [int] NOT NULL, | ||
16 | [userInventoryURI] [varchar](255) default NULL, | ||
17 | [userAssetURI] [varchar](255) default NULL, | ||
18 | [profileCanDoMask] [int] default NULL, | ||
19 | [profileWantDoMask] [int] default NULL, | ||
20 | [profileAboutText] [ntext], | ||
21 | [profileFirstText] [ntext], | ||
22 | [profileImage] [varchar](36) default NULL, | ||
23 | [profileFirstImage] [varchar](36) default NULL, | ||
24 | [webLoginKey] [varchar](36) default NULL, | ||
25 | PRIMARY KEY CLUSTERED | ||
26 | ( | ||
27 | [UUID] ASC | ||
28 | )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
29 | ) ON [PRIMARY] | ||
30 | |||
31 | |||
32 | CREATE NONCLUSTERED INDEX [usernames] ON [users] | ||
33 | ( | ||
34 | [username] ASC, | ||
35 | [lastname] ASC | ||
36 | )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
37 | |||
38 | |||
39 | CREATE TABLE [agents] ( | ||
40 | [UUID] [varchar](36) NOT NULL, | ||
41 | [sessionID] [varchar](36) NOT NULL, | ||
42 | [secureSessionID] [varchar](36) NOT NULL, | ||
43 | [agentIP] [varchar](16) NOT NULL, | ||
44 | [agentPort] [int] NOT NULL, | ||
45 | [agentOnline] [tinyint] NOT NULL, | ||
46 | [loginTime] [int] NOT NULL, | ||
47 | [logoutTime] [int] NOT NULL, | ||
48 | [currentRegion] [varchar](36) NOT NULL, | ||
49 | [currentHandle] [bigint] NOT NULL, | ||
50 | [currentPos] [varchar](64) NOT NULL, | ||
51 | PRIMARY KEY CLUSTERED | ||
52 | ( | ||
53 | [UUID] ASC | ||
54 | )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
55 | ) ON [PRIMARY] | ||
56 | |||
57 | |||
58 | CREATE NONCLUSTERED INDEX [session] ON [agents] | ||
59 | ( | ||
60 | [sessionID] ASC | ||
61 | )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
62 | |||
63 | CREATE NONCLUSTERED INDEX [ssession] ON [agents] | ||
64 | ( | ||
65 | [secureSessionID] ASC | ||
66 | )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
67 | |||
68 | |||
69 | CREATE TABLE [dbo].[userfriends]( | ||
70 | [ownerID] [varchar](50) COLLATE Latin1_General_CI_AS NOT NULL, | ||
71 | [friendID] [varchar](50) COLLATE Latin1_General_CI_AS NOT NULL, | ||
72 | [friendPerms] [nvarchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, | ||
73 | [datetimestamp] [nvarchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL | ||
74 | ) ON [PRIMARY] | ||
75 | |||
76 | CREATE TABLE [avatarappearance] ( | ||
77 | [Owner] [varchar](36) NOT NULL, | ||
78 | [Serial] int NOT NULL, | ||
79 | [Visual_Params] [image] NOT NULL, | ||
80 | [Texture] [image] NOT NULL, | ||
81 | [Avatar_Height] float NOT NULL, | ||
82 | [Body_Item] [varchar](36) NOT NULL, | ||
83 | [Body_Asset] [varchar](36) NOT NULL, | ||
84 | [Skin_Item] [varchar](36) NOT NULL, | ||
85 | [Skin_Asset] [varchar](36) NOT NULL, | ||
86 | [Hair_Item] [varchar](36) NOT NULL, | ||
87 | [Hair_Asset] [varchar](36) NOT NULL, | ||
88 | [Eyes_Item] [varchar](36) NOT NULL, | ||
89 | [Eyes_Asset] [varchar](36) NOT NULL, | ||
90 | [Shirt_Item] [varchar](36) NOT NULL, | ||
91 | [Shirt_Asset] [varchar](36) NOT NULL, | ||
92 | [Pants_Item] [varchar](36) NOT NULL, | ||
93 | [Pants_Asset] [varchar](36) NOT NULL, | ||
94 | [Shoes_Item] [varchar](36) NOT NULL, | ||
95 | [Shoes_Asset] [varchar](36) NOT NULL, | ||
96 | [Socks_Item] [varchar](36) NOT NULL, | ||
97 | [Socks_Asset] [varchar](36) NOT NULL, | ||
98 | [Jacket_Item] [varchar](36) NOT NULL, | ||
99 | [Jacket_Asset] [varchar](36) NOT NULL, | ||
100 | [Gloves_Item] [varchar](36) NOT NULL, | ||
101 | [Gloves_Asset] [varchar](36) NOT NULL, | ||
102 | [Undershirt_Item] [varchar](36) NOT NULL, | ||
103 | [Undershirt_Asset] [varchar](36) NOT NULL, | ||
104 | [Underpants_Item] [varchar](36) NOT NULL, | ||
105 | [Underpants_Asset] [varchar](36) NOT NULL, | ||
106 | [Skirt_Item] [varchar](36) NOT NULL, | ||
107 | [Skirt_Asset] [varchar](36) NOT NULL, | ||
108 | |||
109 | PRIMARY KEY CLUSTERED ( | ||
110 | [Owner] | ||
111 | ) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
112 | ) ON [PRIMARY] | ||
diff --git a/OpenSim/Data/MSSQL/Resources/002_AssetStore.sql b/OpenSim/Data/MSSQL/Resources/002_AssetStore.sql deleted file mode 100644 index 3e24543..0000000 --- a/OpenSim/Data/MSSQL/Resources/002_AssetStore.sql +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE TABLE Tmp_assets | ||
4 | ( | ||
5 | id varchar(36) NOT NULL, | ||
6 | name varchar(64) NOT NULL, | ||
7 | description varchar(64) NOT NULL, | ||
8 | assetType tinyint NOT NULL, | ||
9 | local bit NOT NULL, | ||
10 | temporary bit NOT NULL, | ||
11 | data image NOT NULL | ||
12 | ) ON [PRIMARY] | ||
13 | TEXTIMAGE_ON [PRIMARY] | ||
14 | |||
15 | IF EXISTS(SELECT * FROM assets) | ||
16 | EXEC('INSERT INTO Tmp_assets (id, name, description, assetType, local, temporary, data) | ||
17 | SELECT id, name, description, assetType, CONVERT(bit, local), CONVERT(bit, temporary), data FROM assets WITH (HOLDLOCK TABLOCKX)') | ||
18 | |||
19 | DROP TABLE assets | ||
20 | |||
21 | EXECUTE sp_rename N'Tmp_assets', N'assets', 'OBJECT' | ||
22 | |||
23 | ALTER TABLE dbo.assets ADD CONSTRAINT | ||
24 | PK__assets__id PRIMARY KEY CLUSTERED | ||
25 | ( | ||
26 | id | ||
27 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
28 | |||
29 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/002_AuthStore.sql b/OpenSim/Data/MSSQL/Resources/002_AuthStore.sql deleted file mode 100644 index daed955..0000000 --- a/OpenSim/Data/MSSQL/Resources/002_AuthStore.sql +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | INSERT INTO auth (UUID, passwordHash, passwordSalt, webLoginKey, accountType) SELECT [UUID] AS UUID, [passwordHash] AS passwordHash, [passwordSalt] AS passwordSalt, [webLoginKey] AS webLoginKey, 'UserAccount' as [accountType] FROM users; | ||
4 | |||
5 | |||
6 | COMMIT \ No newline at end of file | ||
diff --git a/OpenSim/Data/MSSQL/Resources/002_EstateStore.sql b/OpenSim/Data/MSSQL/Resources/002_EstateStore.sql deleted file mode 100644 index 18c12c0..0000000 --- a/OpenSim/Data/MSSQL/Resources/002_EstateStore.sql +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | ALTER TABLE dbo.estate_managers DROP CONSTRAINT PK_estate_managers | ||
4 | |||
5 | CREATE NONCLUSTERED INDEX IX_estate_managers ON dbo.estate_managers | ||
6 | ( | ||
7 | EstateID | ||
8 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
9 | |||
10 | ALTER TABLE dbo.estate_groups DROP CONSTRAINT PK_estate_groups | ||
11 | |||
12 | CREATE NONCLUSTERED INDEX IX_estate_groups ON dbo.estate_groups | ||
13 | ( | ||
14 | EstateID | ||
15 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
16 | |||
17 | |||
18 | ALTER TABLE dbo.estate_users DROP CONSTRAINT PK_estate_users | ||
19 | |||
20 | CREATE NONCLUSTERED INDEX IX_estate_users ON dbo.estate_users | ||
21 | ( | ||
22 | EstateID | ||
23 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
24 | |||
25 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/002_FriendsStore.sql b/OpenSim/Data/MSSQL/Resources/002_FriendsStore.sql deleted file mode 100644 index e67d20e..0000000 --- a/OpenSim/Data/MSSQL/Resources/002_FriendsStore.sql +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | INSERT INTO Friends (PrincipalID, Friend, Flags, Offered) SELECT [ownerID], [friendID], [friendPerms], 0 FROM userfriends; | ||
4 | |||
5 | |||
6 | COMMIT \ No newline at end of file | ||
diff --git a/OpenSim/Data/MSSQL/Resources/002_GridStore.sql b/OpenSim/Data/MSSQL/Resources/002_GridStore.sql deleted file mode 100644 index f5901cb..0000000 --- a/OpenSim/Data/MSSQL/Resources/002_GridStore.sql +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE TABLE Tmp_regions | ||
4 | ( | ||
5 | uuid varchar(36) COLLATE Latin1_General_CI_AS NOT NULL, | ||
6 | regionHandle bigint NULL, | ||
7 | regionName varchar(20) NULL, | ||
8 | regionRecvKey varchar(128) NULL, | ||
9 | regionSendKey varchar(128) NULL, | ||
10 | regionSecret varchar(128) NULL, | ||
11 | regionDataURI varchar(128) NULL, | ||
12 | serverIP varchar(64) NULL, | ||
13 | serverPort int NULL, | ||
14 | serverURI varchar(255) NULL, | ||
15 | locX int NULL, | ||
16 | locY int NULL, | ||
17 | locZ int NULL, | ||
18 | eastOverrideHandle bigint NULL, | ||
19 | westOverrideHandle bigint NULL, | ||
20 | southOverrideHandle bigint NULL, | ||
21 | northOverrideHandle bigint NULL, | ||
22 | regionAssetURI varchar(255) NULL, | ||
23 | regionAssetRecvKey varchar(128) NULL, | ||
24 | regionAssetSendKey varchar(128) NULL, | ||
25 | regionUserURI varchar(255) NULL, | ||
26 | regionUserRecvKey varchar(128) NULL, | ||
27 | regionUserSendKey varchar(128) NULL, | ||
28 | regionMapTexture varchar(36) NULL, | ||
29 | serverHttpPort int NULL, | ||
30 | serverRemotingPort int NULL, | ||
31 | owner_uuid varchar(36) NULL, | ||
32 | originUUID varchar(36) NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000') | ||
33 | ) ON [PRIMARY] | ||
34 | |||
35 | IF EXISTS(SELECT * FROM regions) | ||
36 | EXEC('INSERT INTO Tmp_regions (uuid, regionHandle, regionName, regionRecvKey, regionSendKey, regionSecret, regionDataURI, serverIP, serverPort, serverURI, locX, locY, locZ, eastOverrideHandle, westOverrideHandle, southOverrideHandle, northOverrideHandle, regionAssetURI, regionAssetRecvKey, regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey, regionMapTexture, serverHttpPort, serverRemotingPort, owner_uuid) | ||
37 | SELECT CONVERT(varchar(36), uuid), CONVERT(bigint, regionHandle), CONVERT(varchar(20), regionName), CONVERT(varchar(128), regionRecvKey), CONVERT(varchar(128), regionSendKey), CONVERT(varchar(128), regionSecret), CONVERT(varchar(128), regionDataURI), CONVERT(varchar(64), serverIP), CONVERT(int, serverPort), serverURI, CONVERT(int, locX), CONVERT(int, locY), CONVERT(int, locZ), CONVERT(bigint, eastOverrideHandle), CONVERT(bigint, westOverrideHandle), CONVERT(bigint, southOverrideHandle), CONVERT(bigint, northOverrideHandle), regionAssetURI, CONVERT(varchar(128), regionAssetRecvKey), CONVERT(varchar(128), regionAssetSendKey), regionUserURI, CONVERT(varchar(128), regionUserRecvKey), CONVERT(varchar(128), regionUserSendKey), CONVERT(varchar(36), regionMapTexture), CONVERT(int, serverHttpPort), CONVERT(int, serverRemotingPort), owner_uuid FROM regions') | ||
38 | |||
39 | DROP TABLE regions | ||
40 | |||
41 | EXECUTE sp_rename N'Tmp_regions', N'regions', 'OBJECT' | ||
42 | |||
43 | ALTER TABLE regions ADD CONSTRAINT | ||
44 | PK__regions__uuid PRIMARY KEY CLUSTERED | ||
45 | ( | ||
46 | uuid | ||
47 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
48 | |||
49 | COMMIT \ No newline at end of file | ||
diff --git a/OpenSim/Data/MSSQL/Resources/002_InventoryStore.sql b/OpenSim/Data/MSSQL/Resources/002_InventoryStore.sql deleted file mode 100644 index bcc26b8..0000000 --- a/OpenSim/Data/MSSQL/Resources/002_InventoryStore.sql +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | ALTER TABLE inventoryitems ADD inventoryGroupPermissions INTEGER NOT NULL default 0 | ||
4 | |||
5 | COMMIT \ No newline at end of file | ||
diff --git a/OpenSim/Data/MSSQL/Resources/002_Presence.sql b/OpenSim/Data/MSSQL/Resources/002_Presence.sql deleted file mode 100644 index a67671d..0000000 --- a/OpenSim/Data/MSSQL/Resources/002_Presence.sql +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE UNIQUE INDEX SessionID ON Presence(SessionID); | ||
4 | CREATE INDEX UserID ON Presence(UserID); | ||
5 | |||
6 | COMMIT \ No newline at end of file | ||
diff --git a/OpenSim/Data/MSSQL/Resources/002_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/002_RegionStore.sql deleted file mode 100644 index 1801035..0000000 --- a/OpenSim/Data/MSSQL/Resources/002_RegionStore.sql +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE TABLE regionban ( | ||
4 | [regionUUID] VARCHAR(36) NOT NULL, | ||
5 | [bannedUUID] VARCHAR(36) NOT NULL, | ||
6 | [bannedIp] VARCHAR(16) NOT NULL, | ||
7 | [bannedIpHostMask] VARCHAR(16) NOT NULL) | ||
8 | |||
9 | create table [dbo].[regionsettings] ( | ||
10 | [regionUUID] [varchar](36) not null, | ||
11 | [block_terraform] [bit] not null, | ||
12 | [block_fly] [bit] not null, | ||
13 | [allow_damage] [bit] not null, | ||
14 | [restrict_pushing] [bit] not null, | ||
15 | [allow_land_resell] [bit] not null, | ||
16 | [allow_land_join_divide] [bit] not null, | ||
17 | [block_show_in_search] [bit] not null, | ||
18 | [agent_limit] [int] not null, | ||
19 | [object_bonus] [float] not null, | ||
20 | [maturity] [int] not null, | ||
21 | [disable_scripts] [bit] not null, | ||
22 | [disable_collisions] [bit] not null, | ||
23 | [disable_physics] [bit] not null, | ||
24 | [terrain_texture_1] [varchar](36) not null, | ||
25 | [terrain_texture_2] [varchar](36) not null, | ||
26 | [terrain_texture_3] [varchar](36) not null, | ||
27 | [terrain_texture_4] [varchar](36) not null, | ||
28 | [elevation_1_nw] [float] not null, | ||
29 | [elevation_2_nw] [float] not null, | ||
30 | [elevation_1_ne] [float] not null, | ||
31 | [elevation_2_ne] [float] not null, | ||
32 | [elevation_1_se] [float] not null, | ||
33 | [elevation_2_se] [float] not null, | ||
34 | [elevation_1_sw] [float] not null, | ||
35 | [elevation_2_sw] [float] not null, | ||
36 | [water_height] [float] not null, | ||
37 | [terrain_raise_limit] [float] not null, | ||
38 | [terrain_lower_limit] [float] not null, | ||
39 | [use_estate_sun] [bit] not null, | ||
40 | [fixed_sun] [bit] not null, | ||
41 | [sun_position] [float] not null, | ||
42 | [covenant] [varchar](36) default NULL, | ||
43 | [Sandbox] [bit] NOT NULL, | ||
44 | PRIMARY KEY CLUSTERED | ||
45 | ( | ||
46 | [regionUUID] ASC | ||
47 | )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] | ||
48 | ) ON [PRIMARY] | ||
49 | |||
50 | COMMIT \ No newline at end of file | ||
diff --git a/OpenSim/Data/MSSQL/Resources/002_UserAccount.sql b/OpenSim/Data/MSSQL/Resources/002_UserAccount.sql deleted file mode 100644 index 89d1f34..0000000 --- a/OpenSim/Data/MSSQL/Resources/002_UserAccount.sql +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | INSERT INTO UserAccounts (PrincipalID, ScopeID, FirstName, LastName, Email, ServiceURLs, Created) SELECT [UUID] AS PrincipalID, '00000000-0000-0000-0000-000000000000' AS ScopeID, | ||
4 | username AS FirstName, | ||
5 | lastname AS LastName, | ||
6 | email as Email, ( | ||
7 | 'AssetServerURI=' + | ||
8 | userAssetURI + ' InventoryServerURI=' + userInventoryURI + ' GatewayURI= HomeURI=') AS ServiceURLs, | ||
9 | created as Created FROM users; | ||
10 | |||
11 | |||
12 | COMMIT \ No newline at end of file | ||
diff --git a/OpenSim/Data/MSSQL/Resources/002_UserStore.sql b/OpenSim/Data/MSSQL/Resources/002_UserStore.sql deleted file mode 100644 index 402eddf..0000000 --- a/OpenSim/Data/MSSQL/Resources/002_UserStore.sql +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | ALTER TABLE users ADD homeRegionID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000'; | ||
4 | ALTER TABLE users ADD userFlags int NOT NULL default 0; | ||
5 | ALTER TABLE users ADD godLevel int NOT NULL default 0; | ||
6 | ALTER TABLE users ADD customType varchar(32) not null default ''; | ||
7 | ALTER TABLE users ADD partner varchar(36) not null default '00000000-0000-0000-0000-000000000000'; | ||
8 | |||
9 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/003_AssetStore.sql b/OpenSim/Data/MSSQL/Resources/003_AssetStore.sql deleted file mode 100644 index 1434330..0000000 --- a/OpenSim/Data/MSSQL/Resources/003_AssetStore.sql +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | ALTER TABLE assets add create_time integer default 0 | ||
4 | ALTER TABLE assets add access_time integer default 0 | ||
5 | |||
6 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/003_EstateStore.sql b/OpenSim/Data/MSSQL/Resources/003_EstateStore.sql deleted file mode 100644 index 120966a..0000000 --- a/OpenSim/Data/MSSQL/Resources/003_EstateStore.sql +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE TABLE dbo.Tmp_estateban | ||
4 | ( | ||
5 | EstateID int NOT NULL, | ||
6 | bannedUUID varchar(36) NOT NULL, | ||
7 | bannedIp varchar(16) NULL, | ||
8 | bannedIpHostMask varchar(16) NULL, | ||
9 | bannedNameMask varchar(64) NULL | ||
10 | ) ON [PRIMARY] | ||
11 | |||
12 | IF EXISTS(SELECT * FROM dbo.estateban) | ||
13 | EXEC('INSERT INTO dbo.Tmp_estateban (EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask) | ||
14 | SELECT EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask FROM dbo.estateban') | ||
15 | |||
16 | DROP TABLE dbo.estateban | ||
17 | |||
18 | EXECUTE sp_rename N'dbo.Tmp_estateban', N'estateban', 'OBJECT' | ||
19 | |||
20 | CREATE NONCLUSTERED INDEX IX_estateban ON dbo.estateban | ||
21 | ( | ||
22 | EstateID | ||
23 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
24 | |||
25 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/003_GridStore.sql b/OpenSim/Data/MSSQL/Resources/003_GridStore.sql deleted file mode 100644 index e080947..0000000 --- a/OpenSim/Data/MSSQL/Resources/003_GridStore.sql +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE NONCLUSTERED INDEX IX_regions_name ON dbo.regions | ||
4 | ( | ||
5 | regionName | ||
6 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
7 | |||
8 | CREATE NONCLUSTERED INDEX IX_regions_handle ON dbo.regions | ||
9 | ( | ||
10 | regionHandle | ||
11 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
12 | |||
13 | |||
14 | CREATE NONCLUSTERED INDEX IX_regions_override ON dbo.regions | ||
15 | ( | ||
16 | eastOverrideHandle, | ||
17 | westOverrideHandle, | ||
18 | southOverrideHandle, | ||
19 | northOverrideHandle | ||
20 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
21 | |||
22 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/003_InventoryStore.sql b/OpenSim/Data/MSSQL/Resources/003_InventoryStore.sql deleted file mode 100644 index 2f623ec..0000000 --- a/OpenSim/Data/MSSQL/Resources/003_InventoryStore.sql +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | /* To prevent any potential data loss issues, you should review this script in detail before running it outside the context of the database designer.*/ | ||
2 | BEGIN TRANSACTION | ||
3 | |||
4 | CREATE TABLE dbo.Tmp_inventoryfolders | ||
5 | ( | ||
6 | folderID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'), | ||
7 | agentID uniqueidentifier NULL DEFAULT (NULL), | ||
8 | parentFolderID uniqueidentifier NULL DEFAULT (NULL), | ||
9 | folderName varchar(64) NULL DEFAULT (NULL), | ||
10 | type smallint NOT NULL DEFAULT ((0)), | ||
11 | version int NOT NULL DEFAULT ((0)) | ||
12 | ) ON [PRIMARY] | ||
13 | |||
14 | IF EXISTS(SELECT * FROM dbo.inventoryfolders) | ||
15 | EXEC('INSERT INTO dbo.Tmp_inventoryfolders (folderID, agentID, parentFolderID, folderName, type, version) | ||
16 | SELECT CONVERT(uniqueidentifier, folderID), CONVERT(uniqueidentifier, agentID), CONVERT(uniqueidentifier, parentFolderID), folderName, type, version FROM dbo.inventoryfolders WITH (HOLDLOCK TABLOCKX)') | ||
17 | |||
18 | DROP TABLE dbo.inventoryfolders | ||
19 | |||
20 | EXECUTE sp_rename N'dbo.Tmp_inventoryfolders', N'inventoryfolders', 'OBJECT' | ||
21 | |||
22 | ALTER TABLE dbo.inventoryfolders ADD CONSTRAINT | ||
23 | PK__inventor__C2FABFB3173876EA PRIMARY KEY CLUSTERED | ||
24 | ( | ||
25 | folderID | ||
26 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
27 | |||
28 | CREATE NONCLUSTERED INDEX owner ON dbo.inventoryfolders | ||
29 | ( | ||
30 | agentID | ||
31 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
32 | |||
33 | CREATE NONCLUSTERED INDEX parent ON dbo.inventoryfolders | ||
34 | ( | ||
35 | parentFolderID | ||
36 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
37 | |||
38 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/003_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/003_RegionStore.sql deleted file mode 100644 index a8f40c2..0000000 --- a/OpenSim/Data/MSSQL/Resources/003_RegionStore.sql +++ /dev/null | |||
@@ -1,67 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE TABLE dbo.Tmp_prims | ||
4 | ( | ||
5 | UUID varchar(36) NOT NULL, | ||
6 | RegionUUID varchar(36) NULL, | ||
7 | ParentID int NULL, | ||
8 | CreationDate int NULL, | ||
9 | Name varchar(255) NULL, | ||
10 | SceneGroupID varchar(36) NULL, | ||
11 | Text varchar(255) NULL, | ||
12 | Description varchar(255) NULL, | ||
13 | SitName varchar(255) NULL, | ||
14 | TouchName varchar(255) NULL, | ||
15 | ObjectFlags int NULL, | ||
16 | CreatorID varchar(36) NULL, | ||
17 | OwnerID varchar(36) NULL, | ||
18 | GroupID varchar(36) NULL, | ||
19 | LastOwnerID varchar(36) NULL, | ||
20 | OwnerMask int NULL, | ||
21 | NextOwnerMask int NULL, | ||
22 | GroupMask int NULL, | ||
23 | EveryoneMask int NULL, | ||
24 | BaseMask int NULL, | ||
25 | PositionX float(53) NULL, | ||
26 | PositionY float(53) NULL, | ||
27 | PositionZ float(53) NULL, | ||
28 | GroupPositionX float(53) NULL, | ||
29 | GroupPositionY float(53) NULL, | ||
30 | GroupPositionZ float(53) NULL, | ||
31 | VelocityX float(53) NULL, | ||
32 | VelocityY float(53) NULL, | ||
33 | VelocityZ float(53) NULL, | ||
34 | AngularVelocityX float(53) NULL, | ||
35 | AngularVelocityY float(53) NULL, | ||
36 | AngularVelocityZ float(53) NULL, | ||
37 | AccelerationX float(53) NULL, | ||
38 | AccelerationY float(53) NULL, | ||
39 | AccelerationZ float(53) NULL, | ||
40 | RotationX float(53) NULL, | ||
41 | RotationY float(53) NULL, | ||
42 | RotationZ float(53) NULL, | ||
43 | RotationW float(53) NULL, | ||
44 | SitTargetOffsetX float(53) NULL, | ||
45 | SitTargetOffsetY float(53) NULL, | ||
46 | SitTargetOffsetZ float(53) NULL, | ||
47 | SitTargetOrientW float(53) NULL, | ||
48 | SitTargetOrientX float(53) NULL, | ||
49 | SitTargetOrientY float(53) NULL, | ||
50 | SitTargetOrientZ float(53) NULL | ||
51 | ) ON [PRIMARY] | ||
52 | |||
53 | IF EXISTS(SELECT * FROM dbo.prims) | ||
54 | EXEC('INSERT INTO dbo.Tmp_prims (UUID, RegionUUID, ParentID, CreationDate, Name, SceneGroupID, Text, Description, SitName, TouchName, ObjectFlags, CreatorID, OwnerID, GroupID, LastOwnerID, OwnerMask, NextOwnerMask, GroupMask, EveryoneMask, BaseMask, PositionX, PositionY, PositionZ, GroupPositionX, GroupPositionY, GroupPositionZ, VelocityX, VelocityY, VelocityZ, AngularVelocityX, AngularVelocityY, AngularVelocityZ, AccelerationX, AccelerationY, AccelerationZ, RotationX, RotationY, RotationZ, RotationW, SitTargetOffsetX, SitTargetOffsetY, SitTargetOffsetZ, SitTargetOrientW, SitTargetOrientX, SitTargetOrientY, SitTargetOrientZ) | ||
55 | SELECT CONVERT(varchar(36), UUID), CONVERT(varchar(36), RegionUUID), ParentID, CreationDate, Name, CONVERT(varchar(36), SceneGroupID), Text, Description, SitName, TouchName, ObjectFlags, CONVERT(varchar(36), CreatorID), CONVERT(varchar(36), OwnerID), CONVERT(varchar(36), GroupID), CONVERT(varchar(36), LastOwnerID), OwnerMask, NextOwnerMask, GroupMask, EveryoneMask, BaseMask, PositionX, PositionY, PositionZ, GroupPositionX, GroupPositionY, GroupPositionZ, VelocityX, VelocityY, VelocityZ, AngularVelocityX, AngularVelocityY, AngularVelocityZ, AccelerationX, AccelerationY, AccelerationZ, RotationX, RotationY, RotationZ, RotationW, SitTargetOffsetX, SitTargetOffsetY, SitTargetOffsetZ, SitTargetOrientW, SitTargetOrientX, SitTargetOrientY, SitTargetOrientZ FROM dbo.prims WITH (HOLDLOCK TABLOCKX)') | ||
56 | |||
57 | DROP TABLE dbo.prims | ||
58 | |||
59 | EXECUTE sp_rename N'dbo.Tmp_prims', N'prims', 'OBJECT' | ||
60 | |||
61 | ALTER TABLE dbo.prims ADD CONSTRAINT | ||
62 | PK__prims__10566F31 PRIMARY KEY CLUSTERED | ||
63 | ( | ||
64 | UUID | ||
65 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
66 | |||
67 | COMMIT \ No newline at end of file | ||
diff --git a/OpenSim/Data/MSSQL/Resources/003_UserAccount.sql b/OpenSim/Data/MSSQL/Resources/003_UserAccount.sql deleted file mode 100644 index da0395b..0000000 --- a/OpenSim/Data/MSSQL/Resources/003_UserAccount.sql +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE UNIQUE INDEX PrincipalID ON UserAccounts(PrincipalID); | ||
4 | CREATE INDEX Email ON UserAccounts(Email); | ||
5 | CREATE INDEX FirstName ON UserAccounts(FirstName); | ||
6 | CREATE INDEX LastName ON UserAccounts(LastName); | ||
7 | CREATE INDEX Name ON UserAccounts(FirstName,LastName); | ||
8 | |||
9 | COMMIT \ No newline at end of file | ||
diff --git a/OpenSim/Data/MSSQL/Resources/003_UserStore.sql b/OpenSim/Data/MSSQL/Resources/003_UserStore.sql deleted file mode 100644 index cb507c9..0000000 --- a/OpenSim/Data/MSSQL/Resources/003_UserStore.sql +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE TABLE [avatarattachments] ( | ||
4 | [UUID] varchar(36) NOT NULL | ||
5 | , [attachpoint] int NOT NULL | ||
6 | , [item] varchar(36) NOT NULL | ||
7 | , [asset] varchar(36) NOT NULL) | ||
8 | |||
9 | CREATE NONCLUSTERED INDEX IX_avatarattachments ON dbo.avatarattachments | ||
10 | ( | ||
11 | UUID | ||
12 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
13 | |||
14 | |||
15 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/004_AssetStore.sql b/OpenSim/Data/MSSQL/Resources/004_AssetStore.sql deleted file mode 100644 index 215cf3a..0000000 --- a/OpenSim/Data/MSSQL/Resources/004_AssetStore.sql +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE TABLE dbo.Tmp_assets | ||
4 | ( | ||
5 | id uniqueidentifier NOT NULL, | ||
6 | name varchar(64) NOT NULL, | ||
7 | description varchar(64) NOT NULL, | ||
8 | assetType tinyint NOT NULL, | ||
9 | local bit NOT NULL, | ||
10 | temporary bit NOT NULL, | ||
11 | data image NOT NULL, | ||
12 | create_time int NULL, | ||
13 | access_time int NULL | ||
14 | ) ON [PRIMARY] | ||
15 | TEXTIMAGE_ON [PRIMARY] | ||
16 | |||
17 | IF EXISTS(SELECT * FROM dbo.assets) | ||
18 | EXEC('INSERT INTO dbo.Tmp_assets (id, name, description, assetType, local, temporary, data, create_time, access_time) | ||
19 | SELECT CONVERT(uniqueidentifier, id), name, description, assetType, local, temporary, data, create_time, access_time FROM dbo.assets WITH (HOLDLOCK TABLOCKX)') | ||
20 | |||
21 | DROP TABLE assets | ||
22 | |||
23 | EXECUTE sp_rename N'Tmp_assets', N'assets', 'OBJECT' | ||
24 | |||
25 | ALTER TABLE dbo.assets ADD CONSTRAINT | ||
26 | PK__assets__id PRIMARY KEY CLUSTERED | ||
27 | ( | ||
28 | id | ||
29 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
30 | |||
31 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/004_EstateStore.sql b/OpenSim/Data/MSSQL/Resources/004_EstateStore.sql deleted file mode 100644 index 0a132c1..0000000 --- a/OpenSim/Data/MSSQL/Resources/004_EstateStore.sql +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE TABLE dbo.Tmp_estate_managers | ||
4 | ( | ||
5 | EstateID int NOT NULL, | ||
6 | uuid uniqueidentifier NOT NULL | ||
7 | ) ON [PRIMARY] | ||
8 | |||
9 | IF EXISTS(SELECT * FROM dbo.estate_managers) | ||
10 | EXEC('INSERT INTO dbo.Tmp_estate_managers (EstateID, uuid) | ||
11 | SELECT EstateID, CONVERT(uniqueidentifier, uuid) FROM dbo.estate_managers WITH (HOLDLOCK TABLOCKX)') | ||
12 | |||
13 | DROP TABLE dbo.estate_managers | ||
14 | |||
15 | EXECUTE sp_rename N'dbo.Tmp_estate_managers', N'estate_managers', 'OBJECT' | ||
16 | |||
17 | CREATE NONCLUSTERED INDEX IX_estate_managers ON dbo.estate_managers | ||
18 | ( | ||
19 | EstateID | ||
20 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
21 | |||
22 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/004_GridStore.sql b/OpenSim/Data/MSSQL/Resources/004_GridStore.sql deleted file mode 100644 index 6456c95..0000000 --- a/OpenSim/Data/MSSQL/Resources/004_GridStore.sql +++ /dev/null | |||
@@ -1,68 +0,0 @@ | |||
1 | /* To prevent any potential data loss issues, you should review this script in detail before running it outside the context of the database designer.*/ | ||
2 | BEGIN TRANSACTION | ||
3 | |||
4 | CREATE TABLE dbo.Tmp_regions | ||
5 | ( | ||
6 | uuid uniqueidentifier NOT NULL, | ||
7 | regionHandle bigint NULL, | ||
8 | regionName varchar(20) NULL, | ||
9 | regionRecvKey varchar(128) NULL, | ||
10 | regionSendKey varchar(128) NULL, | ||
11 | regionSecret varchar(128) NULL, | ||
12 | regionDataURI varchar(128) NULL, | ||
13 | serverIP varchar(64) NULL, | ||
14 | serverPort int NULL, | ||
15 | serverURI varchar(255) NULL, | ||
16 | locX int NULL, | ||
17 | locY int NULL, | ||
18 | locZ int NULL, | ||
19 | eastOverrideHandle bigint NULL, | ||
20 | westOverrideHandle bigint NULL, | ||
21 | southOverrideHandle bigint NULL, | ||
22 | northOverrideHandle bigint NULL, | ||
23 | regionAssetURI varchar(255) NULL, | ||
24 | regionAssetRecvKey varchar(128) NULL, | ||
25 | regionAssetSendKey varchar(128) NULL, | ||
26 | regionUserURI varchar(255) NULL, | ||
27 | regionUserRecvKey varchar(128) NULL, | ||
28 | regionUserSendKey varchar(128) NULL, | ||
29 | regionMapTexture uniqueidentifier NULL, | ||
30 | serverHttpPort int NULL, | ||
31 | serverRemotingPort int NULL, | ||
32 | owner_uuid uniqueidentifier NOT NULL, | ||
33 | originUUID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000') | ||
34 | ) ON [PRIMARY] | ||
35 | |||
36 | IF EXISTS(SELECT * FROM dbo.regions) | ||
37 | EXEC('INSERT INTO dbo.Tmp_regions (uuid, regionHandle, regionName, regionRecvKey, regionSendKey, regionSecret, regionDataURI, serverIP, serverPort, serverURI, locX, locY, locZ, eastOverrideHandle, westOverrideHandle, southOverrideHandle, northOverrideHandle, regionAssetURI, regionAssetRecvKey, regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey, regionMapTexture, serverHttpPort, serverRemotingPort, owner_uuid, originUUID) | ||
38 | SELECT CONVERT(uniqueidentifier, uuid), regionHandle, regionName, regionRecvKey, regionSendKey, regionSecret, regionDataURI, serverIP, serverPort, serverURI, locX, locY, locZ, eastOverrideHandle, westOverrideHandle, southOverrideHandle, northOverrideHandle, regionAssetURI, regionAssetRecvKey, regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey, CONVERT(uniqueidentifier, regionMapTexture), serverHttpPort, serverRemotingPort, CONVERT(uniqueidentifier, owner_uuid), CONVERT(uniqueidentifier, originUUID) FROM dbo.regions WITH (HOLDLOCK TABLOCKX)') | ||
39 | |||
40 | DROP TABLE dbo.regions | ||
41 | |||
42 | EXECUTE sp_rename N'dbo.Tmp_regions', N'regions', 'OBJECT' | ||
43 | |||
44 | ALTER TABLE dbo.regions ADD CONSTRAINT | ||
45 | PK__regions__uuid PRIMARY KEY CLUSTERED | ||
46 | ( | ||
47 | uuid | ||
48 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
49 | |||
50 | CREATE NONCLUSTERED INDEX IX_regions_name ON dbo.regions | ||
51 | ( | ||
52 | regionName | ||
53 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
54 | |||
55 | CREATE NONCLUSTERED INDEX IX_regions_handle ON dbo.regions | ||
56 | ( | ||
57 | regionHandle | ||
58 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
59 | |||
60 | CREATE NONCLUSTERED INDEX IX_regions_override ON dbo.regions | ||
61 | ( | ||
62 | eastOverrideHandle, | ||
63 | westOverrideHandle, | ||
64 | southOverrideHandle, | ||
65 | northOverrideHandle | ||
66 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
67 | |||
68 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/004_InventoryStore.sql b/OpenSim/Data/MSSQL/Resources/004_InventoryStore.sql deleted file mode 100644 index 96ef1c0..0000000 --- a/OpenSim/Data/MSSQL/Resources/004_InventoryStore.sql +++ /dev/null | |||
@@ -1,52 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE TABLE dbo.Tmp_inventoryitems | ||
4 | ( | ||
5 | inventoryID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'), | ||
6 | assetID uniqueidentifier NULL DEFAULT (NULL), | ||
7 | assetType int NULL DEFAULT (NULL), | ||
8 | parentFolderID uniqueidentifier NULL DEFAULT (NULL), | ||
9 | avatarID uniqueidentifier NULL DEFAULT (NULL), | ||
10 | inventoryName varchar(64) NULL DEFAULT (NULL), | ||
11 | inventoryDescription varchar(128) NULL DEFAULT (NULL), | ||
12 | inventoryNextPermissions int NULL DEFAULT (NULL), | ||
13 | inventoryCurrentPermissions int NULL DEFAULT (NULL), | ||
14 | invType int NULL DEFAULT (NULL), | ||
15 | creatorID uniqueidentifier NULL DEFAULT (NULL), | ||
16 | inventoryBasePermissions int NOT NULL DEFAULT ((0)), | ||
17 | inventoryEveryOnePermissions int NOT NULL DEFAULT ((0)), | ||
18 | salePrice int NULL DEFAULT (NULL), | ||
19 | saleType tinyint NULL DEFAULT (NULL), | ||
20 | creationDate int NULL DEFAULT (NULL), | ||
21 | groupID uniqueidentifier NULL DEFAULT (NULL), | ||
22 | groupOwned bit NULL DEFAULT (NULL), | ||
23 | flags int NULL DEFAULT (NULL), | ||
24 | inventoryGroupPermissions int NOT NULL DEFAULT ((0)) | ||
25 | ) ON [PRIMARY] | ||
26 | |||
27 | IF EXISTS(SELECT * FROM dbo.inventoryitems) | ||
28 | EXEC('INSERT INTO dbo.Tmp_inventoryitems (inventoryID, assetID, assetType, parentFolderID, avatarID, inventoryName, inventoryDescription, inventoryNextPermissions, inventoryCurrentPermissions, invType, creatorID, inventoryBasePermissions, inventoryEveryOnePermissions, salePrice, saleType, creationDate, groupID, groupOwned, flags, inventoryGroupPermissions) | ||
29 | SELECT CONVERT(uniqueidentifier, inventoryID), CONVERT(uniqueidentifier, assetID), assetType, CONVERT(uniqueidentifier, parentFolderID), CONVERT(uniqueidentifier, avatarID), inventoryName, inventoryDescription, inventoryNextPermissions, inventoryCurrentPermissions, invType, CONVERT(uniqueidentifier, creatorID), inventoryBasePermissions, inventoryEveryOnePermissions, salePrice, saleType, creationDate, CONVERT(uniqueidentifier, groupID), groupOwned, flags, inventoryGroupPermissions FROM dbo.inventoryitems WITH (HOLDLOCK TABLOCKX)') | ||
30 | |||
31 | DROP TABLE dbo.inventoryitems | ||
32 | |||
33 | EXECUTE sp_rename N'dbo.Tmp_inventoryitems', N'inventoryitems', 'OBJECT' | ||
34 | |||
35 | ALTER TABLE dbo.inventoryitems ADD CONSTRAINT | ||
36 | PK__inventor__C4B7BC2220C1E124 PRIMARY KEY CLUSTERED | ||
37 | ( | ||
38 | inventoryID | ||
39 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
40 | |||
41 | |||
42 | CREATE NONCLUSTERED INDEX owner ON dbo.inventoryitems | ||
43 | ( | ||
44 | avatarID | ||
45 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
46 | |||
47 | CREATE NONCLUSTERED INDEX folder ON dbo.inventoryitems | ||
48 | ( | ||
49 | parentFolderID | ||
50 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
51 | |||
52 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/004_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/004_RegionStore.sql deleted file mode 100644 index 15b39a7..0000000 --- a/OpenSim/Data/MSSQL/Resources/004_RegionStore.sql +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE TABLE Tmp_primitems | ||
4 | ( | ||
5 | itemID varchar(36) NOT NULL, | ||
6 | primID varchar(36) NULL, | ||
7 | assetID varchar(36) NULL, | ||
8 | parentFolderID varchar(36) NULL, | ||
9 | invType int NULL, | ||
10 | assetType int NULL, | ||
11 | name varchar(255) NULL, | ||
12 | description varchar(255) NULL, | ||
13 | creationDate varchar(255) NULL, | ||
14 | creatorID varchar(36) NULL, | ||
15 | ownerID varchar(36) NULL, | ||
16 | lastOwnerID varchar(36) NULL, | ||
17 | groupID varchar(36) NULL, | ||
18 | nextPermissions int NULL, | ||
19 | currentPermissions int NULL, | ||
20 | basePermissions int NULL, | ||
21 | everyonePermissions int NULL, | ||
22 | groupPermissions int NULL | ||
23 | ) ON [PRIMARY] | ||
24 | |||
25 | IF EXISTS(SELECT * FROM primitems) | ||
26 | EXEC('INSERT INTO Tmp_primitems (itemID, primID, assetID, parentFolderID, invType, assetType, name, description, creationDate, creatorID, ownerID, lastOwnerID, groupID, nextPermissions, currentPermissions, basePermissions, everyonePermissions, groupPermissions) | ||
27 | SELECT CONVERT(varchar(36), itemID), CONVERT(varchar(36), primID), CONVERT(varchar(36), assetID), CONVERT(varchar(36), parentFolderID), invType, assetType, name, description, creationDate, CONVERT(varchar(36), creatorID), CONVERT(varchar(36), ownerID), CONVERT(varchar(36), lastOwnerID), CONVERT(varchar(36), groupID), nextPermissions, currentPermissions, basePermissions, everyonePermissions, groupPermissions') | ||
28 | |||
29 | DROP TABLE primitems | ||
30 | |||
31 | EXECUTE sp_rename N'Tmp_primitems', N'primitems', 'OBJECT' | ||
32 | |||
33 | ALTER TABLE primitems ADD CONSTRAINT | ||
34 | PK__primitems__0A688BB1 PRIMARY KEY CLUSTERED | ||
35 | ( | ||
36 | itemID | ||
37 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
38 | |||
39 | |||
40 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/004_UserAccount.sql b/OpenSim/Data/MSSQL/Resources/004_UserAccount.sql deleted file mode 100644 index a9a9021..0000000 --- a/OpenSim/Data/MSSQL/Resources/004_UserAccount.sql +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | ALTER TABLE UserAccounts ADD UserLevel integer NOT NULL DEFAULT 0; | ||
4 | ALTER TABLE UserAccounts ADD UserFlags integer NOT NULL DEFAULT 0; | ||
5 | ALTER TABLE UserAccounts ADD UserTitle varchar(64) NOT NULL DEFAULT ''; | ||
6 | |||
7 | COMMIT \ No newline at end of file | ||
diff --git a/OpenSim/Data/MSSQL/Resources/004_UserStore.sql b/OpenSim/Data/MSSQL/Resources/004_UserStore.sql deleted file mode 100644 index 08f1a1d..0000000 --- a/OpenSim/Data/MSSQL/Resources/004_UserStore.sql +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE TABLE Tmp_userfriends | ||
4 | ( | ||
5 | ownerID varchar(36) NOT NULL, | ||
6 | friendID varchar(36) NOT NULL, | ||
7 | friendPerms int NOT NULL, | ||
8 | datetimestamp int NOT NULL | ||
9 | ) ON [PRIMARY] | ||
10 | |||
11 | IF EXISTS(SELECT * FROM userfriends) | ||
12 | EXEC('INSERT INTO dbo.Tmp_userfriends (ownerID, friendID, friendPerms, datetimestamp) | ||
13 | SELECT CONVERT(varchar(36), ownerID), CONVERT(varchar(36), friendID), CONVERT(int, friendPerms), CONVERT(int, datetimestamp) FROM dbo.userfriends WITH (HOLDLOCK TABLOCKX)') | ||
14 | |||
15 | DROP TABLE dbo.userfriends | ||
16 | |||
17 | EXECUTE sp_rename N'Tmp_userfriends', N'userfriends', 'OBJECT' | ||
18 | |||
19 | CREATE NONCLUSTERED INDEX IX_userfriends_ownerID ON userfriends | ||
20 | ( | ||
21 | ownerID | ||
22 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
23 | |||
24 | CREATE NONCLUSTERED INDEX IX_userfriends_friendID ON userfriends | ||
25 | ( | ||
26 | friendID | ||
27 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
28 | |||
29 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/005_AssetStore.sql b/OpenSim/Data/MSSQL/Resources/005_AssetStore.sql deleted file mode 100644 index 4e95b2b..0000000 --- a/OpenSim/Data/MSSQL/Resources/005_AssetStore.sql +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | DELETE FROM assets WHERE id = 'dc4b9f0b-d008-45c6-96a4-01dd947ac621'; | ||
diff --git a/OpenSim/Data/MSSQL/Resources/005_EstateStore.sql b/OpenSim/Data/MSSQL/Resources/005_EstateStore.sql deleted file mode 100644 index ba93b39..0000000 --- a/OpenSim/Data/MSSQL/Resources/005_EstateStore.sql +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE TABLE dbo.Tmp_estate_groups | ||
4 | ( | ||
5 | EstateID int NOT NULL, | ||
6 | uuid uniqueidentifier NOT NULL | ||
7 | ) ON [PRIMARY] | ||
8 | |||
9 | IF EXISTS(SELECT * FROM dbo.estate_groups) | ||
10 | EXEC('INSERT INTO dbo.Tmp_estate_groups (EstateID, uuid) | ||
11 | SELECT EstateID, CONVERT(uniqueidentifier, uuid) FROM dbo.estate_groups WITH (HOLDLOCK TABLOCKX)') | ||
12 | |||
13 | DROP TABLE dbo.estate_groups | ||
14 | |||
15 | EXECUTE sp_rename N'dbo.Tmp_estate_groups', N'estate_groups', 'OBJECT' | ||
16 | |||
17 | CREATE NONCLUSTERED INDEX IX_estate_groups ON dbo.estate_groups | ||
18 | ( | ||
19 | EstateID | ||
20 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
21 | |||
22 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/005_GridStore.sql b/OpenSim/Data/MSSQL/Resources/005_GridStore.sql deleted file mode 100644 index aa04a33..0000000 --- a/OpenSim/Data/MSSQL/Resources/005_GridStore.sql +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | ALTER TABLE regions ADD access int default 0; | ||
4 | |||
5 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/005_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/005_RegionStore.sql deleted file mode 100644 index eb0862c..0000000 --- a/OpenSim/Data/MSSQL/Resources/005_RegionStore.sql +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE TABLE Tmp_primshapes | ||
4 | ( | ||
5 | UUID varchar(36) NOT NULL, | ||
6 | Shape int NULL, | ||
7 | ScaleX float(53) NULL, | ||
8 | ScaleY float(53) NULL, | ||
9 | ScaleZ float(53) NULL, | ||
10 | PCode int NULL, | ||
11 | PathBegin int NULL, | ||
12 | PathEnd int NULL, | ||
13 | PathScaleX int NULL, | ||
14 | PathScaleY int NULL, | ||
15 | PathShearX int NULL, | ||
16 | PathShearY int NULL, | ||
17 | PathSkew int NULL, | ||
18 | PathCurve int NULL, | ||
19 | PathRadiusOffset int NULL, | ||
20 | PathRevolutions int NULL, | ||
21 | PathTaperX int NULL, | ||
22 | PathTaperY int NULL, | ||
23 | PathTwist int NULL, | ||
24 | PathTwistBegin int NULL, | ||
25 | ProfileBegin int NULL, | ||
26 | ProfileEnd int NULL, | ||
27 | ProfileCurve int NULL, | ||
28 | ProfileHollow int NULL, | ||
29 | State int NULL, | ||
30 | Texture image NULL, | ||
31 | ExtraParams image NULL | ||
32 | ) ON [PRIMARY] | ||
33 | TEXTIMAGE_ON [PRIMARY] | ||
34 | |||
35 | IF EXISTS(SELECT * FROM primshapes) | ||
36 | EXEC('INSERT INTO Tmp_primshapes (UUID, Shape, ScaleX, ScaleY, ScaleZ, PCode, PathBegin, PathEnd, PathScaleX, PathScaleY, PathShearX, PathShearY, PathSkew, PathCurve, PathRadiusOffset, PathRevolutions, PathTaperX, PathTaperY, PathTwist, PathTwistBegin, ProfileBegin, ProfileEnd, ProfileCurve, ProfileHollow, State, Texture, ExtraParams) | ||
37 | SELECT CONVERT(varchar(36), UUID), Shape, ScaleX, ScaleY, ScaleZ, PCode, PathBegin, PathEnd, PathScaleX, PathScaleY, PathShearX, PathShearY, PathSkew, PathCurve, PathRadiusOffset, PathRevolutions, PathTaperX, PathTaperY, PathTwist, PathTwistBegin, ProfileBegin, ProfileEnd, ProfileCurve, ProfileHollow, State, Texture, ExtraParams FROM primshapes WITH (HOLDLOCK TABLOCKX)') | ||
38 | |||
39 | DROP TABLE primshapes | ||
40 | |||
41 | EXECUTE sp_rename N'Tmp_primshapes', N'primshapes', 'OBJECT' | ||
42 | |||
43 | ALTER TABLE primshapes ADD CONSTRAINT | ||
44 | PK__primshapes__0880433F PRIMARY KEY CLUSTERED | ||
45 | ( | ||
46 | UUID | ||
47 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
48 | |||
49 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/005_UserStore.sql b/OpenSim/Data/MSSQL/Resources/005_UserStore.sql deleted file mode 100644 index 1b6ab8f..0000000 --- a/OpenSim/Data/MSSQL/Resources/005_UserStore.sql +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | ALTER TABLE users add email varchar(250); | ||
4 | |||
5 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/006_EstateStore.sql b/OpenSim/Data/MSSQL/Resources/006_EstateStore.sql deleted file mode 100644 index f7df8fd..0000000 --- a/OpenSim/Data/MSSQL/Resources/006_EstateStore.sql +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE TABLE dbo.Tmp_estate_users | ||
4 | ( | ||
5 | EstateID int NOT NULL, | ||
6 | uuid uniqueidentifier NOT NULL | ||
7 | ) ON [PRIMARY] | ||
8 | |||
9 | IF EXISTS(SELECT * FROM dbo.estate_users) | ||
10 | EXEC('INSERT INTO dbo.Tmp_estate_users (EstateID, uuid) | ||
11 | SELECT EstateID, CONVERT(uniqueidentifier, uuid) FROM dbo.estate_users WITH (HOLDLOCK TABLOCKX)') | ||
12 | |||
13 | DROP TABLE dbo.estate_users | ||
14 | |||
15 | EXECUTE sp_rename N'dbo.Tmp_estate_users', N'estate_users', 'OBJECT' | ||
16 | |||
17 | CREATE NONCLUSTERED INDEX IX_estate_users ON dbo.estate_users | ||
18 | ( | ||
19 | EstateID | ||
20 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
21 | |||
22 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/006_GridStore.sql b/OpenSim/Data/MSSQL/Resources/006_GridStore.sql deleted file mode 100644 index 42010ce..0000000 --- a/OpenSim/Data/MSSQL/Resources/006_GridStore.sql +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | ALTER TABLE regions ADD scopeid uniqueidentifier default '00000000-0000-0000-0000-000000000000'; | ||
4 | ALTER TABLE regions ADD DEFAULT ('00000000-0000-0000-0000-000000000000') FOR [owner_uuid]; | ||
5 | ALTER TABLE regions ADD sizeX integer not null default 0; | ||
6 | ALTER TABLE regions ADD sizeY integer not null default 0; | ||
7 | |||
8 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/006_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/006_RegionStore.sql deleted file mode 100644 index 0419c0c..0000000 --- a/OpenSim/Data/MSSQL/Resources/006_RegionStore.sql +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | ALTER TABLE prims ADD PayPrice int not null default 0 | ||
4 | ALTER TABLE prims ADD PayButton1 int not null default 0 | ||
5 | ALTER TABLE prims ADD PayButton2 int not null default 0 | ||
6 | ALTER TABLE prims ADD PayButton3 int not null default 0 | ||
7 | ALTER TABLE prims ADD PayButton4 int not null default 0 | ||
8 | ALTER TABLE prims ADD LoopedSound varchar(36) not null default '00000000-0000-0000-0000-000000000000'; | ||
9 | ALTER TABLE prims ADD LoopedSoundGain float not null default 0.0; | ||
10 | ALTER TABLE prims ADD TextureAnimation image | ||
11 | ALTER TABLE prims ADD OmegaX float not null default 0.0 | ||
12 | ALTER TABLE prims ADD OmegaY float not null default 0.0 | ||
13 | ALTER TABLE prims ADD OmegaZ float not null default 0.0 | ||
14 | ALTER TABLE prims ADD CameraEyeOffsetX float not null default 0.0 | ||
15 | ALTER TABLE prims ADD CameraEyeOffsetY float not null default 0.0 | ||
16 | ALTER TABLE prims ADD CameraEyeOffsetZ float not null default 0.0 | ||
17 | ALTER TABLE prims ADD CameraAtOffsetX float not null default 0.0 | ||
18 | ALTER TABLE prims ADD CameraAtOffsetY float not null default 0.0 | ||
19 | ALTER TABLE prims ADD CameraAtOffsetZ float not null default 0.0 | ||
20 | ALTER TABLE prims ADD ForceMouselook tinyint not null default 0 | ||
21 | ALTER TABLE prims ADD ScriptAccessPin int not null default 0 | ||
22 | ALTER TABLE prims ADD AllowedDrop tinyint not null default 0 | ||
23 | ALTER TABLE prims ADD DieAtEdge tinyint not null default 0 | ||
24 | ALTER TABLE prims ADD SalePrice int not null default 10 | ||
25 | ALTER TABLE prims ADD SaleType tinyint not null default 0 | ||
26 | |||
27 | ALTER TABLE primitems add flags integer not null default 0 | ||
28 | |||
29 | ALTER TABLE land ADD AuthbuyerID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000' | ||
30 | |||
31 | CREATE index prims_regionuuid on prims(RegionUUID) | ||
32 | CREATE index prims_parentid on prims(ParentID) | ||
33 | |||
34 | CREATE index primitems_primid on primitems(primID) | ||
35 | |||
36 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/006_UserStore.sql b/OpenSim/Data/MSSQL/Resources/006_UserStore.sql deleted file mode 100644 index 67fe581..0000000 --- a/OpenSim/Data/MSSQL/Resources/006_UserStore.sql +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE TABLE dbo.Tmp_users | ||
4 | ( | ||
5 | UUID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'), | ||
6 | username varchar(32) NOT NULL, | ||
7 | lastname varchar(32) NOT NULL, | ||
8 | passwordHash varchar(32) NOT NULL, | ||
9 | passwordSalt varchar(32) NOT NULL, | ||
10 | homeRegion bigint NULL DEFAULT (NULL), | ||
11 | homeLocationX float(53) NULL DEFAULT (NULL), | ||
12 | homeLocationY float(53) NULL DEFAULT (NULL), | ||
13 | homeLocationZ float(53) NULL DEFAULT (NULL), | ||
14 | homeLookAtX float(53) NULL DEFAULT (NULL), | ||
15 | homeLookAtY float(53) NULL DEFAULT (NULL), | ||
16 | homeLookAtZ float(53) NULL DEFAULT (NULL), | ||
17 | created int NOT NULL, | ||
18 | lastLogin int NOT NULL, | ||
19 | userInventoryURI varchar(255) NULL DEFAULT (NULL), | ||
20 | userAssetURI varchar(255) NULL DEFAULT (NULL), | ||
21 | profileCanDoMask int NULL DEFAULT (NULL), | ||
22 | profileWantDoMask int NULL DEFAULT (NULL), | ||
23 | profileAboutText ntext NULL, | ||
24 | profileFirstText ntext NULL, | ||
25 | profileImage uniqueidentifier NULL DEFAULT (NULL), | ||
26 | profileFirstImage uniqueidentifier NULL DEFAULT (NULL), | ||
27 | webLoginKey uniqueidentifier NULL DEFAULT (NULL), | ||
28 | homeRegionID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'), | ||
29 | userFlags int NOT NULL DEFAULT ((0)), | ||
30 | godLevel int NOT NULL DEFAULT ((0)), | ||
31 | customType varchar(32) NOT NULL DEFAULT (''), | ||
32 | partner uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'), | ||
33 | email varchar(250) NULL | ||
34 | ) ON [PRIMARY] | ||
35 | TEXTIMAGE_ON [PRIMARY] | ||
36 | |||
37 | IF EXISTS(SELECT * FROM dbo.users) | ||
38 | EXEC('INSERT INTO dbo.Tmp_users (UUID, username, lastname, passwordHash, passwordSalt, homeRegion, homeLocationX, homeLocationY, homeLocationZ, homeLookAtX, homeLookAtY, homeLookAtZ, created, lastLogin, userInventoryURI, userAssetURI, profileCanDoMask, profileWantDoMask, profileAboutText, profileFirstText, profileImage, profileFirstImage, webLoginKey, homeRegionID, userFlags, godLevel, customType, partner, email) | ||
39 | SELECT CONVERT(uniqueidentifier, UUID), username, lastname, passwordHash, passwordSalt, homeRegion, homeLocationX, homeLocationY, homeLocationZ, homeLookAtX, homeLookAtY, homeLookAtZ, created, lastLogin, userInventoryURI, userAssetURI, profileCanDoMask, profileWantDoMask, profileAboutText, profileFirstText, CONVERT(uniqueidentifier, profileImage), CONVERT(uniqueidentifier, profileFirstImage), CONVERT(uniqueidentifier, webLoginKey), CONVERT(uniqueidentifier, homeRegionID), userFlags, godLevel, customType, CONVERT(uniqueidentifier, partner), email FROM dbo.users WITH (HOLDLOCK TABLOCKX)') | ||
40 | |||
41 | DROP TABLE dbo.users | ||
42 | |||
43 | EXECUTE sp_rename N'dbo.Tmp_users', N'users', 'OBJECT' | ||
44 | |||
45 | ALTER TABLE dbo.users ADD CONSTRAINT | ||
46 | PK__users__65A475E737A5467C PRIMARY KEY CLUSTERED | ||
47 | ( | ||
48 | UUID | ||
49 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
50 | |||
51 | CREATE NONCLUSTERED INDEX usernames ON dbo.users | ||
52 | ( | ||
53 | username, | ||
54 | lastname | ||
55 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
56 | |||
57 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/007_EstateStore.sql b/OpenSim/Data/MSSQL/Resources/007_EstateStore.sql deleted file mode 100644 index c9165b0..0000000 --- a/OpenSim/Data/MSSQL/Resources/007_EstateStore.sql +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE TABLE dbo.Tmp_estateban | ||
4 | ( | ||
5 | EstateID int NOT NULL, | ||
6 | bannedUUID uniqueidentifier NOT NULL, | ||
7 | bannedIp varchar(16) NULL, | ||
8 | bannedIpHostMask varchar(16) NULL, | ||
9 | bannedNameMask varchar(64) NULL | ||
10 | ) ON [PRIMARY] | ||
11 | |||
12 | IF EXISTS(SELECT * FROM dbo.estateban) | ||
13 | EXEC('INSERT INTO dbo.Tmp_estateban (EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask) | ||
14 | SELECT EstateID, CONVERT(uniqueidentifier, bannedUUID), bannedIp, bannedIpHostMask, bannedNameMask FROM dbo.estateban WITH (HOLDLOCK TABLOCKX)') | ||
15 | |||
16 | DROP TABLE dbo.estateban | ||
17 | |||
18 | EXECUTE sp_rename N'dbo.Tmp_estateban', N'estateban', 'OBJECT' | ||
19 | |||
20 | CREATE NONCLUSTERED INDEX IX_estateban ON dbo.estateban | ||
21 | ( | ||
22 | EstateID | ||
23 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
24 | |||
25 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/007_GridStore.sql b/OpenSim/Data/MSSQL/Resources/007_GridStore.sql deleted file mode 100644 index 0b66d40..0000000 --- a/OpenSim/Data/MSSQL/Resources/007_GridStore.sql +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | ALTER TABLE regions ADD [flags] integer NOT NULL DEFAULT 0; | ||
4 | CREATE INDEX [flags] ON regions(flags); | ||
5 | ALTER TABLE [regions] ADD [last_seen] integer NOT NULL DEFAULT 0; | ||
6 | ALTER TABLE [regions] ADD [PrincipalID] uniqueidentifier NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000'; | ||
7 | ALTER TABLE [regions] ADD [Token] varchar(255) NOT NULL DEFAULT 0; | ||
8 | |||
9 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/007_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/007_RegionStore.sql deleted file mode 100644 index 684f937..0000000 --- a/OpenSim/Data/MSSQL/Resources/007_RegionStore.sql +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | ALTER TABLE prims ADD ColorR int not null default 0; | ||
4 | ALTER TABLE prims ADD ColorG int not null default 0; | ||
5 | ALTER TABLE prims ADD ColorB int not null default 0; | ||
6 | ALTER TABLE prims ADD ColorA int not null default 0; | ||
7 | ALTER TABLE prims ADD ParticleSystem IMAGE; | ||
8 | ALTER TABLE prims ADD ClickAction tinyint NOT NULL default 0; | ||
9 | |||
10 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/007_UserStore.sql b/OpenSim/Data/MSSQL/Resources/007_UserStore.sql deleted file mode 100644 index 92a8fc5..0000000 --- a/OpenSim/Data/MSSQL/Resources/007_UserStore.sql +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE TABLE dbo.Tmp_agents | ||
4 | ( | ||
5 | UUID uniqueidentifier NOT NULL, | ||
6 | sessionID uniqueidentifier NOT NULL, | ||
7 | secureSessionID uniqueidentifier NOT NULL, | ||
8 | agentIP varchar(16) NOT NULL, | ||
9 | agentPort int NOT NULL, | ||
10 | agentOnline tinyint NOT NULL, | ||
11 | loginTime int NOT NULL, | ||
12 | logoutTime int NOT NULL, | ||
13 | currentRegion uniqueidentifier NOT NULL, | ||
14 | currentHandle bigint NOT NULL, | ||
15 | currentPos varchar(64) NOT NULL | ||
16 | ) ON [PRIMARY] | ||
17 | |||
18 | IF EXISTS(SELECT * FROM dbo.agents) | ||
19 | EXEC('INSERT INTO dbo.Tmp_agents (UUID, sessionID, secureSessionID, agentIP, agentPort, agentOnline, loginTime, logoutTime, currentRegion, currentHandle, currentPos) | ||
20 | SELECT CONVERT(uniqueidentifier, UUID), CONVERT(uniqueidentifier, sessionID), CONVERT(uniqueidentifier, secureSessionID), agentIP, agentPort, agentOnline, loginTime, logoutTime, CONVERT(uniqueidentifier, currentRegion), currentHandle, currentPos FROM dbo.agents WITH (HOLDLOCK TABLOCKX)') | ||
21 | |||
22 | DROP TABLE dbo.agents | ||
23 | |||
24 | EXECUTE sp_rename N'dbo.Tmp_agents', N'agents', 'OBJECT' | ||
25 | |||
26 | ALTER TABLE dbo.agents ADD CONSTRAINT | ||
27 | PK__agents__65A475E749C3F6B7 PRIMARY KEY CLUSTERED | ||
28 | ( | ||
29 | UUID | ||
30 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
31 | |||
32 | CREATE NONCLUSTERED INDEX session ON dbo.agents | ||
33 | ( | ||
34 | sessionID | ||
35 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
36 | |||
37 | CREATE NONCLUSTERED INDEX ssession ON dbo.agents | ||
38 | ( | ||
39 | secureSessionID | ||
40 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
41 | |||
42 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/008_EstateStore.sql b/OpenSim/Data/MSSQL/Resources/008_EstateStore.sql deleted file mode 100644 index 9c5355e..0000000 --- a/OpenSim/Data/MSSQL/Resources/008_EstateStore.sql +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE TABLE dbo.Tmp_estate_settings | ||
4 | ( | ||
5 | EstateID int NOT NULL IDENTITY (1, 100), | ||
6 | EstateName varchar(64) NULL DEFAULT (NULL), | ||
7 | AbuseEmailToEstateOwner bit NOT NULL, | ||
8 | DenyAnonymous bit NOT NULL, | ||
9 | ResetHomeOnTeleport bit NOT NULL, | ||
10 | FixedSun bit NOT NULL, | ||
11 | DenyTransacted bit NOT NULL, | ||
12 | BlockDwell bit NOT NULL, | ||
13 | DenyIdentified bit NOT NULL, | ||
14 | AllowVoice bit NOT NULL, | ||
15 | UseGlobalTime bit NOT NULL, | ||
16 | PricePerMeter int NOT NULL, | ||
17 | TaxFree bit NOT NULL, | ||
18 | AllowDirectTeleport bit NOT NULL, | ||
19 | RedirectGridX int NOT NULL, | ||
20 | RedirectGridY int NOT NULL, | ||
21 | ParentEstateID int NOT NULL, | ||
22 | SunPosition float(53) NOT NULL, | ||
23 | EstateSkipScripts bit NOT NULL, | ||
24 | BillableFactor float(53) NOT NULL, | ||
25 | PublicAccess bit NOT NULL, | ||
26 | AbuseEmail varchar(255) NOT NULL, | ||
27 | EstateOwner uniqueidentifier NOT NULL, | ||
28 | DenyMinors bit NOT NULL | ||
29 | ) ON [PRIMARY] | ||
30 | |||
31 | SET IDENTITY_INSERT dbo.Tmp_estate_settings ON | ||
32 | |||
33 | IF EXISTS(SELECT * FROM dbo.estate_settings) | ||
34 | EXEC('INSERT INTO dbo.Tmp_estate_settings (EstateID, EstateName, AbuseEmailToEstateOwner, DenyAnonymous, ResetHomeOnTeleport, FixedSun, DenyTransacted, BlockDwell, DenyIdentified, AllowVoice, UseGlobalTime, PricePerMeter, TaxFree, AllowDirectTeleport, RedirectGridX, RedirectGridY, ParentEstateID, SunPosition, EstateSkipScripts, BillableFactor, PublicAccess, AbuseEmail, EstateOwner, DenyMinors) | ||
35 | SELECT EstateID, EstateName, AbuseEmailToEstateOwner, DenyAnonymous, ResetHomeOnTeleport, FixedSun, DenyTransacted, BlockDwell, DenyIdentified, AllowVoice, UseGlobalTime, PricePerMeter, TaxFree, AllowDirectTeleport, RedirectGridX, RedirectGridY, ParentEstateID, SunPosition, EstateSkipScripts, BillableFactor, PublicAccess, AbuseEmail, CONVERT(uniqueidentifier, EstateOwner), DenyMinors FROM dbo.estate_settings WITH (HOLDLOCK TABLOCKX)') | ||
36 | |||
37 | SET IDENTITY_INSERT dbo.Tmp_estate_settings OFF | ||
38 | |||
39 | DROP TABLE dbo.estate_settings | ||
40 | |||
41 | EXECUTE sp_rename N'dbo.Tmp_estate_settings', N'estate_settings', 'OBJECT' | ||
42 | |||
43 | ALTER TABLE dbo.estate_settings ADD CONSTRAINT | ||
44 | PK_estate_settings PRIMARY KEY CLUSTERED | ||
45 | ( | ||
46 | EstateID | ||
47 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
48 | |||
49 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/008_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/008_RegionStore.sql deleted file mode 100644 index 87d6d80..0000000 --- a/OpenSim/Data/MSSQL/Resources/008_RegionStore.sql +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | ALTER TABLE land ADD OtherCleanTime integer NOT NULL default 0; | ||
4 | ALTER TABLE land ADD Dwell integer NOT NULL default 0; | ||
5 | |||
6 | COMMIT | ||
7 | |||
diff --git a/OpenSim/Data/MSSQL/Resources/008_UserStore.sql b/OpenSim/Data/MSSQL/Resources/008_UserStore.sql deleted file mode 100644 index 505252b..0000000 --- a/OpenSim/Data/MSSQL/Resources/008_UserStore.sql +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE TABLE dbo.Tmp_userfriends | ||
4 | ( | ||
5 | ownerID uniqueidentifier NOT NULL, | ||
6 | friendID uniqueidentifier NOT NULL, | ||
7 | friendPerms int NOT NULL, | ||
8 | datetimestamp int NOT NULL | ||
9 | ) ON [PRIMARY] | ||
10 | |||
11 | IF EXISTS(SELECT * FROM dbo.userfriends) | ||
12 | EXEC('INSERT INTO dbo.Tmp_userfriends (ownerID, friendID, friendPerms, datetimestamp) | ||
13 | SELECT CONVERT(uniqueidentifier, ownerID), CONVERT(uniqueidentifier, friendID), friendPerms, datetimestamp FROM dbo.userfriends WITH (HOLDLOCK TABLOCKX)') | ||
14 | |||
15 | DROP TABLE dbo.userfriends | ||
16 | |||
17 | EXECUTE sp_rename N'dbo.Tmp_userfriends', N'userfriends', 'OBJECT' | ||
18 | |||
19 | CREATE NONCLUSTERED INDEX IX_userfriends_ownerID ON dbo.userfriends | ||
20 | ( | ||
21 | ownerID | ||
22 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
23 | |||
24 | CREATE NONCLUSTERED INDEX IX_userfriends_friendID ON dbo.userfriends | ||
25 | ( | ||
26 | friendID | ||
27 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
28 | |||
29 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/009_EstateStore.sql b/OpenSim/Data/MSSQL/Resources/009_EstateStore.sql deleted file mode 100644 index f91557c..0000000 --- a/OpenSim/Data/MSSQL/Resources/009_EstateStore.sql +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE TABLE dbo.Tmp_estate_map | ||
4 | ( | ||
5 | RegionID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'), | ||
6 | EstateID int NOT NULL | ||
7 | ) ON [PRIMARY] | ||
8 | |||
9 | IF EXISTS(SELECT * FROM dbo.estate_map) | ||
10 | EXEC('INSERT INTO dbo.Tmp_estate_map (RegionID, EstateID) | ||
11 | SELECT CONVERT(uniqueidentifier, RegionID), EstateID FROM dbo.estate_map WITH (HOLDLOCK TABLOCKX)') | ||
12 | |||
13 | DROP TABLE dbo.estate_map | ||
14 | |||
15 | EXECUTE sp_rename N'dbo.Tmp_estate_map', N'estate_map', 'OBJECT' | ||
16 | |||
17 | ALTER TABLE dbo.estate_map ADD CONSTRAINT | ||
18 | PK_estate_map PRIMARY KEY CLUSTERED | ||
19 | ( | ||
20 | RegionID | ||
21 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
22 | |||
23 | |||
24 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/009_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/009_RegionStore.sql deleted file mode 100644 index 4ef3b3f..0000000 --- a/OpenSim/Data/MSSQL/Resources/009_RegionStore.sql +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | ALTER TABLE prims ADD Material tinyint NOT NULL default 3 | ||
4 | |||
5 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/009_UserStore.sql b/OpenSim/Data/MSSQL/Resources/009_UserStore.sql deleted file mode 100644 index b1ab8ba..0000000 --- a/OpenSim/Data/MSSQL/Resources/009_UserStore.sql +++ /dev/null | |||
@@ -1,53 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE TABLE dbo.Tmp_avatarappearance | ||
4 | ( | ||
5 | Owner uniqueidentifier NOT NULL, | ||
6 | Serial int NOT NULL, | ||
7 | Visual_Params image NOT NULL, | ||
8 | Texture image NOT NULL, | ||
9 | Avatar_Height float(53) NOT NULL, | ||
10 | Body_Item uniqueidentifier NOT NULL, | ||
11 | Body_Asset uniqueidentifier NOT NULL, | ||
12 | Skin_Item uniqueidentifier NOT NULL, | ||
13 | Skin_Asset uniqueidentifier NOT NULL, | ||
14 | Hair_Item uniqueidentifier NOT NULL, | ||
15 | Hair_Asset uniqueidentifier NOT NULL, | ||
16 | Eyes_Item uniqueidentifier NOT NULL, | ||
17 | Eyes_Asset uniqueidentifier NOT NULL, | ||
18 | Shirt_Item uniqueidentifier NOT NULL, | ||
19 | Shirt_Asset uniqueidentifier NOT NULL, | ||
20 | Pants_Item uniqueidentifier NOT NULL, | ||
21 | Pants_Asset uniqueidentifier NOT NULL, | ||
22 | Shoes_Item uniqueidentifier NOT NULL, | ||
23 | Shoes_Asset uniqueidentifier NOT NULL, | ||
24 | Socks_Item uniqueidentifier NOT NULL, | ||
25 | Socks_Asset uniqueidentifier NOT NULL, | ||
26 | Jacket_Item uniqueidentifier NOT NULL, | ||
27 | Jacket_Asset uniqueidentifier NOT NULL, | ||
28 | Gloves_Item uniqueidentifier NOT NULL, | ||
29 | Gloves_Asset uniqueidentifier NOT NULL, | ||
30 | Undershirt_Item uniqueidentifier NOT NULL, | ||
31 | Undershirt_Asset uniqueidentifier NOT NULL, | ||
32 | Underpants_Item uniqueidentifier NOT NULL, | ||
33 | Underpants_Asset uniqueidentifier NOT NULL, | ||
34 | Skirt_Item uniqueidentifier NOT NULL, | ||
35 | Skirt_Asset uniqueidentifier NOT NULL | ||
36 | ) ON [PRIMARY] | ||
37 | TEXTIMAGE_ON [PRIMARY] | ||
38 | |||
39 | IF EXISTS(SELECT * FROM dbo.avatarappearance) | ||
40 | EXEC('INSERT INTO dbo.Tmp_avatarappearance (Owner, Serial, Visual_Params, Texture, Avatar_Height, Body_Item, Body_Asset, Skin_Item, Skin_Asset, Hair_Item, Hair_Asset, Eyes_Item, Eyes_Asset, Shirt_Item, Shirt_Asset, Pants_Item, Pants_Asset, Shoes_Item, Shoes_Asset, Socks_Item, Socks_Asset, Jacket_Item, Jacket_Asset, Gloves_Item, Gloves_Asset, Undershirt_Item, Undershirt_Asset, Underpants_Item, Underpants_Asset, Skirt_Item, Skirt_Asset) | ||
41 | SELECT CONVERT(uniqueidentifier, Owner), Serial, Visual_Params, Texture, Avatar_Height, CONVERT(uniqueidentifier, Body_Item), CONVERT(uniqueidentifier, Body_Asset), CONVERT(uniqueidentifier, Skin_Item), CONVERT(uniqueidentifier, Skin_Asset), CONVERT(uniqueidentifier, Hair_Item), CONVERT(uniqueidentifier, Hair_Asset), CONVERT(uniqueidentifier, Eyes_Item), CONVERT(uniqueidentifier, Eyes_Asset), CONVERT(uniqueidentifier, Shirt_Item), CONVERT(uniqueidentifier, Shirt_Asset), CONVERT(uniqueidentifier, Pants_Item), CONVERT(uniqueidentifier, Pants_Asset), CONVERT(uniqueidentifier, Shoes_Item), CONVERT(uniqueidentifier, Shoes_Asset), CONVERT(uniqueidentifier, Socks_Item), CONVERT(uniqueidentifier, Socks_Asset), CONVERT(uniqueidentifier, Jacket_Item), CONVERT(uniqueidentifier, Jacket_Asset), CONVERT(uniqueidentifier, Gloves_Item), CONVERT(uniqueidentifier, Gloves_Asset), CONVERT(uniqueidentifier, Undershirt_Item), CONVERT(uniqueidentifier, Undershirt_Asset), CONVERT(uniqueidentifier, Underpants_Item), CONVERT(uniqueidentifier, Underpants_Asset), CONVERT(uniqueidentifier, Skirt_Item), CONVERT(uniqueidentifier, Skirt_Asset) FROM dbo.avatarappearance WITH (HOLDLOCK TABLOCKX)') | ||
42 | |||
43 | DROP TABLE dbo.avatarappearance | ||
44 | |||
45 | EXECUTE sp_rename N'dbo.Tmp_avatarappearance', N'avatarappearance', 'OBJECT' | ||
46 | |||
47 | ALTER TABLE dbo.avatarappearance ADD CONSTRAINT | ||
48 | PK__avatarap__7DD115CC4E88ABD4 PRIMARY KEY CLUSTERED | ||
49 | ( | ||
50 | Owner | ||
51 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
52 | |||
53 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/010_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/010_RegionStore.sql deleted file mode 100644 index 74ad9c2..0000000 --- a/OpenSim/Data/MSSQL/Resources/010_RegionStore.sql +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | ALTER TABLE regionsettings ADD sunvectorx float NOT NULL default 0; | ||
4 | ALTER TABLE regionsettings ADD sunvectory float NOT NULL default 0; | ||
5 | ALTER TABLE regionsettings ADD sunvectorz float NOT NULL default 0; | ||
6 | |||
7 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/010_UserStore.sql b/OpenSim/Data/MSSQL/Resources/010_UserStore.sql deleted file mode 100644 index 0af008a..0000000 --- a/OpenSim/Data/MSSQL/Resources/010_UserStore.sql +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE TABLE dbo.Tmp_avatarattachments | ||
4 | ( | ||
5 | UUID uniqueidentifier NOT NULL, | ||
6 | attachpoint int NOT NULL, | ||
7 | item uniqueidentifier NOT NULL, | ||
8 | asset uniqueidentifier NOT NULL | ||
9 | ) ON [PRIMARY] | ||
10 | |||
11 | IF EXISTS(SELECT * FROM dbo.avatarattachments) | ||
12 | EXEC('INSERT INTO dbo.Tmp_avatarattachments (UUID, attachpoint, item, asset) | ||
13 | SELECT CONVERT(uniqueidentifier, UUID), attachpoint, CONVERT(uniqueidentifier, item), CONVERT(uniqueidentifier, asset) FROM dbo.avatarattachments WITH (HOLDLOCK TABLOCKX)') | ||
14 | |||
15 | DROP TABLE dbo.avatarattachments | ||
16 | |||
17 | EXECUTE sp_rename N'dbo.Tmp_avatarattachments', N'avatarattachments', 'OBJECT' | ||
18 | |||
19 | CREATE NONCLUSTERED INDEX IX_avatarattachments ON dbo.avatarattachments | ||
20 | ( | ||
21 | UUID | ||
22 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
23 | |||
24 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/011_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/011_RegionStore.sql deleted file mode 100644 index 14c71a3..0000000 --- a/OpenSim/Data/MSSQL/Resources/011_RegionStore.sql +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | ALTER TABLE prims ADD CollisionSound char(36) not null default '00000000-0000-0000-0000-000000000000' | ||
4 | ALTER TABLE prims ADD CollisionSoundVolume float not null default 0.0 | ||
5 | |||
6 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/011_UserStore.sql b/OpenSim/Data/MSSQL/Resources/011_UserStore.sql deleted file mode 100644 index 5aa064f..0000000 --- a/OpenSim/Data/MSSQL/Resources/011_UserStore.sql +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | ALTER TABLE users ADD scopeID uniqueidentifier not null default '00000000-0000-0000-0000-000000000000' | ||
4 | |||
5 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/012_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/012_RegionStore.sql deleted file mode 100644 index eef8d90..0000000 --- a/OpenSim/Data/MSSQL/Resources/012_RegionStore.sql +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | ALTER TABLE prims ADD LinkNumber integer not null default 0 | ||
4 | |||
5 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/013_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/013_RegionStore.sql deleted file mode 100644 index ef5d4c0..0000000 --- a/OpenSim/Data/MSSQL/Resources/013_RegionStore.sql +++ /dev/null | |||
@@ -1,112 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE TABLE dbo.Tmp_prims | ||
4 | ( | ||
5 | UUID uniqueidentifier NOT NULL, | ||
6 | RegionUUID uniqueidentifier NULL, | ||
7 | ParentID int NULL, | ||
8 | CreationDate int NULL, | ||
9 | Name varchar(255) NULL, | ||
10 | SceneGroupID uniqueidentifier NULL, | ||
11 | Text varchar(255) NULL, | ||
12 | Description varchar(255) NULL, | ||
13 | SitName varchar(255) NULL, | ||
14 | TouchName varchar(255) NULL, | ||
15 | ObjectFlags int NULL, | ||
16 | CreatorID uniqueidentifier NULL, | ||
17 | OwnerID uniqueidentifier NULL, | ||
18 | GroupID uniqueidentifier NULL, | ||
19 | LastOwnerID uniqueidentifier NULL, | ||
20 | OwnerMask int NULL, | ||
21 | NextOwnerMask int NULL, | ||
22 | GroupMask int NULL, | ||
23 | EveryoneMask int NULL, | ||
24 | BaseMask int NULL, | ||
25 | PositionX float(53) NULL, | ||
26 | PositionY float(53) NULL, | ||
27 | PositionZ float(53) NULL, | ||
28 | GroupPositionX float(53) NULL, | ||
29 | GroupPositionY float(53) NULL, | ||
30 | GroupPositionZ float(53) NULL, | ||
31 | VelocityX float(53) NULL, | ||
32 | VelocityY float(53) NULL, | ||
33 | VelocityZ float(53) NULL, | ||
34 | AngularVelocityX float(53) NULL, | ||
35 | AngularVelocityY float(53) NULL, | ||
36 | AngularVelocityZ float(53) NULL, | ||
37 | AccelerationX float(53) NULL, | ||
38 | AccelerationY float(53) NULL, | ||
39 | AccelerationZ float(53) NULL, | ||
40 | RotationX float(53) NULL, | ||
41 | RotationY float(53) NULL, | ||
42 | RotationZ float(53) NULL, | ||
43 | RotationW float(53) NULL, | ||
44 | SitTargetOffsetX float(53) NULL, | ||
45 | SitTargetOffsetY float(53) NULL, | ||
46 | SitTargetOffsetZ float(53) NULL, | ||
47 | SitTargetOrientW float(53) NULL, | ||
48 | SitTargetOrientX float(53) NULL, | ||
49 | SitTargetOrientY float(53) NULL, | ||
50 | SitTargetOrientZ float(53) NULL, | ||
51 | PayPrice int NOT NULL DEFAULT ((0)), | ||
52 | PayButton1 int NOT NULL DEFAULT ((0)), | ||
53 | PayButton2 int NOT NULL DEFAULT ((0)), | ||
54 | PayButton3 int NOT NULL DEFAULT ((0)), | ||
55 | PayButton4 int NOT NULL DEFAULT ((0)), | ||
56 | LoopedSound uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'), | ||
57 | LoopedSoundGain float(53) NOT NULL DEFAULT ((0.0)), | ||
58 | TextureAnimation image NULL, | ||
59 | OmegaX float(53) NOT NULL DEFAULT ((0.0)), | ||
60 | OmegaY float(53) NOT NULL DEFAULT ((0.0)), | ||
61 | OmegaZ float(53) NOT NULL DEFAULT ((0.0)), | ||
62 | CameraEyeOffsetX float(53) NOT NULL DEFAULT ((0.0)), | ||
63 | CameraEyeOffsetY float(53) NOT NULL DEFAULT ((0.0)), | ||
64 | CameraEyeOffsetZ float(53) NOT NULL DEFAULT ((0.0)), | ||
65 | CameraAtOffsetX float(53) NOT NULL DEFAULT ((0.0)), | ||
66 | CameraAtOffsetY float(53) NOT NULL DEFAULT ((0.0)), | ||
67 | CameraAtOffsetZ float(53) NOT NULL DEFAULT ((0.0)), | ||
68 | ForceMouselook tinyint NOT NULL DEFAULT ((0)), | ||
69 | ScriptAccessPin int NOT NULL DEFAULT ((0)), | ||
70 | AllowedDrop tinyint NOT NULL DEFAULT ((0)), | ||
71 | DieAtEdge tinyint NOT NULL DEFAULT ((0)), | ||
72 | SalePrice int NOT NULL DEFAULT ((10)), | ||
73 | SaleType tinyint NOT NULL DEFAULT ((0)), | ||
74 | ColorR int NOT NULL DEFAULT ((0)), | ||
75 | ColorG int NOT NULL DEFAULT ((0)), | ||
76 | ColorB int NOT NULL DEFAULT ((0)), | ||
77 | ColorA int NOT NULL DEFAULT ((0)), | ||
78 | ParticleSystem image NULL, | ||
79 | ClickAction tinyint NOT NULL DEFAULT ((0)), | ||
80 | Material tinyint NOT NULL DEFAULT ((3)), | ||
81 | CollisionSound uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'), | ||
82 | CollisionSoundVolume float(53) NOT NULL DEFAULT ((0.0)), | ||
83 | LinkNumber int NOT NULL DEFAULT ((0)) | ||
84 | ) ON [PRIMARY] | ||
85 | TEXTIMAGE_ON [PRIMARY] | ||
86 | |||
87 | IF EXISTS(SELECT * FROM dbo.prims) | ||
88 | EXEC('INSERT INTO dbo.Tmp_prims (UUID, RegionUUID, ParentID, CreationDate, Name, SceneGroupID, Text, Description, SitName, TouchName, ObjectFlags, CreatorID, OwnerID, GroupID, LastOwnerID, OwnerMask, NextOwnerMask, GroupMask, EveryoneMask, BaseMask, PositionX, PositionY, PositionZ, GroupPositionX, GroupPositionY, GroupPositionZ, VelocityX, VelocityY, VelocityZ, AngularVelocityX, AngularVelocityY, AngularVelocityZ, AccelerationX, AccelerationY, AccelerationZ, RotationX, RotationY, RotationZ, RotationW, SitTargetOffsetX, SitTargetOffsetY, SitTargetOffsetZ, SitTargetOrientW, SitTargetOrientX, SitTargetOrientY, SitTargetOrientZ, PayPrice, PayButton1, PayButton2, PayButton3, PayButton4, LoopedSound, LoopedSoundGain, TextureAnimation, OmegaX, OmegaY, OmegaZ, CameraEyeOffsetX, CameraEyeOffsetY, CameraEyeOffsetZ, CameraAtOffsetX, CameraAtOffsetY, CameraAtOffsetZ, ForceMouselook, ScriptAccessPin, AllowedDrop, DieAtEdge, SalePrice, SaleType, ColorR, ColorG, ColorB, ColorA, ParticleSystem, ClickAction, Material, CollisionSound, CollisionSoundVolume, LinkNumber) | ||
89 | SELECT CONVERT(uniqueidentifier, UUID), CONVERT(uniqueidentifier, RegionUUID), ParentID, CreationDate, Name, CONVERT(uniqueidentifier, SceneGroupID), Text, Description, SitName, TouchName, ObjectFlags, CONVERT(uniqueidentifier, CreatorID), CONVERT(uniqueidentifier, OwnerID), CONVERT(uniqueidentifier, GroupID), CONVERT(uniqueidentifier, LastOwnerID), OwnerMask, NextOwnerMask, GroupMask, EveryoneMask, BaseMask, PositionX, PositionY, PositionZ, GroupPositionX, GroupPositionY, GroupPositionZ, VelocityX, VelocityY, VelocityZ, AngularVelocityX, AngularVelocityY, AngularVelocityZ, AccelerationX, AccelerationY, AccelerationZ, RotationX, RotationY, RotationZ, RotationW, SitTargetOffsetX, SitTargetOffsetY, SitTargetOffsetZ, SitTargetOrientW, SitTargetOrientX, SitTargetOrientY, SitTargetOrientZ, PayPrice, PayButton1, PayButton2, PayButton3, PayButton4, CONVERT(uniqueidentifier, LoopedSound), LoopedSoundGain, TextureAnimation, OmegaX, OmegaY, OmegaZ, CameraEyeOffsetX, CameraEyeOffsetY, CameraEyeOffsetZ, CameraAtOffsetX, CameraAtOffsetY, CameraAtOffsetZ, ForceMouselook, ScriptAccessPin, AllowedDrop, DieAtEdge, SalePrice, SaleType, ColorR, ColorG, ColorB, ColorA, ParticleSystem, ClickAction, Material, CONVERT(uniqueidentifier, CollisionSound), CollisionSoundVolume, LinkNumber FROM dbo.prims WITH (HOLDLOCK TABLOCKX)') | ||
90 | |||
91 | DROP TABLE dbo.prims | ||
92 | |||
93 | EXECUTE sp_rename N'dbo.Tmp_prims', N'prims', 'OBJECT' | ||
94 | |||
95 | ALTER TABLE dbo.prims ADD CONSTRAINT | ||
96 | PK__prims__10566F31 PRIMARY KEY CLUSTERED | ||
97 | ( | ||
98 | UUID | ||
99 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
100 | |||
101 | |||
102 | CREATE NONCLUSTERED INDEX prims_regionuuid ON dbo.prims | ||
103 | ( | ||
104 | RegionUUID | ||
105 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
106 | |||
107 | CREATE NONCLUSTERED INDEX prims_parentid ON dbo.prims | ||
108 | ( | ||
109 | ParentID | ||
110 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
111 | |||
112 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/014_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/014_RegionStore.sql deleted file mode 100644 index 02f6f55..0000000 --- a/OpenSim/Data/MSSQL/Resources/014_RegionStore.sql +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE TABLE dbo.Tmp_primshapes | ||
4 | ( | ||
5 | UUID uniqueidentifier NOT NULL, | ||
6 | Shape int NULL, | ||
7 | ScaleX float(53) NULL, | ||
8 | ScaleY float(53) NULL, | ||
9 | ScaleZ float(53) NULL, | ||
10 | PCode int NULL, | ||
11 | PathBegin int NULL, | ||
12 | PathEnd int NULL, | ||
13 | PathScaleX int NULL, | ||
14 | PathScaleY int NULL, | ||
15 | PathShearX int NULL, | ||
16 | PathShearY int NULL, | ||
17 | PathSkew int NULL, | ||
18 | PathCurve int NULL, | ||
19 | PathRadiusOffset int NULL, | ||
20 | PathRevolutions int NULL, | ||
21 | PathTaperX int NULL, | ||
22 | PathTaperY int NULL, | ||
23 | PathTwist int NULL, | ||
24 | PathTwistBegin int NULL, | ||
25 | ProfileBegin int NULL, | ||
26 | ProfileEnd int NULL, | ||
27 | ProfileCurve int NULL, | ||
28 | ProfileHollow int NULL, | ||
29 | State int NULL, | ||
30 | Texture image NULL, | ||
31 | ExtraParams image NULL | ||
32 | ) ON [PRIMARY] | ||
33 | TEXTIMAGE_ON [PRIMARY] | ||
34 | |||
35 | IF EXISTS(SELECT * FROM dbo.primshapes) | ||
36 | EXEC('INSERT INTO dbo.Tmp_primshapes (UUID, Shape, ScaleX, ScaleY, ScaleZ, PCode, PathBegin, PathEnd, PathScaleX, PathScaleY, PathShearX, PathShearY, PathSkew, PathCurve, PathRadiusOffset, PathRevolutions, PathTaperX, PathTaperY, PathTwist, PathTwistBegin, ProfileBegin, ProfileEnd, ProfileCurve, ProfileHollow, State, Texture, ExtraParams) | ||
37 | SELECT CONVERT(uniqueidentifier, UUID), Shape, ScaleX, ScaleY, ScaleZ, PCode, PathBegin, PathEnd, PathScaleX, PathScaleY, PathShearX, PathShearY, PathSkew, PathCurve, PathRadiusOffset, PathRevolutions, PathTaperX, PathTaperY, PathTwist, PathTwistBegin, ProfileBegin, ProfileEnd, ProfileCurve, ProfileHollow, State, Texture, ExtraParams FROM dbo.primshapes WITH (HOLDLOCK TABLOCKX)') | ||
38 | |||
39 | DROP TABLE dbo.primshapes | ||
40 | |||
41 | EXECUTE sp_rename N'dbo.Tmp_primshapes', N'primshapes', 'OBJECT' | ||
42 | |||
43 | ALTER TABLE dbo.primshapes ADD CONSTRAINT | ||
44 | PK__primshapes__0880433F PRIMARY KEY CLUSTERED | ||
45 | ( | ||
46 | UUID | ||
47 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
48 | |||
49 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/015_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/015_RegionStore.sql deleted file mode 100644 index cbaaf88..0000000 --- a/OpenSim/Data/MSSQL/Resources/015_RegionStore.sql +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE TABLE dbo.Tmp_primitems | ||
4 | ( | ||
5 | itemID uniqueidentifier NOT NULL, | ||
6 | primID uniqueidentifier NULL, | ||
7 | assetID uniqueidentifier NULL, | ||
8 | parentFolderID uniqueidentifier NULL, | ||
9 | invType int NULL, | ||
10 | assetType int NULL, | ||
11 | name varchar(255) NULL, | ||
12 | description varchar(255) NULL, | ||
13 | creationDate varchar(255) NULL, | ||
14 | creatorID uniqueidentifier NULL, | ||
15 | ownerID uniqueidentifier NULL, | ||
16 | lastOwnerID uniqueidentifier NULL, | ||
17 | groupID uniqueidentifier NULL, | ||
18 | nextPermissions int NULL, | ||
19 | currentPermissions int NULL, | ||
20 | basePermissions int NULL, | ||
21 | everyonePermissions int NULL, | ||
22 | groupPermissions int NULL, | ||
23 | flags int NOT NULL DEFAULT ((0)) | ||
24 | ) ON [PRIMARY] | ||
25 | |||
26 | IF EXISTS(SELECT * FROM dbo.primitems) | ||
27 | EXEC('INSERT INTO dbo.Tmp_primitems (itemID, primID, assetID, parentFolderID, invType, assetType, name, description, creationDate, creatorID, ownerID, lastOwnerID, groupID, nextPermissions, currentPermissions, basePermissions, everyonePermissions, groupPermissions, flags) | ||
28 | SELECT CONVERT(uniqueidentifier, itemID), CONVERT(uniqueidentifier, primID), CONVERT(uniqueidentifier, assetID), CONVERT(uniqueidentifier, parentFolderID), invType, assetType, name, description, creationDate, CONVERT(uniqueidentifier, creatorID), CONVERT(uniqueidentifier, ownerID), CONVERT(uniqueidentifier, lastOwnerID), CONVERT(uniqueidentifier, groupID), nextPermissions, currentPermissions, basePermissions, everyonePermissions, groupPermissions, flags FROM dbo.primitems WITH (HOLDLOCK TABLOCKX)') | ||
29 | |||
30 | DROP TABLE dbo.primitems | ||
31 | |||
32 | EXECUTE sp_rename N'dbo.Tmp_primitems', N'primitems', 'OBJECT' | ||
33 | |||
34 | ALTER TABLE dbo.primitems ADD CONSTRAINT | ||
35 | PK__primitems__0A688BB1 PRIMARY KEY CLUSTERED | ||
36 | ( | ||
37 | itemID | ||
38 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
39 | |||
40 | CREATE NONCLUSTERED INDEX primitems_primid ON dbo.primitems | ||
41 | ( | ||
42 | primID | ||
43 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
44 | |||
45 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/016_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/016_RegionStore.sql deleted file mode 100644 index e91da19..0000000 --- a/OpenSim/Data/MSSQL/Resources/016_RegionStore.sql +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE TABLE dbo.Tmp_terrain | ||
4 | ( | ||
5 | RegionUUID uniqueidentifier NULL, | ||
6 | Revision int NULL, | ||
7 | Heightfield image NULL | ||
8 | ) ON [PRIMARY] | ||
9 | TEXTIMAGE_ON [PRIMARY] | ||
10 | |||
11 | IF EXISTS(SELECT * FROM dbo.terrain) | ||
12 | EXEC('INSERT INTO dbo.Tmp_terrain (RegionUUID, Revision, Heightfield) | ||
13 | SELECT CONVERT(uniqueidentifier, RegionUUID), Revision, Heightfield FROM dbo.terrain WITH (HOLDLOCK TABLOCKX)') | ||
14 | |||
15 | DROP TABLE dbo.terrain | ||
16 | |||
17 | EXECUTE sp_rename N'dbo.Tmp_terrain', N'terrain', 'OBJECT' | ||
18 | |||
19 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/017_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/017_RegionStore.sql deleted file mode 100644 index 3d3dbc0..0000000 --- a/OpenSim/Data/MSSQL/Resources/017_RegionStore.sql +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE TABLE dbo.Tmp_land | ||
4 | ( | ||
5 | UUID uniqueidentifier NOT NULL, | ||
6 | RegionUUID uniqueidentifier NULL, | ||
7 | LocalLandID int NULL, | ||
8 | Bitmap image NULL, | ||
9 | Name varchar(255) NULL, | ||
10 | Description varchar(255) NULL, | ||
11 | OwnerUUID uniqueidentifier NULL, | ||
12 | IsGroupOwned int NULL, | ||
13 | Area int NULL, | ||
14 | AuctionID int NULL, | ||
15 | Category int NULL, | ||
16 | ClaimDate int NULL, | ||
17 | ClaimPrice int NULL, | ||
18 | GroupUUID uniqueidentifier NULL, | ||
19 | SalePrice int NULL, | ||
20 | LandStatus int NULL, | ||
21 | LandFlags int NULL, | ||
22 | LandingType int NULL, | ||
23 | MediaAutoScale int NULL, | ||
24 | MediaTextureUUID uniqueidentifier NULL, | ||
25 | MediaURL varchar(255) NULL, | ||
26 | MusicURL varchar(255) NULL, | ||
27 | PassHours float(53) NULL, | ||
28 | PassPrice int NULL, | ||
29 | SnapshotUUID uniqueidentifier NULL, | ||
30 | UserLocationX float(53) NULL, | ||
31 | UserLocationY float(53) NULL, | ||
32 | UserLocationZ float(53) NULL, | ||
33 | UserLookAtX float(53) NULL, | ||
34 | UserLookAtY float(53) NULL, | ||
35 | UserLookAtZ float(53) NULL, | ||
36 | AuthbuyerID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'), | ||
37 | OtherCleanTime int NOT NULL DEFAULT ((0)), | ||
38 | Dwell int NOT NULL DEFAULT ((0)) | ||
39 | ) ON [PRIMARY] | ||
40 | TEXTIMAGE_ON [PRIMARY] | ||
41 | |||
42 | IF EXISTS(SELECT * FROM dbo.land) | ||
43 | EXEC('INSERT INTO dbo.Tmp_land (UUID, RegionUUID, LocalLandID, Bitmap, Name, Description, OwnerUUID, IsGroupOwned, Area, AuctionID, Category, ClaimDate, ClaimPrice, GroupUUID, SalePrice, LandStatus, LandFlags, LandingType, MediaAutoScale, MediaTextureUUID, MediaURL, MusicURL, PassHours, PassPrice, SnapshotUUID, UserLocationX, UserLocationY, UserLocationZ, UserLookAtX, UserLookAtY, UserLookAtZ, AuthbuyerID, OtherCleanTime, Dwell) | ||
44 | SELECT CONVERT(uniqueidentifier, UUID), CONVERT(uniqueidentifier, RegionUUID), LocalLandID, Bitmap, Name, Description, CONVERT(uniqueidentifier, OwnerUUID), IsGroupOwned, Area, AuctionID, Category, ClaimDate, ClaimPrice, CONVERT(uniqueidentifier, GroupUUID), SalePrice, LandStatus, LandFlags, LandingType, MediaAutoScale, CONVERT(uniqueidentifier, MediaTextureUUID), MediaURL, MusicURL, PassHours, PassPrice, CONVERT(uniqueidentifier, SnapshotUUID), UserLocationX, UserLocationY, UserLocationZ, UserLookAtX, UserLookAtY, UserLookAtZ, CONVERT(uniqueidentifier, AuthbuyerID), OtherCleanTime, Dwell FROM dbo.land WITH (HOLDLOCK TABLOCKX)') | ||
45 | |||
46 | DROP TABLE dbo.land | ||
47 | |||
48 | EXECUTE sp_rename N'dbo.Tmp_land', N'land', 'OBJECT' | ||
49 | |||
50 | ALTER TABLE dbo.land ADD CONSTRAINT | ||
51 | PK__land__65A475E71BFD2C07 PRIMARY KEY CLUSTERED | ||
52 | ( | ||
53 | UUID | ||
54 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
55 | |||
56 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/018_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/018_RegionStore.sql deleted file mode 100644 index 6157e35..0000000 --- a/OpenSim/Data/MSSQL/Resources/018_RegionStore.sql +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE TABLE dbo.Tmp_landaccesslist | ||
4 | ( | ||
5 | LandUUID uniqueidentifier NULL, | ||
6 | AccessUUID uniqueidentifier NULL, | ||
7 | Flags int NULL | ||
8 | ) ON [PRIMARY] | ||
9 | |||
10 | IF EXISTS(SELECT * FROM dbo.landaccesslist) | ||
11 | EXEC('INSERT INTO dbo.Tmp_landaccesslist (LandUUID, AccessUUID, Flags) | ||
12 | SELECT CONVERT(uniqueidentifier, LandUUID), CONVERT(uniqueidentifier, AccessUUID), Flags FROM dbo.landaccesslist WITH (HOLDLOCK TABLOCKX)') | ||
13 | |||
14 | DROP TABLE dbo.landaccesslist | ||
15 | |||
16 | EXECUTE sp_rename N'dbo.Tmp_landaccesslist', N'landaccesslist', 'OBJECT' | ||
17 | |||
18 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/019_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/019_RegionStore.sql deleted file mode 100644 index 8e613b9..0000000 --- a/OpenSim/Data/MSSQL/Resources/019_RegionStore.sql +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE TABLE dbo.Tmp_regionban | ||
4 | ( | ||
5 | regionUUID uniqueidentifier NOT NULL, | ||
6 | bannedUUID uniqueidentifier NOT NULL, | ||
7 | bannedIp varchar(16) NOT NULL, | ||
8 | bannedIpHostMask varchar(16) NOT NULL | ||
9 | ) ON [PRIMARY] | ||
10 | |||
11 | IF EXISTS(SELECT * FROM dbo.regionban) | ||
12 | EXEC('INSERT INTO dbo.Tmp_regionban (regionUUID, bannedUUID, bannedIp, bannedIpHostMask) | ||
13 | SELECT CONVERT(uniqueidentifier, regionUUID), CONVERT(uniqueidentifier, bannedUUID), bannedIp, bannedIpHostMask FROM dbo.regionban WITH (HOLDLOCK TABLOCKX)') | ||
14 | |||
15 | DROP TABLE dbo.regionban | ||
16 | |||
17 | EXECUTE sp_rename N'dbo.Tmp_regionban', N'regionban', 'OBJECT' | ||
18 | |||
19 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/020_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/020_RegionStore.sql deleted file mode 100644 index 2ce91f6..0000000 --- a/OpenSim/Data/MSSQL/Resources/020_RegionStore.sql +++ /dev/null | |||
@@ -1,58 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | CREATE TABLE dbo.Tmp_regionsettings | ||
4 | ( | ||
5 | regionUUID uniqueidentifier NOT NULL, | ||
6 | block_terraform bit NOT NULL, | ||
7 | block_fly bit NOT NULL, | ||
8 | allow_damage bit NOT NULL, | ||
9 | restrict_pushing bit NOT NULL, | ||
10 | allow_land_resell bit NOT NULL, | ||
11 | allow_land_join_divide bit NOT NULL, | ||
12 | block_show_in_search bit NOT NULL, | ||
13 | agent_limit int NOT NULL, | ||
14 | object_bonus float(53) NOT NULL, | ||
15 | maturity int NOT NULL, | ||
16 | disable_scripts bit NOT NULL, | ||
17 | disable_collisions bit NOT NULL, | ||
18 | disable_physics bit NOT NULL, | ||
19 | terrain_texture_1 uniqueidentifier NOT NULL, | ||
20 | terrain_texture_2 uniqueidentifier NOT NULL, | ||
21 | terrain_texture_3 uniqueidentifier NOT NULL, | ||
22 | terrain_texture_4 uniqueidentifier NOT NULL, | ||
23 | elevation_1_nw float(53) NOT NULL, | ||
24 | elevation_2_nw float(53) NOT NULL, | ||
25 | elevation_1_ne float(53) NOT NULL, | ||
26 | elevation_2_ne float(53) NOT NULL, | ||
27 | elevation_1_se float(53) NOT NULL, | ||
28 | elevation_2_se float(53) NOT NULL, | ||
29 | elevation_1_sw float(53) NOT NULL, | ||
30 | elevation_2_sw float(53) NOT NULL, | ||
31 | water_height float(53) NOT NULL, | ||
32 | terrain_raise_limit float(53) NOT NULL, | ||
33 | terrain_lower_limit float(53) NOT NULL, | ||
34 | use_estate_sun bit NOT NULL, | ||
35 | fixed_sun bit NOT NULL, | ||
36 | sun_position float(53) NOT NULL, | ||
37 | covenant uniqueidentifier NULL DEFAULT (NULL), | ||
38 | Sandbox bit NOT NULL, | ||
39 | sunvectorx float(53) NOT NULL DEFAULT ((0)), | ||
40 | sunvectory float(53) NOT NULL DEFAULT ((0)), | ||
41 | sunvectorz float(53) NOT NULL DEFAULT ((0)) | ||
42 | ) ON [PRIMARY] | ||
43 | |||
44 | IF EXISTS(SELECT * FROM dbo.regionsettings) | ||
45 | EXEC('INSERT INTO dbo.Tmp_regionsettings (regionUUID, block_terraform, block_fly, allow_damage, restrict_pushing, allow_land_resell, allow_land_join_divide, block_show_in_search, agent_limit, object_bonus, maturity, disable_scripts, disable_collisions, disable_physics, terrain_texture_1, terrain_texture_2, terrain_texture_3, terrain_texture_4, elevation_1_nw, elevation_2_nw, elevation_1_ne, elevation_2_ne, elevation_1_se, elevation_2_se, elevation_1_sw, elevation_2_sw, water_height, terrain_raise_limit, terrain_lower_limit, use_estate_sun, fixed_sun, sun_position, covenant, Sandbox, sunvectorx, sunvectory, sunvectorz) | ||
46 | SELECT CONVERT(uniqueidentifier, regionUUID), block_terraform, block_fly, allow_damage, restrict_pushing, allow_land_resell, allow_land_join_divide, block_show_in_search, agent_limit, object_bonus, maturity, disable_scripts, disable_collisions, disable_physics, CONVERT(uniqueidentifier, terrain_texture_1), CONVERT(uniqueidentifier, terrain_texture_2), CONVERT(uniqueidentifier, terrain_texture_3), CONVERT(uniqueidentifier, terrain_texture_4), elevation_1_nw, elevation_2_nw, elevation_1_ne, elevation_2_ne, elevation_1_se, elevation_2_se, elevation_1_sw, elevation_2_sw, water_height, terrain_raise_limit, terrain_lower_limit, use_estate_sun, fixed_sun, sun_position, CONVERT(uniqueidentifier, covenant), Sandbox, sunvectorx, sunvectory, sunvectorz FROM dbo.regionsettings WITH (HOLDLOCK TABLOCKX)') | ||
47 | |||
48 | DROP TABLE dbo.regionsettings | ||
49 | |||
50 | EXECUTE sp_rename N'dbo.Tmp_regionsettings', N'regionsettings', 'OBJECT' | ||
51 | |||
52 | ALTER TABLE dbo.regionsettings ADD CONSTRAINT | ||
53 | PK__regionse__5B35159D21B6055D PRIMARY KEY CLUSTERED | ||
54 | ( | ||
55 | regionUUID | ||
56 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
57 | |||
58 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/021_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/021_RegionStore.sql deleted file mode 100644 index ac59182..0000000 --- a/OpenSim/Data/MSSQL/Resources/021_RegionStore.sql +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | ALTER TABLE prims ADD PassTouches bit not null default 0 | ||
4 | |||
5 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/022_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/022_RegionStore.sql deleted file mode 100644 index 421e8d3..0000000 --- a/OpenSim/Data/MSSQL/Resources/022_RegionStore.sql +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | ALTER TABLE regionsettings ADD loaded_creation_date varchar(20) | ||
4 | ALTER TABLE regionsettings ADD loaded_creation_time varchar(20) | ||
5 | ALTER TABLE regionsettings ADD loaded_creation_id varchar(64) | ||
6 | |||
7 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/023_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/023_RegionStore.sql deleted file mode 100644 index 75a16f3..0000000 --- a/OpenSim/Data/MSSQL/Resources/023_RegionStore.sql +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | BEGIN TRANSACTION | ||
2 | |||
3 | ALTER TABLE regionsettings DROP COLUMN loaded_creation_date | ||
4 | ALTER TABLE regionsettings DROP COLUMN loaded_creation_time | ||
5 | ALTER TABLE regionsettings ADD loaded_creation_datetime int NOT NULL default 0 | ||
6 | |||
7 | COMMIT | ||
diff --git a/OpenSim/Data/MSSQL/Resources/AssetStore.migrations b/OpenSim/Data/MSSQL/Resources/AssetStore.migrations new file mode 100644 index 0000000..beb82b9 --- /dev/null +++ b/OpenSim/Data/MSSQL/Resources/AssetStore.migrations | |||
@@ -0,0 +1,100 @@ | |||
1 | :VERSION 1 | ||
2 | |||
3 | CREATE TABLE [assets] ( | ||
4 | [id] [varchar](36) NOT NULL, | ||
5 | [name] [varchar](64) NOT NULL, | ||
6 | [description] [varchar](64) NOT NULL, | ||
7 | [assetType] [tinyint] NOT NULL, | ||
8 | [local] [tinyint] NOT NULL, | ||
9 | [temporary] [tinyint] NOT NULL, | ||
10 | [data] [image] NOT NULL, | ||
11 | PRIMARY KEY CLUSTERED | ||
12 | ( | ||
13 | [id] ASC | ||
14 | )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
15 | ) ON [PRIMARY] | ||
16 | |||
17 | |||
18 | :VERSION 2 | ||
19 | |||
20 | BEGIN TRANSACTION | ||
21 | |||
22 | CREATE TABLE Tmp_assets | ||
23 | ( | ||
24 | id varchar(36) NOT NULL, | ||
25 | name varchar(64) NOT NULL, | ||
26 | description varchar(64) NOT NULL, | ||
27 | assetType tinyint NOT NULL, | ||
28 | local bit NOT NULL, | ||
29 | temporary bit NOT NULL, | ||
30 | data image NOT NULL | ||
31 | ) ON [PRIMARY] | ||
32 | TEXTIMAGE_ON [PRIMARY] | ||
33 | |||
34 | IF EXISTS(SELECT * FROM assets) | ||
35 | EXEC('INSERT INTO Tmp_assets (id, name, description, assetType, local, temporary, data) | ||
36 | SELECT id, name, description, assetType, CONVERT(bit, local), CONVERT(bit, temporary), data FROM assets WITH (HOLDLOCK TABLOCKX)') | ||
37 | |||
38 | DROP TABLE assets | ||
39 | |||
40 | EXECUTE sp_rename N'Tmp_assets', N'assets', 'OBJECT' | ||
41 | |||
42 | ALTER TABLE dbo.assets ADD CONSTRAINT | ||
43 | PK__assets__id PRIMARY KEY CLUSTERED | ||
44 | ( | ||
45 | id | ||
46 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
47 | |||
48 | COMMIT | ||
49 | |||
50 | |||
51 | :VERSION 3 | ||
52 | |||
53 | BEGIN TRANSACTION | ||
54 | |||
55 | ALTER TABLE assets add create_time integer default 0 | ||
56 | ALTER TABLE assets add access_time integer default 0 | ||
57 | |||
58 | COMMIT | ||
59 | |||
60 | |||
61 | :VERSION 4 | ||
62 | |||
63 | BEGIN TRANSACTION | ||
64 | |||
65 | CREATE TABLE dbo.Tmp_assets | ||
66 | ( | ||
67 | id uniqueidentifier NOT NULL, | ||
68 | name varchar(64) NOT NULL, | ||
69 | description varchar(64) NOT NULL, | ||
70 | assetType tinyint NOT NULL, | ||
71 | local bit NOT NULL, | ||
72 | temporary bit NOT NULL, | ||
73 | data image NOT NULL, | ||
74 | create_time int NULL, | ||
75 | access_time int NULL | ||
76 | ) ON [PRIMARY] | ||
77 | TEXTIMAGE_ON [PRIMARY] | ||
78 | |||
79 | IF EXISTS(SELECT * FROM dbo.assets) | ||
80 | EXEC('INSERT INTO dbo.Tmp_assets (id, name, description, assetType, local, temporary, data, create_time, access_time) | ||
81 | SELECT CONVERT(uniqueidentifier, id), name, description, assetType, local, temporary, data, create_time, access_time FROM dbo.assets WITH (HOLDLOCK TABLOCKX)') | ||
82 | |||
83 | DROP TABLE assets | ||
84 | |||
85 | EXECUTE sp_rename N'Tmp_assets', N'assets', 'OBJECT' | ||
86 | |||
87 | ALTER TABLE dbo.assets ADD CONSTRAINT | ||
88 | PK__assets__id PRIMARY KEY CLUSTERED | ||
89 | ( | ||
90 | id | ||
91 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
92 | |||
93 | COMMIT | ||
94 | |||
95 | |||
96 | :VERSION 5 | ||
97 | |||
98 | DELETE FROM assets WHERE id = 'dc4b9f0b-d008-45c6-96a4-01dd947ac621'; | ||
99 | |||
100 | |||
diff --git a/OpenSim/Data/MSSQL/Resources/001_AuthStore.sql b/OpenSim/Data/MSSQL/Resources/AuthStore.migrations index c70a193..5b90ca3 100644 --- a/OpenSim/Data/MSSQL/Resources/001_AuthStore.sql +++ b/OpenSim/Data/MSSQL/Resources/AuthStore.migrations | |||
@@ -1,3 +1,5 @@ | |||
1 | :VERSION 1 | ||
2 | |||
1 | BEGIN TRANSACTION | 3 | BEGIN TRANSACTION |
2 | 4 | ||
3 | CREATE TABLE [auth] ( | 5 | CREATE TABLE [auth] ( |
@@ -14,4 +16,13 @@ CREATE TABLE [tokens] ( | |||
14 | [validity] [datetime] NOT NULL ) | 16 | [validity] [datetime] NOT NULL ) |
15 | ON [PRIMARY] | 17 | ON [PRIMARY] |
16 | 18 | ||
19 | COMMIT | ||
20 | |||
21 | :VERSION 2 | ||
22 | |||
23 | BEGIN TRANSACTION | ||
24 | |||
25 | INSERT INTO auth (UUID, passwordHash, passwordSalt, webLoginKey, accountType) SELECT [UUID] AS UUID, [passwordHash] AS passwordHash, [passwordSalt] AS passwordSalt, [webLoginKey] AS webLoginKey, 'UserAccount' as [accountType] FROM users; | ||
26 | |||
27 | |||
17 | COMMIT \ No newline at end of file | 28 | COMMIT \ No newline at end of file |
diff --git a/OpenSim/Data/MSSQL/Resources/001_Avatar.sql b/OpenSim/Data/MSSQL/Resources/Avatar.migrations index 48f4c00..759e939 100644 --- a/OpenSim/Data/MSSQL/Resources/001_Avatar.sql +++ b/OpenSim/Data/MSSQL/Resources/Avatar.migrations | |||
@@ -1,3 +1,5 @@ | |||
1 | :VERSION 1 | ||
2 | |||
1 | BEGIN TRANSACTION | 3 | BEGIN TRANSACTION |
2 | 4 | ||
3 | CREATE TABLE [Avatars] ( | 5 | CREATE TABLE [Avatars] ( |
diff --git a/OpenSim/Data/MSSQL/Resources/EstateStore.migrations b/OpenSim/Data/MSSQL/Resources/EstateStore.migrations new file mode 100644 index 0000000..64b2d2b --- /dev/null +++ b/OpenSim/Data/MSSQL/Resources/EstateStore.migrations | |||
@@ -0,0 +1,334 @@ | |||
1 | :VERSION 1 | ||
2 | |||
3 | BEGIN TRANSACTION | ||
4 | |||
5 | CREATE TABLE [dbo].[estate_managers]( | ||
6 | [EstateID] [int] NOT NULL, | ||
7 | [uuid] [varchar](36) NOT NULL, | ||
8 | CONSTRAINT [PK_estate_managers] PRIMARY KEY CLUSTERED | ||
9 | ( | ||
10 | [EstateID] ASC | ||
11 | )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] | ||
12 | ) ON [PRIMARY]; | ||
13 | |||
14 | CREATE TABLE [dbo].[estate_groups]( | ||
15 | [EstateID] [int] NOT NULL, | ||
16 | [uuid] [varchar](36) NOT NULL, | ||
17 | CONSTRAINT [PK_estate_groups] PRIMARY KEY CLUSTERED | ||
18 | ( | ||
19 | [EstateID] ASC | ||
20 | )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] | ||
21 | ) ON [PRIMARY]; | ||
22 | |||
23 | |||
24 | CREATE TABLE [dbo].[estate_users]( | ||
25 | [EstateID] [int] NOT NULL, | ||
26 | [uuid] [varchar](36) NOT NULL, | ||
27 | CONSTRAINT [PK_estate_users] PRIMARY KEY CLUSTERED | ||
28 | ( | ||
29 | [EstateID] ASC | ||
30 | )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] | ||
31 | ) ON [PRIMARY]; | ||
32 | |||
33 | |||
34 | CREATE TABLE [dbo].[estateban]( | ||
35 | [EstateID] [int] NOT NULL, | ||
36 | [bannedUUID] [varchar](36) NOT NULL, | ||
37 | [bannedIp] [varchar](16) NOT NULL, | ||
38 | [bannedIpHostMask] [varchar](16) NOT NULL, | ||
39 | [bannedNameMask] [varchar](64) NULL DEFAULT (NULL), | ||
40 | CONSTRAINT [PK_estateban] PRIMARY KEY CLUSTERED | ||
41 | ( | ||
42 | [EstateID] ASC | ||
43 | )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] | ||
44 | ) ON [PRIMARY]; | ||
45 | |||
46 | CREATE TABLE [dbo].[estate_settings]( | ||
47 | [EstateID] [int] IDENTITY(1,100) NOT NULL, | ||
48 | [EstateName] [varchar](64) NULL DEFAULT (NULL), | ||
49 | [AbuseEmailToEstateOwner] [bit] NOT NULL, | ||
50 | [DenyAnonymous] [bit] NOT NULL, | ||
51 | [ResetHomeOnTeleport] [bit] NOT NULL, | ||
52 | [FixedSun] [bit] NOT NULL, | ||
53 | [DenyTransacted] [bit] NOT NULL, | ||
54 | [BlockDwell] [bit] NOT NULL, | ||
55 | [DenyIdentified] [bit] NOT NULL, | ||
56 | [AllowVoice] [bit] NOT NULL, | ||
57 | [UseGlobalTime] [bit] NOT NULL, | ||
58 | [PricePerMeter] [int] NOT NULL, | ||
59 | [TaxFree] [bit] NOT NULL, | ||
60 | [AllowDirectTeleport] [bit] NOT NULL, | ||
61 | [RedirectGridX] [int] NOT NULL, | ||
62 | [RedirectGridY] [int] NOT NULL, | ||
63 | [ParentEstateID] [int] NOT NULL, | ||
64 | [SunPosition] [float] NOT NULL, | ||
65 | [EstateSkipScripts] [bit] NOT NULL, | ||
66 | [BillableFactor] [float] NOT NULL, | ||
67 | [PublicAccess] [bit] NOT NULL, | ||
68 | [AbuseEmail] [varchar](255) NOT NULL, | ||
69 | [EstateOwner] [varchar](36) NOT NULL, | ||
70 | [DenyMinors] [bit] NOT NULL, | ||
71 | CONSTRAINT [PK_estate_settings] PRIMARY KEY CLUSTERED | ||
72 | ( | ||
73 | [EstateID] ASC | ||
74 | )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] | ||
75 | ) ON [PRIMARY]; | ||
76 | |||
77 | |||
78 | CREATE TABLE [dbo].[estate_map]( | ||
79 | [RegionID] [varchar](36) NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'), | ||
80 | [EstateID] [int] NOT NULL, | ||
81 | CONSTRAINT [PK_estate_map] PRIMARY KEY CLUSTERED | ||
82 | ( | ||
83 | [RegionID] ASC | ||
84 | )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] | ||
85 | ) ON [PRIMARY]; | ||
86 | |||
87 | COMMIT | ||
88 | |||
89 | :VERSION 2 | ||
90 | |||
91 | BEGIN TRANSACTION | ||
92 | |||
93 | ALTER TABLE dbo.estate_managers DROP CONSTRAINT PK_estate_managers | ||
94 | |||
95 | CREATE NONCLUSTERED INDEX IX_estate_managers ON dbo.estate_managers | ||
96 | ( | ||
97 | EstateID | ||
98 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
99 | |||
100 | ALTER TABLE dbo.estate_groups DROP CONSTRAINT PK_estate_groups | ||
101 | |||
102 | CREATE NONCLUSTERED INDEX IX_estate_groups ON dbo.estate_groups | ||
103 | ( | ||
104 | EstateID | ||
105 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
106 | |||
107 | |||
108 | ALTER TABLE dbo.estate_users DROP CONSTRAINT PK_estate_users | ||
109 | |||
110 | CREATE NONCLUSTERED INDEX IX_estate_users ON dbo.estate_users | ||
111 | ( | ||
112 | EstateID | ||
113 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
114 | |||
115 | COMMIT | ||
116 | |||
117 | |||
118 | :VERSION 3 | ||
119 | |||
120 | BEGIN TRANSACTION | ||
121 | |||
122 | CREATE TABLE dbo.Tmp_estateban | ||
123 | ( | ||
124 | EstateID int NOT NULL, | ||
125 | bannedUUID varchar(36) NOT NULL, | ||
126 | bannedIp varchar(16) NULL, | ||
127 | bannedIpHostMask varchar(16) NULL, | ||
128 | bannedNameMask varchar(64) NULL | ||
129 | ) ON [PRIMARY] | ||
130 | |||
131 | IF EXISTS(SELECT * FROM dbo.estateban) | ||
132 | EXEC('INSERT INTO dbo.Tmp_estateban (EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask) | ||
133 | SELECT EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask FROM dbo.estateban') | ||
134 | |||
135 | DROP TABLE dbo.estateban | ||
136 | |||
137 | EXECUTE sp_rename N'dbo.Tmp_estateban', N'estateban', 'OBJECT' | ||
138 | |||
139 | CREATE NONCLUSTERED INDEX IX_estateban ON dbo.estateban | ||
140 | ( | ||
141 | EstateID | ||
142 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
143 | |||
144 | COMMIT | ||
145 | |||
146 | |||
147 | :VERSION 4 | ||
148 | |||
149 | BEGIN TRANSACTION | ||
150 | |||
151 | CREATE TABLE dbo.Tmp_estate_managers | ||
152 | ( | ||
153 | EstateID int NOT NULL, | ||
154 | uuid uniqueidentifier NOT NULL | ||
155 | ) ON [PRIMARY] | ||
156 | |||
157 | IF EXISTS(SELECT * FROM dbo.estate_managers) | ||
158 | EXEC('INSERT INTO dbo.Tmp_estate_managers (EstateID, uuid) | ||
159 | SELECT EstateID, CONVERT(uniqueidentifier, uuid) FROM dbo.estate_managers WITH (HOLDLOCK TABLOCKX)') | ||
160 | |||
161 | DROP TABLE dbo.estate_managers | ||
162 | |||
163 | EXECUTE sp_rename N'dbo.Tmp_estate_managers', N'estate_managers', 'OBJECT' | ||
164 | |||
165 | CREATE NONCLUSTERED INDEX IX_estate_managers ON dbo.estate_managers | ||
166 | ( | ||
167 | EstateID | ||
168 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
169 | |||
170 | COMMIT | ||
171 | |||
172 | |||
173 | :VERSION 5 | ||
174 | |||
175 | BEGIN TRANSACTION | ||
176 | |||
177 | CREATE TABLE dbo.Tmp_estate_groups | ||
178 | ( | ||
179 | EstateID int NOT NULL, | ||
180 | uuid uniqueidentifier NOT NULL | ||
181 | ) ON [PRIMARY] | ||
182 | |||
183 | IF EXISTS(SELECT * FROM dbo.estate_groups) | ||
184 | EXEC('INSERT INTO dbo.Tmp_estate_groups (EstateID, uuid) | ||
185 | SELECT EstateID, CONVERT(uniqueidentifier, uuid) FROM dbo.estate_groups WITH (HOLDLOCK TABLOCKX)') | ||
186 | |||
187 | DROP TABLE dbo.estate_groups | ||
188 | |||
189 | EXECUTE sp_rename N'dbo.Tmp_estate_groups', N'estate_groups', 'OBJECT' | ||
190 | |||
191 | CREATE NONCLUSTERED INDEX IX_estate_groups ON dbo.estate_groups | ||
192 | ( | ||
193 | EstateID | ||
194 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
195 | |||
196 | COMMIT | ||
197 | |||
198 | |||
199 | :VERSION 6 | ||
200 | |||
201 | BEGIN TRANSACTION | ||
202 | |||
203 | CREATE TABLE dbo.Tmp_estate_users | ||
204 | ( | ||
205 | EstateID int NOT NULL, | ||
206 | uuid uniqueidentifier NOT NULL | ||
207 | ) ON [PRIMARY] | ||
208 | |||
209 | IF EXISTS(SELECT * FROM dbo.estate_users) | ||
210 | EXEC('INSERT INTO dbo.Tmp_estate_users (EstateID, uuid) | ||
211 | SELECT EstateID, CONVERT(uniqueidentifier, uuid) FROM dbo.estate_users WITH (HOLDLOCK TABLOCKX)') | ||
212 | |||
213 | DROP TABLE dbo.estate_users | ||
214 | |||
215 | EXECUTE sp_rename N'dbo.Tmp_estate_users', N'estate_users', 'OBJECT' | ||
216 | |||
217 | CREATE NONCLUSTERED INDEX IX_estate_users ON dbo.estate_users | ||
218 | ( | ||
219 | EstateID | ||
220 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
221 | |||
222 | COMMIT | ||
223 | |||
224 | |||
225 | :VERSION 7 | ||
226 | |||
227 | BEGIN TRANSACTION | ||
228 | |||
229 | CREATE TABLE dbo.Tmp_estateban | ||
230 | ( | ||
231 | EstateID int NOT NULL, | ||
232 | bannedUUID uniqueidentifier NOT NULL, | ||
233 | bannedIp varchar(16) NULL, | ||
234 | bannedIpHostMask varchar(16) NULL, | ||
235 | bannedNameMask varchar(64) NULL | ||
236 | ) ON [PRIMARY] | ||
237 | |||
238 | IF EXISTS(SELECT * FROM dbo.estateban) | ||
239 | EXEC('INSERT INTO dbo.Tmp_estateban (EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask) | ||
240 | SELECT EstateID, CONVERT(uniqueidentifier, bannedUUID), bannedIp, bannedIpHostMask, bannedNameMask FROM dbo.estateban WITH (HOLDLOCK TABLOCKX)') | ||
241 | |||
242 | DROP TABLE dbo.estateban | ||
243 | |||
244 | EXECUTE sp_rename N'dbo.Tmp_estateban', N'estateban', 'OBJECT' | ||
245 | |||
246 | CREATE NONCLUSTERED INDEX IX_estateban ON dbo.estateban | ||
247 | ( | ||
248 | EstateID | ||
249 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
250 | |||
251 | COMMIT | ||
252 | |||
253 | |||
254 | :VERSION 8 | ||
255 | |||
256 | BEGIN TRANSACTION | ||
257 | |||
258 | CREATE TABLE dbo.Tmp_estate_settings | ||
259 | ( | ||
260 | EstateID int NOT NULL IDENTITY (1, 100), | ||
261 | EstateName varchar(64) NULL DEFAULT (NULL), | ||
262 | AbuseEmailToEstateOwner bit NOT NULL, | ||
263 | DenyAnonymous bit NOT NULL, | ||
264 | ResetHomeOnTeleport bit NOT NULL, | ||
265 | FixedSun bit NOT NULL, | ||
266 | DenyTransacted bit NOT NULL, | ||
267 | BlockDwell bit NOT NULL, | ||
268 | DenyIdentified bit NOT NULL, | ||
269 | AllowVoice bit NOT NULL, | ||
270 | UseGlobalTime bit NOT NULL, | ||
271 | PricePerMeter int NOT NULL, | ||
272 | TaxFree bit NOT NULL, | ||
273 | AllowDirectTeleport bit NOT NULL, | ||
274 | RedirectGridX int NOT NULL, | ||
275 | RedirectGridY int NOT NULL, | ||
276 | ParentEstateID int NOT NULL, | ||
277 | SunPosition float(53) NOT NULL, | ||
278 | EstateSkipScripts bit NOT NULL, | ||
279 | BillableFactor float(53) NOT NULL, | ||
280 | PublicAccess bit NOT NULL, | ||
281 | AbuseEmail varchar(255) NOT NULL, | ||
282 | EstateOwner uniqueidentifier NOT NULL, | ||
283 | DenyMinors bit NOT NULL | ||
284 | ) ON [PRIMARY] | ||
285 | |||
286 | SET IDENTITY_INSERT dbo.Tmp_estate_settings ON | ||
287 | |||
288 | IF EXISTS(SELECT * FROM dbo.estate_settings) | ||
289 | EXEC('INSERT INTO dbo.Tmp_estate_settings (EstateID, EstateName, AbuseEmailToEstateOwner, DenyAnonymous, ResetHomeOnTeleport, FixedSun, DenyTransacted, BlockDwell, DenyIdentified, AllowVoice, UseGlobalTime, PricePerMeter, TaxFree, AllowDirectTeleport, RedirectGridX, RedirectGridY, ParentEstateID, SunPosition, EstateSkipScripts, BillableFactor, PublicAccess, AbuseEmail, EstateOwner, DenyMinors) | ||
290 | SELECT EstateID, EstateName, AbuseEmailToEstateOwner, DenyAnonymous, ResetHomeOnTeleport, FixedSun, DenyTransacted, BlockDwell, DenyIdentified, AllowVoice, UseGlobalTime, PricePerMeter, TaxFree, AllowDirectTeleport, RedirectGridX, RedirectGridY, ParentEstateID, SunPosition, EstateSkipScripts, BillableFactor, PublicAccess, AbuseEmail, CONVERT(uniqueidentifier, EstateOwner), DenyMinors FROM dbo.estate_settings WITH (HOLDLOCK TABLOCKX)') | ||
291 | |||
292 | SET IDENTITY_INSERT dbo.Tmp_estate_settings OFF | ||
293 | |||
294 | DROP TABLE dbo.estate_settings | ||
295 | |||
296 | EXECUTE sp_rename N'dbo.Tmp_estate_settings', N'estate_settings', 'OBJECT' | ||
297 | |||
298 | ALTER TABLE dbo.estate_settings ADD CONSTRAINT | ||
299 | PK_estate_settings PRIMARY KEY CLUSTERED | ||
300 | ( | ||
301 | EstateID | ||
302 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
303 | |||
304 | COMMIT | ||
305 | |||
306 | |||
307 | :VERSION 9 | ||
308 | |||
309 | BEGIN TRANSACTION | ||
310 | |||
311 | CREATE TABLE dbo.Tmp_estate_map | ||
312 | ( | ||
313 | RegionID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'), | ||
314 | EstateID int NOT NULL | ||
315 | ) ON [PRIMARY] | ||
316 | |||
317 | IF EXISTS(SELECT * FROM dbo.estate_map) | ||
318 | EXEC('INSERT INTO dbo.Tmp_estate_map (RegionID, EstateID) | ||
319 | SELECT CONVERT(uniqueidentifier, RegionID), EstateID FROM dbo.estate_map WITH (HOLDLOCK TABLOCKX)') | ||
320 | |||
321 | DROP TABLE dbo.estate_map | ||
322 | |||
323 | EXECUTE sp_rename N'dbo.Tmp_estate_map', N'estate_map', 'OBJECT' | ||
324 | |||
325 | ALTER TABLE dbo.estate_map ADD CONSTRAINT | ||
326 | PK_estate_map PRIMARY KEY CLUSTERED | ||
327 | ( | ||
328 | RegionID | ||
329 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
330 | |||
331 | |||
332 | COMMIT | ||
333 | |||
334 | |||
diff --git a/OpenSim/Data/MSSQL/Resources/001_FriendsStore.sql b/OpenSim/Data/MSSQL/Resources/FriendsStore.migrations index 94d240b..f981a91 100644 --- a/OpenSim/Data/MSSQL/Resources/001_FriendsStore.sql +++ b/OpenSim/Data/MSSQL/Resources/FriendsStore.migrations | |||
@@ -1,3 +1,5 @@ | |||
1 | :VERSION 1 | ||
2 | |||
1 | BEGIN TRANSACTION | 3 | BEGIN TRANSACTION |
2 | 4 | ||
3 | CREATE TABLE [Friends] ( | 5 | CREATE TABLE [Friends] ( |
@@ -7,5 +9,12 @@ CREATE TABLE [Friends] ( | |||
7 | [Offered] varchar(32) NOT NULL DEFAULT 0) | 9 | [Offered] varchar(32) NOT NULL DEFAULT 0) |
8 | ON [PRIMARY] | 10 | ON [PRIMARY] |
9 | 11 | ||
12 | COMMIT | ||
13 | |||
14 | :VERSION 2 | ||
15 | |||
16 | BEGIN TRANSACTION | ||
17 | |||
18 | INSERT INTO Friends (PrincipalID, Friend, Flags, Offered) SELECT [ownerID], [friendID], [friendPerms], 0 FROM userfriends; | ||
10 | 19 | ||
11 | COMMIT \ No newline at end of file | 20 | COMMIT \ No newline at end of file |
diff --git a/OpenSim/Data/MSSQL/Resources/GridStore.migrations b/OpenSim/Data/MSSQL/Resources/GridStore.migrations new file mode 100644 index 0000000..d2ca27a --- /dev/null +++ b/OpenSim/Data/MSSQL/Resources/GridStore.migrations | |||
@@ -0,0 +1,225 @@ | |||
1 | :VERSION 1 | ||
2 | |||
3 | BEGIN TRANSACTION | ||
4 | |||
5 | CREATE TABLE [dbo].[regions]( | ||
6 | [regionHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
7 | [regionName] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
8 | [uuid] [varchar](255) COLLATE Latin1_General_CI_AS NOT NULL, | ||
9 | [regionRecvKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
10 | [regionSecret] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
11 | [regionSendKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
12 | [regionDataURI] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
13 | [serverIP] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
14 | [serverPort] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
15 | [serverURI] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
16 | [locX] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
17 | [locY] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
18 | [locZ] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
19 | [eastOverrideHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
20 | [westOverrideHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
21 | [southOverrideHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
22 | [northOverrideHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
23 | [regionAssetURI] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
24 | [regionAssetRecvKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
25 | [regionAssetSendKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
26 | [regionUserURI] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
27 | [regionUserRecvKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
28 | [regionUserSendKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
29 | [regionMapTexture] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
30 | [serverHttpPort] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
31 | [serverRemotingPort] [varchar](255) COLLATE Latin1_General_CI_AS NULL, | ||
32 | [owner_uuid] [varchar](36) COLLATE Latin1_General_CI_AS NULL, | ||
33 | PRIMARY KEY CLUSTERED | ||
34 | ( | ||
35 | [uuid] ASC | ||
36 | )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] | ||
37 | ) ON [PRIMARY] | ||
38 | |||
39 | COMMIT | ||
40 | |||
41 | |||
42 | :VERSION 2 | ||
43 | |||
44 | BEGIN TRANSACTION | ||
45 | |||
46 | CREATE TABLE Tmp_regions | ||
47 | ( | ||
48 | uuid varchar(36) COLLATE Latin1_General_CI_AS NOT NULL, | ||
49 | regionHandle bigint NULL, | ||
50 | regionName varchar(20) NULL, | ||
51 | regionRecvKey varchar(128) NULL, | ||
52 | regionSendKey varchar(128) NULL, | ||
53 | regionSecret varchar(128) NULL, | ||
54 | regionDataURI varchar(128) NULL, | ||
55 | serverIP varchar(64) NULL, | ||
56 | serverPort int NULL, | ||
57 | serverURI varchar(255) NULL, | ||
58 | locX int NULL, | ||
59 | locY int NULL, | ||
60 | locZ int NULL, | ||
61 | eastOverrideHandle bigint NULL, | ||
62 | westOverrideHandle bigint NULL, | ||
63 | southOverrideHandle bigint NULL, | ||
64 | northOverrideHandle bigint NULL, | ||
65 | regionAssetURI varchar(255) NULL, | ||
66 | regionAssetRecvKey varchar(128) NULL, | ||
67 | regionAssetSendKey varchar(128) NULL, | ||
68 | regionUserURI varchar(255) NULL, | ||
69 | regionUserRecvKey varchar(128) NULL, | ||
70 | regionUserSendKey varchar(128) NULL, | ||
71 | regionMapTexture varchar(36) NULL, | ||
72 | serverHttpPort int NULL, | ||
73 | serverRemotingPort int NULL, | ||
74 | owner_uuid varchar(36) NULL, | ||
75 | originUUID varchar(36) NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000') | ||
76 | ) ON [PRIMARY] | ||
77 | |||
78 | IF EXISTS(SELECT * FROM regions) | ||
79 | EXEC('INSERT INTO Tmp_regions (uuid, regionHandle, regionName, regionRecvKey, regionSendKey, regionSecret, regionDataURI, serverIP, serverPort, serverURI, locX, locY, locZ, eastOverrideHandle, westOverrideHandle, southOverrideHandle, northOverrideHandle, regionAssetURI, regionAssetRecvKey, regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey, regionMapTexture, serverHttpPort, serverRemotingPort, owner_uuid) | ||
80 | SELECT CONVERT(varchar(36), uuid), CONVERT(bigint, regionHandle), CONVERT(varchar(20), regionName), CONVERT(varchar(128), regionRecvKey), CONVERT(varchar(128), regionSendKey), CONVERT(varchar(128), regionSecret), CONVERT(varchar(128), regionDataURI), CONVERT(varchar(64), serverIP), CONVERT(int, serverPort), serverURI, CONVERT(int, locX), CONVERT(int, locY), CONVERT(int, locZ), CONVERT(bigint, eastOverrideHandle), CONVERT(bigint, westOverrideHandle), CONVERT(bigint, southOverrideHandle), CONVERT(bigint, northOverrideHandle), regionAssetURI, CONVERT(varchar(128), regionAssetRecvKey), CONVERT(varchar(128), regionAssetSendKey), regionUserURI, CONVERT(varchar(128), regionUserRecvKey), CONVERT(varchar(128), regionUserSendKey), CONVERT(varchar(36), regionMapTexture), CONVERT(int, serverHttpPort), CONVERT(int, serverRemotingPort), owner_uuid FROM regions') | ||
81 | |||
82 | DROP TABLE regions | ||
83 | |||
84 | EXECUTE sp_rename N'Tmp_regions', N'regions', 'OBJECT' | ||
85 | |||
86 | ALTER TABLE regions ADD CONSTRAINT | ||
87 | PK__regions__uuid PRIMARY KEY CLUSTERED | ||
88 | ( | ||
89 | uuid | ||
90 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
91 | |||
92 | COMMIT | ||
93 | |||
94 | :VERSION 3 | ||
95 | |||
96 | BEGIN TRANSACTION | ||
97 | |||
98 | CREATE NONCLUSTERED INDEX IX_regions_name ON dbo.regions | ||
99 | ( | ||
100 | regionName | ||
101 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
102 | |||
103 | CREATE NONCLUSTERED INDEX IX_regions_handle ON dbo.regions | ||
104 | ( | ||
105 | regionHandle | ||
106 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
107 | |||
108 | |||
109 | CREATE NONCLUSTERED INDEX IX_regions_override ON dbo.regions | ||
110 | ( | ||
111 | eastOverrideHandle, | ||
112 | westOverrideHandle, | ||
113 | southOverrideHandle, | ||
114 | northOverrideHandle | ||
115 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
116 | |||
117 | COMMIT | ||
118 | |||
119 | |||
120 | :VERSION 4 | ||
121 | |||
122 | /* To prevent any potential data loss issues, you should review this script in detail before running it outside the context of the database designer.*/ | ||
123 | BEGIN TRANSACTION | ||
124 | |||
125 | CREATE TABLE dbo.Tmp_regions | ||
126 | ( | ||
127 | uuid uniqueidentifier NOT NULL, | ||
128 | regionHandle bigint NULL, | ||
129 | regionName varchar(20) NULL, | ||
130 | regionRecvKey varchar(128) NULL, | ||
131 | regionSendKey varchar(128) NULL, | ||
132 | regionSecret varchar(128) NULL, | ||
133 | regionDataURI varchar(128) NULL, | ||
134 | serverIP varchar(64) NULL, | ||
135 | serverPort int NULL, | ||
136 | serverURI varchar(255) NULL, | ||
137 | locX int NULL, | ||
138 | locY int NULL, | ||
139 | locZ int NULL, | ||
140 | eastOverrideHandle bigint NULL, | ||
141 | westOverrideHandle bigint NULL, | ||
142 | southOverrideHandle bigint NULL, | ||
143 | northOverrideHandle bigint NULL, | ||
144 | regionAssetURI varchar(255) NULL, | ||
145 | regionAssetRecvKey varchar(128) NULL, | ||
146 | regionAssetSendKey varchar(128) NULL, | ||
147 | regionUserURI varchar(255) NULL, | ||
148 | regionUserRecvKey varchar(128) NULL, | ||
149 | regionUserSendKey varchar(128) NULL, | ||
150 | regionMapTexture uniqueidentifier NULL, | ||
151 | serverHttpPort int NULL, | ||
152 | serverRemotingPort int NULL, | ||
153 | owner_uuid uniqueidentifier NOT NULL, | ||
154 | originUUID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000') | ||
155 | ) ON [PRIMARY] | ||
156 | |||
157 | IF EXISTS(SELECT * FROM dbo.regions) | ||
158 | EXEC('INSERT INTO dbo.Tmp_regions (uuid, regionHandle, regionName, regionRecvKey, regionSendKey, regionSecret, regionDataURI, serverIP, serverPort, serverURI, locX, locY, locZ, eastOverrideHandle, westOverrideHandle, southOverrideHandle, northOverrideHandle, regionAssetURI, regionAssetRecvKey, regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey, regionMapTexture, serverHttpPort, serverRemotingPort, owner_uuid, originUUID) | ||
159 | SELECT CONVERT(uniqueidentifier, uuid), regionHandle, regionName, regionRecvKey, regionSendKey, regionSecret, regionDataURI, serverIP, serverPort, serverURI, locX, locY, locZ, eastOverrideHandle, westOverrideHandle, southOverrideHandle, northOverrideHandle, regionAssetURI, regionAssetRecvKey, regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey, CONVERT(uniqueidentifier, regionMapTexture), serverHttpPort, serverRemotingPort, CONVERT(uniqueidentifier, owner_uuid), CONVERT(uniqueidentifier, originUUID) FROM dbo.regions WITH (HOLDLOCK TABLOCKX)') | ||
160 | |||
161 | DROP TABLE dbo.regions | ||
162 | |||
163 | EXECUTE sp_rename N'dbo.Tmp_regions', N'regions', 'OBJECT' | ||
164 | |||
165 | ALTER TABLE dbo.regions ADD CONSTRAINT | ||
166 | PK__regions__uuid PRIMARY KEY CLUSTERED | ||
167 | ( | ||
168 | uuid | ||
169 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
170 | |||
171 | CREATE NONCLUSTERED INDEX IX_regions_name ON dbo.regions | ||
172 | ( | ||
173 | regionName | ||
174 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
175 | |||
176 | CREATE NONCLUSTERED INDEX IX_regions_handle ON dbo.regions | ||
177 | ( | ||
178 | regionHandle | ||
179 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
180 | |||
181 | CREATE NONCLUSTERED INDEX IX_regions_override ON dbo.regions | ||
182 | ( | ||
183 | eastOverrideHandle, | ||
184 | westOverrideHandle, | ||
185 | southOverrideHandle, | ||
186 | northOverrideHandle | ||
187 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
188 | |||
189 | COMMIT | ||
190 | |||
191 | |||
192 | :VERSION 5 | ||
193 | |||
194 | BEGIN TRANSACTION | ||
195 | |||
196 | ALTER TABLE regions ADD access int default 0; | ||
197 | |||
198 | COMMIT | ||
199 | |||
200 | |||
201 | :VERSION 6 | ||
202 | |||
203 | BEGIN TRANSACTION | ||
204 | |||
205 | ALTER TABLE regions ADD scopeid uniqueidentifier default '00000000-0000-0000-0000-000000000000'; | ||
206 | ALTER TABLE regions ADD DEFAULT ('00000000-0000-0000-0000-000000000000') FOR [owner_uuid]; | ||
207 | ALTER TABLE regions ADD sizeX integer not null default 0; | ||
208 | ALTER TABLE regions ADD sizeY integer not null default 0; | ||
209 | |||
210 | COMMIT | ||
211 | |||
212 | |||
213 | :VERSION 7 | ||
214 | |||
215 | BEGIN TRANSACTION | ||
216 | |||
217 | ALTER TABLE regions ADD [flags] integer NOT NULL DEFAULT 0; | ||
218 | CREATE INDEX [flags] ON regions(flags); | ||
219 | ALTER TABLE [regions] ADD [last_seen] integer NOT NULL DEFAULT 0; | ||
220 | ALTER TABLE [regions] ADD [PrincipalID] uniqueidentifier NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000'; | ||
221 | ALTER TABLE [regions] ADD [Token] varchar(255) NOT NULL DEFAULT 0; | ||
222 | |||
223 | COMMIT | ||
224 | |||
225 | |||
diff --git a/OpenSim/Data/MSSQL/Resources/InventoryStore.migrations b/OpenSim/Data/MSSQL/Resources/InventoryStore.migrations new file mode 100644 index 0000000..cd5dfdc --- /dev/null +++ b/OpenSim/Data/MSSQL/Resources/InventoryStore.migrations | |||
@@ -0,0 +1,174 @@ | |||
1 | :VERSION 1 | ||
2 | |||
3 | BEGIN TRANSACTION | ||
4 | |||
5 | CREATE TABLE [inventoryfolders] ( | ||
6 | [folderID] [varchar](36) NOT NULL default '', | ||
7 | [agentID] [varchar](36) default NULL, | ||
8 | [parentFolderID] [varchar](36) default NULL, | ||
9 | [folderName] [varchar](64) default NULL, | ||
10 | [type] [smallint] NOT NULL default 0, | ||
11 | [version] [int] NOT NULL default 0, | ||
12 | PRIMARY KEY CLUSTERED | ||
13 | ( | ||
14 | [folderID] ASC | ||
15 | )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
16 | ) ON [PRIMARY] | ||
17 | |||
18 | CREATE NONCLUSTERED INDEX [owner] ON [inventoryfolders] | ||
19 | ( | ||
20 | [agentID] ASC | ||
21 | )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
22 | |||
23 | CREATE NONCLUSTERED INDEX [parent] ON [inventoryfolders] | ||
24 | ( | ||
25 | [parentFolderID] ASC | ||
26 | )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
27 | |||
28 | |||
29 | CREATE TABLE [inventoryitems] ( | ||
30 | [inventoryID] [varchar](36) NOT NULL default '', | ||
31 | [assetID] [varchar](36) default NULL, | ||
32 | [assetType] [int] default NULL, | ||
33 | [parentFolderID] [varchar](36) default NULL, | ||
34 | [avatarID] [varchar](36) default NULL, | ||
35 | [inventoryName] [varchar](64) default NULL, | ||
36 | [inventoryDescription] [varchar](128) default NULL, | ||
37 | [inventoryNextPermissions] [int] default NULL, | ||
38 | [inventoryCurrentPermissions] [int] default NULL, | ||
39 | [invType] [int] default NULL, | ||
40 | [creatorID] [varchar](36) default NULL, | ||
41 | [inventoryBasePermissions] [int] NOT NULL default 0, | ||
42 | [inventoryEveryOnePermissions] [int] NOT NULL default 0, | ||
43 | [salePrice] [int] default NULL, | ||
44 | [saleType] [tinyint] default NULL, | ||
45 | [creationDate] [int] default NULL, | ||
46 | [groupID] [varchar](36) default NULL, | ||
47 | [groupOwned] [bit] default NULL, | ||
48 | [flags] [int] default NULL, | ||
49 | PRIMARY KEY CLUSTERED | ||
50 | ( | ||
51 | [inventoryID] ASC | ||
52 | )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
53 | ) ON [PRIMARY] | ||
54 | |||
55 | |||
56 | CREATE NONCLUSTERED INDEX [owner] ON [inventoryitems] | ||
57 | ( | ||
58 | [avatarID] ASC | ||
59 | )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
60 | |||
61 | CREATE NONCLUSTERED INDEX [folder] ON [inventoryitems] | ||
62 | ( | ||
63 | [parentFolderID] ASC | ||
64 | )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
65 | |||
66 | COMMIT | ||
67 | |||
68 | |||
69 | :VERSION 2 | ||
70 | |||
71 | BEGIN TRANSACTION | ||
72 | |||
73 | ALTER TABLE inventoryitems ADD inventoryGroupPermissions INTEGER NOT NULL default 0 | ||
74 | |||
75 | COMMIT | ||
76 | |||
77 | :VERSION 3 | ||
78 | |||
79 | /* To prevent any potential data loss issues, you should review this script in detail before running it outside the context of the database designer.*/ | ||
80 | BEGIN TRANSACTION | ||
81 | |||
82 | CREATE TABLE dbo.Tmp_inventoryfolders | ||
83 | ( | ||
84 | folderID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'), | ||
85 | agentID uniqueidentifier NULL DEFAULT (NULL), | ||
86 | parentFolderID uniqueidentifier NULL DEFAULT (NULL), | ||
87 | folderName varchar(64) NULL DEFAULT (NULL), | ||
88 | type smallint NOT NULL DEFAULT ((0)), | ||
89 | version int NOT NULL DEFAULT ((0)) | ||
90 | ) ON [PRIMARY] | ||
91 | |||
92 | IF EXISTS(SELECT * FROM dbo.inventoryfolders) | ||
93 | EXEC('INSERT INTO dbo.Tmp_inventoryfolders (folderID, agentID, parentFolderID, folderName, type, version) | ||
94 | SELECT CONVERT(uniqueidentifier, folderID), CONVERT(uniqueidentifier, agentID), CONVERT(uniqueidentifier, parentFolderID), folderName, type, version FROM dbo.inventoryfolders WITH (HOLDLOCK TABLOCKX)') | ||
95 | |||
96 | DROP TABLE dbo.inventoryfolders | ||
97 | |||
98 | EXECUTE sp_rename N'dbo.Tmp_inventoryfolders', N'inventoryfolders', 'OBJECT' | ||
99 | |||
100 | ALTER TABLE dbo.inventoryfolders ADD CONSTRAINT | ||
101 | PK__inventor__C2FABFB3173876EA PRIMARY KEY CLUSTERED | ||
102 | ( | ||
103 | folderID | ||
104 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
105 | |||
106 | CREATE NONCLUSTERED INDEX owner ON dbo.inventoryfolders | ||
107 | ( | ||
108 | agentID | ||
109 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
110 | |||
111 | CREATE NONCLUSTERED INDEX parent ON dbo.inventoryfolders | ||
112 | ( | ||
113 | parentFolderID | ||
114 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
115 | |||
116 | COMMIT | ||
117 | |||
118 | |||
119 | :VERSION 4 | ||
120 | |||
121 | BEGIN TRANSACTION | ||
122 | |||
123 | CREATE TABLE dbo.Tmp_inventoryitems | ||
124 | ( | ||
125 | inventoryID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'), | ||
126 | assetID uniqueidentifier NULL DEFAULT (NULL), | ||
127 | assetType int NULL DEFAULT (NULL), | ||
128 | parentFolderID uniqueidentifier NULL DEFAULT (NULL), | ||
129 | avatarID uniqueidentifier NULL DEFAULT (NULL), | ||
130 | inventoryName varchar(64) NULL DEFAULT (NULL), | ||
131 | inventoryDescription varchar(128) NULL DEFAULT (NULL), | ||
132 | inventoryNextPermissions int NULL DEFAULT (NULL), | ||
133 | inventoryCurrentPermissions int NULL DEFAULT (NULL), | ||
134 | invType int NULL DEFAULT (NULL), | ||
135 | creatorID uniqueidentifier NULL DEFAULT (NULL), | ||
136 | inventoryBasePermissions int NOT NULL DEFAULT ((0)), | ||
137 | inventoryEveryOnePermissions int NOT NULL DEFAULT ((0)), | ||
138 | salePrice int NULL DEFAULT (NULL), | ||
139 | saleType tinyint NULL DEFAULT (NULL), | ||
140 | creationDate int NULL DEFAULT (NULL), | ||
141 | groupID uniqueidentifier NULL DEFAULT (NULL), | ||
142 | groupOwned bit NULL DEFAULT (NULL), | ||
143 | flags int NULL DEFAULT (NULL), | ||
144 | inventoryGroupPermissions int NOT NULL DEFAULT ((0)) | ||
145 | ) ON [PRIMARY] | ||
146 | |||
147 | IF EXISTS(SELECT * FROM dbo.inventoryitems) | ||
148 | EXEC('INSERT INTO dbo.Tmp_inventoryitems (inventoryID, assetID, assetType, parentFolderID, avatarID, inventoryName, inventoryDescription, inventoryNextPermissions, inventoryCurrentPermissions, invType, creatorID, inventoryBasePermissions, inventoryEveryOnePermissions, salePrice, saleType, creationDate, groupID, groupOwned, flags, inventoryGroupPermissions) | ||
149 | SELECT CONVERT(uniqueidentifier, inventoryID), CONVERT(uniqueidentifier, assetID), assetType, CONVERT(uniqueidentifier, parentFolderID), CONVERT(uniqueidentifier, avatarID), inventoryName, inventoryDescription, inventoryNextPermissions, inventoryCurrentPermissions, invType, CONVERT(uniqueidentifier, creatorID), inventoryBasePermissions, inventoryEveryOnePermissions, salePrice, saleType, creationDate, CONVERT(uniqueidentifier, groupID), groupOwned, flags, inventoryGroupPermissions FROM dbo.inventoryitems WITH (HOLDLOCK TABLOCKX)') | ||
150 | |||
151 | DROP TABLE dbo.inventoryitems | ||
152 | |||
153 | EXECUTE sp_rename N'dbo.Tmp_inventoryitems', N'inventoryitems', 'OBJECT' | ||
154 | |||
155 | ALTER TABLE dbo.inventoryitems ADD CONSTRAINT | ||
156 | PK__inventor__C4B7BC2220C1E124 PRIMARY KEY CLUSTERED | ||
157 | ( | ||
158 | inventoryID | ||
159 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
160 | |||
161 | |||
162 | CREATE NONCLUSTERED INDEX owner ON dbo.inventoryitems | ||
163 | ( | ||
164 | avatarID | ||
165 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
166 | |||
167 | CREATE NONCLUSTERED INDEX folder ON dbo.inventoryitems | ||
168 | ( | ||
169 | parentFolderID | ||
170 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
171 | |||
172 | COMMIT | ||
173 | |||
174 | |||
diff --git a/OpenSim/Data/MSSQL/Resources/001_LogStore.sql b/OpenSim/Data/MSSQL/Resources/LogStore.migrations index 9ece627..1430d8d 100644 --- a/OpenSim/Data/MSSQL/Resources/001_LogStore.sql +++ b/OpenSim/Data/MSSQL/Resources/LogStore.migrations | |||
@@ -1,3 +1,5 @@ | |||
1 | :VERSION 1 | ||
2 | |||
1 | BEGIN TRANSACTION | 3 | BEGIN TRANSACTION |
2 | 4 | ||
3 | CREATE TABLE [logs] ( | 5 | CREATE TABLE [logs] ( |
diff --git a/OpenSim/Data/MSSQL/Resources/001_Presence.sql b/OpenSim/Data/MSSQL/Resources/Presence.migrations index 877881c..35f78e1 100644 --- a/OpenSim/Data/MSSQL/Resources/001_Presence.sql +++ b/OpenSim/Data/MSSQL/Resources/Presence.migrations | |||
@@ -1,3 +1,5 @@ | |||
1 | :VERSION 1 | ||
2 | |||
1 | BEGIN TRANSACTION | 3 | BEGIN TRANSACTION |
2 | 4 | ||
3 | CREATE TABLE [Presence] ( | 5 | CREATE TABLE [Presence] ( |
@@ -16,4 +18,13 @@ CREATE TABLE [Presence] ( | |||
16 | ) | 18 | ) |
17 | ON [PRIMARY] | 19 | ON [PRIMARY] |
18 | 20 | ||
21 | COMMIT | ||
22 | |||
23 | :VERSION 2 | ||
24 | |||
25 | BEGIN TRANSACTION | ||
26 | |||
27 | CREATE UNIQUE INDEX SessionID ON Presence(SessionID); | ||
28 | CREATE INDEX UserID ON Presence(UserID); | ||
29 | |||
19 | COMMIT \ No newline at end of file | 30 | COMMIT \ No newline at end of file |
diff --git a/OpenSim/Data/MSSQL/Resources/RegionStore.migrations b/OpenSim/Data/MSSQL/Resources/RegionStore.migrations new file mode 100644 index 0000000..e912d64 --- /dev/null +++ b/OpenSim/Data/MSSQL/Resources/RegionStore.migrations | |||
@@ -0,0 +1,929 @@ | |||
1 |  | ||
2 | :VERSION 1 | ||
3 | |||
4 | CREATE TABLE [dbo].[prims]( | ||
5 | [UUID] [varchar](255) NOT NULL, | ||
6 | [RegionUUID] [varchar](255) NULL, | ||
7 | [ParentID] [int] NULL, | ||
8 | [CreationDate] [int] NULL, | ||
9 | [Name] [varchar](255) NULL, | ||
10 | [SceneGroupID] [varchar](255) NULL, | ||
11 | [Text] [varchar](255) NULL, | ||
12 | [Description] [varchar](255) NULL, | ||
13 | [SitName] [varchar](255) NULL, | ||
14 | [TouchName] [varchar](255) NULL, | ||
15 | [ObjectFlags] [int] NULL, | ||
16 | [CreatorID] [varchar](255) NULL, | ||
17 | [OwnerID] [varchar](255) NULL, | ||
18 | [GroupID] [varchar](255) NULL, | ||
19 | [LastOwnerID] [varchar](255) NULL, | ||
20 | [OwnerMask] [int] NULL, | ||
21 | [NextOwnerMask] [int] NULL, | ||
22 | [GroupMask] [int] NULL, | ||
23 | [EveryoneMask] [int] NULL, | ||
24 | [BaseMask] [int] NULL, | ||
25 | [PositionX] [float] NULL, | ||
26 | [PositionY] [float] NULL, | ||
27 | [PositionZ] [float] NULL, | ||
28 | [GroupPositionX] [float] NULL, | ||
29 | [GroupPositionY] [float] NULL, | ||
30 | [GroupPositionZ] [float] NULL, | ||
31 | [VelocityX] [float] NULL, | ||
32 | [VelocityY] [float] NULL, | ||
33 | [VelocityZ] [float] NULL, | ||
34 | [AngularVelocityX] [float] NULL, | ||
35 | [AngularVelocityY] [float] NULL, | ||
36 | [AngularVelocityZ] [float] NULL, | ||
37 | [AccelerationX] [float] NULL, | ||
38 | [AccelerationY] [float] NULL, | ||
39 | [AccelerationZ] [float] NULL, | ||
40 | [RotationX] [float] NULL, | ||
41 | [RotationY] [float] NULL, | ||
42 | [RotationZ] [float] NULL, | ||
43 | [RotationW] [float] NULL, | ||
44 | [SitTargetOffsetX] [float] NULL, | ||
45 | [SitTargetOffsetY] [float] NULL, | ||
46 | [SitTargetOffsetZ] [float] NULL, | ||
47 | [SitTargetOrientW] [float] NULL, | ||
48 | [SitTargetOrientX] [float] NULL, | ||
49 | [SitTargetOrientY] [float] NULL, | ||
50 | [SitTargetOrientZ] [float] NULL, | ||
51 | PRIMARY KEY CLUSTERED | ||
52 | ( | ||
53 | [UUID] ASC | ||
54 | )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] | ||
55 | ) ON [PRIMARY] | ||
56 | |||
57 | CREATE TABLE [dbo].[primshapes]( | ||
58 | [UUID] [varchar](255) NOT NULL, | ||
59 | [Shape] [int] NULL, | ||
60 | [ScaleX] [float] NULL, | ||
61 | [ScaleY] [float] NULL, | ||
62 | [ScaleZ] [float] NULL, | ||
63 | [PCode] [int] NULL, | ||
64 | [PathBegin] [int] NULL, | ||
65 | [PathEnd] [int] NULL, | ||
66 | [PathScaleX] [int] NULL, | ||
67 | [PathScaleY] [int] NULL, | ||
68 | [PathShearX] [int] NULL, | ||
69 | [PathShearY] [int] NULL, | ||
70 | [PathSkew] [int] NULL, | ||
71 | [PathCurve] [int] NULL, | ||
72 | [PathRadiusOffset] [int] NULL, | ||
73 | [PathRevolutions] [int] NULL, | ||
74 | [PathTaperX] [int] NULL, | ||
75 | [PathTaperY] [int] NULL, | ||
76 | [PathTwist] [int] NULL, | ||
77 | [PathTwistBegin] [int] NULL, | ||
78 | [ProfileBegin] [int] NULL, | ||
79 | [ProfileEnd] [int] NULL, | ||
80 | [ProfileCurve] [int] NULL, | ||
81 | [ProfileHollow] [int] NULL, | ||
82 | [State] [int] NULL, | ||
83 | [Texture] [image] NULL, | ||
84 | [ExtraParams] [image] NULL, | ||
85 | PRIMARY KEY CLUSTERED | ||
86 | ( | ||
87 | [UUID] ASC | ||
88 | )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] | ||
89 | ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] | ||
90 | |||
91 | CREATE TABLE [dbo].[primitems]( | ||
92 | [itemID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, | ||
93 | [primID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, | ||
94 | [assetID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, | ||
95 | [parentFolderID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, | ||
96 | [invType] [int] NULL, | ||
97 | [assetType] [int] NULL, | ||
98 | [name] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, | ||
99 | [description] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, | ||
100 | [creationDate] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, | ||
101 | [creatorID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, | ||
102 | [ownerID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, | ||
103 | [lastOwnerID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, | ||
104 | [groupID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, | ||
105 | [nextPermissions] [int] NULL, | ||
106 | [currentPermissions] [int] NULL, | ||
107 | [basePermissions] [int] NULL, | ||
108 | [everyonePermissions] [int] NULL, | ||
109 | [groupPermissions] [int] NULL, | ||
110 | PRIMARY KEY CLUSTERED | ||
111 | ( | ||
112 | [itemID] ASC | ||
113 | )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] | ||
114 | ) ON [PRIMARY] | ||
115 | |||
116 | CREATE TABLE [dbo].[terrain]( | ||
117 | [RegionUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, | ||
118 | [Revision] [int] NULL, | ||
119 | [Heightfield] [image] NULL | ||
120 | ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] | ||
121 | |||
122 | CREATE TABLE [dbo].[land]( | ||
123 | [UUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, | ||
124 | [RegionUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, | ||
125 | [LocalLandID] [int] NULL, | ||
126 | [Bitmap] [image] NULL, | ||
127 | [Name] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, | ||
128 | [Description] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, | ||
129 | [OwnerUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, | ||
130 | [IsGroupOwned] [int] NULL, | ||
131 | [Area] [int] NULL, | ||
132 | [AuctionID] [int] NULL, | ||
133 | [Category] [int] NULL, | ||
134 | [ClaimDate] [int] NULL, | ||
135 | [ClaimPrice] [int] NULL, | ||
136 | [GroupUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, | ||
137 | [SalePrice] [int] NULL, | ||
138 | [LandStatus] [int] NULL, | ||
139 | [LandFlags] [int] NULL, | ||
140 | [LandingType] [int] NULL, | ||
141 | [MediaAutoScale] [int] NULL, | ||
142 | [MediaTextureUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, | ||
143 | [MediaURL] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, | ||
144 | [MusicURL] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, | ||
145 | [PassHours] [float] NULL, | ||
146 | [PassPrice] [int] NULL, | ||
147 | [SnapshotUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, | ||
148 | [UserLocationX] [float] NULL, | ||
149 | [UserLocationY] [float] NULL, | ||
150 | [UserLocationZ] [float] NULL, | ||
151 | [UserLookAtX] [float] NULL, | ||
152 | [UserLookAtY] [float] NULL, | ||
153 | [UserLookAtZ] [float] NULL, | ||
154 | PRIMARY KEY CLUSTERED | ||
155 | ( | ||
156 | [UUID] ASC | ||
157 | )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] | ||
158 | ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] | ||
159 | |||
160 | CREATE TABLE [dbo].[landaccesslist]( | ||
161 | [LandUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, | ||
162 | [AccessUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, | ||
163 | [Flags] [int] NULL | ||
164 | ) ON [PRIMARY] | ||
165 | |||
166 | :VERSION 2 | ||
167 | |||
168 | BEGIN TRANSACTION | ||
169 | |||
170 | CREATE TABLE regionban ( | ||
171 | [regionUUID] VARCHAR(36) NOT NULL, | ||
172 | [bannedUUID] VARCHAR(36) NOT NULL, | ||
173 | [bannedIp] VARCHAR(16) NOT NULL, | ||
174 | [bannedIpHostMask] VARCHAR(16) NOT NULL) | ||
175 | |||
176 | create table [dbo].[regionsettings] ( | ||
177 | [regionUUID] [varchar](36) not null, | ||
178 | [block_terraform] [bit] not null, | ||
179 | [block_fly] [bit] not null, | ||
180 | [allow_damage] [bit] not null, | ||
181 | [restrict_pushing] [bit] not null, | ||
182 | [allow_land_resell] [bit] not null, | ||
183 | [allow_land_join_divide] [bit] not null, | ||
184 | [block_show_in_search] [bit] not null, | ||
185 | [agent_limit] [int] not null, | ||
186 | [object_bonus] [float] not null, | ||
187 | [maturity] [int] not null, | ||
188 | [disable_scripts] [bit] not null, | ||
189 | [disable_collisions] [bit] not null, | ||
190 | [disable_physics] [bit] not null, | ||
191 | [terrain_texture_1] [varchar](36) not null, | ||
192 | [terrain_texture_2] [varchar](36) not null, | ||
193 | [terrain_texture_3] [varchar](36) not null, | ||
194 | [terrain_texture_4] [varchar](36) not null, | ||
195 | [elevation_1_nw] [float] not null, | ||
196 | [elevation_2_nw] [float] not null, | ||
197 | [elevation_1_ne] [float] not null, | ||
198 | [elevation_2_ne] [float] not null, | ||
199 | [elevation_1_se] [float] not null, | ||
200 | [elevation_2_se] [float] not null, | ||
201 | [elevation_1_sw] [float] not null, | ||
202 | [elevation_2_sw] [float] not null, | ||
203 | [water_height] [float] not null, | ||
204 | [terrain_raise_limit] [float] not null, | ||
205 | [terrain_lower_limit] [float] not null, | ||
206 | [use_estate_sun] [bit] not null, | ||
207 | [fixed_sun] [bit] not null, | ||
208 | [sun_position] [float] not null, | ||
209 | [covenant] [varchar](36) default NULL, | ||
210 | [Sandbox] [bit] NOT NULL, | ||
211 | PRIMARY KEY CLUSTERED | ||
212 | ( | ||
213 | [regionUUID] ASC | ||
214 | )WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY] | ||
215 | ) ON [PRIMARY] | ||
216 | |||
217 | COMMIT | ||
218 | |||
219 | :VERSION 3 | ||
220 | |||
221 | BEGIN TRANSACTION | ||
222 | |||
223 | CREATE TABLE dbo.Tmp_prims | ||
224 | ( | ||
225 | UUID varchar(36) NOT NULL, | ||
226 | RegionUUID varchar(36) NULL, | ||
227 | ParentID int NULL, | ||
228 | CreationDate int NULL, | ||
229 | Name varchar(255) NULL, | ||
230 | SceneGroupID varchar(36) NULL, | ||
231 | Text varchar(255) NULL, | ||
232 | Description varchar(255) NULL, | ||
233 | SitName varchar(255) NULL, | ||
234 | TouchName varchar(255) NULL, | ||
235 | ObjectFlags int NULL, | ||
236 | CreatorID varchar(36) NULL, | ||
237 | OwnerID varchar(36) NULL, | ||
238 | GroupID varchar(36) NULL, | ||
239 | LastOwnerID varchar(36) NULL, | ||
240 | OwnerMask int NULL, | ||
241 | NextOwnerMask int NULL, | ||
242 | GroupMask int NULL, | ||
243 | EveryoneMask int NULL, | ||
244 | BaseMask int NULL, | ||
245 | PositionX float(53) NULL, | ||
246 | PositionY float(53) NULL, | ||
247 | PositionZ float(53) NULL, | ||
248 | GroupPositionX float(53) NULL, | ||
249 | GroupPositionY float(53) NULL, | ||
250 | GroupPositionZ float(53) NULL, | ||
251 | VelocityX float(53) NULL, | ||
252 | VelocityY float(53) NULL, | ||
253 | VelocityZ float(53) NULL, | ||
254 | AngularVelocityX float(53) NULL, | ||
255 | AngularVelocityY float(53) NULL, | ||
256 | AngularVelocityZ float(53) NULL, | ||
257 | AccelerationX float(53) NULL, | ||
258 | AccelerationY float(53) NULL, | ||
259 | AccelerationZ float(53) NULL, | ||
260 | RotationX float(53) NULL, | ||
261 | RotationY float(53) NULL, | ||
262 | RotationZ float(53) NULL, | ||
263 | RotationW float(53) NULL, | ||
264 | SitTargetOffsetX float(53) NULL, | ||
265 | SitTargetOffsetY float(53) NULL, | ||
266 | SitTargetOffsetZ float(53) NULL, | ||
267 | SitTargetOrientW float(53) NULL, | ||
268 | SitTargetOrientX float(53) NULL, | ||
269 | SitTargetOrientY float(53) NULL, | ||
270 | SitTargetOrientZ float(53) NULL | ||
271 | ) ON [PRIMARY] | ||
272 | |||
273 | IF EXISTS(SELECT * FROM dbo.prims) | ||
274 | EXEC('INSERT INTO dbo.Tmp_prims (UUID, RegionUUID, ParentID, CreationDate, Name, SceneGroupID, Text, Description, SitName, TouchName, ObjectFlags, CreatorID, OwnerID, GroupID, LastOwnerID, OwnerMask, NextOwnerMask, GroupMask, EveryoneMask, BaseMask, PositionX, PositionY, PositionZ, GroupPositionX, GroupPositionY, GroupPositionZ, VelocityX, VelocityY, VelocityZ, AngularVelocityX, AngularVelocityY, AngularVelocityZ, AccelerationX, AccelerationY, AccelerationZ, RotationX, RotationY, RotationZ, RotationW, SitTargetOffsetX, SitTargetOffsetY, SitTargetOffsetZ, SitTargetOrientW, SitTargetOrientX, SitTargetOrientY, SitTargetOrientZ) | ||
275 | SELECT CONVERT(varchar(36), UUID), CONVERT(varchar(36), RegionUUID), ParentID, CreationDate, Name, CONVERT(varchar(36), SceneGroupID), Text, Description, SitName, TouchName, ObjectFlags, CONVERT(varchar(36), CreatorID), CONVERT(varchar(36), OwnerID), CONVERT(varchar(36), GroupID), CONVERT(varchar(36), LastOwnerID), OwnerMask, NextOwnerMask, GroupMask, EveryoneMask, BaseMask, PositionX, PositionY, PositionZ, GroupPositionX, GroupPositionY, GroupPositionZ, VelocityX, VelocityY, VelocityZ, AngularVelocityX, AngularVelocityY, AngularVelocityZ, AccelerationX, AccelerationY, AccelerationZ, RotationX, RotationY, RotationZ, RotationW, SitTargetOffsetX, SitTargetOffsetY, SitTargetOffsetZ, SitTargetOrientW, SitTargetOrientX, SitTargetOrientY, SitTargetOrientZ FROM dbo.prims WITH (HOLDLOCK TABLOCKX)') | ||
276 | |||
277 | DROP TABLE dbo.prims | ||
278 | |||
279 | EXECUTE sp_rename N'dbo.Tmp_prims', N'prims', 'OBJECT' | ||
280 | |||
281 | ALTER TABLE dbo.prims ADD CONSTRAINT | ||
282 | PK__prims__10566F31 PRIMARY KEY CLUSTERED | ||
283 | ( | ||
284 | UUID | ||
285 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
286 | |||
287 | COMMIT | ||
288 | |||
289 | :VERSION 4 | ||
290 | |||
291 | BEGIN TRANSACTION | ||
292 | |||
293 | CREATE TABLE Tmp_primitems | ||
294 | ( | ||
295 | itemID varchar(36) NOT NULL, | ||
296 | primID varchar(36) NULL, | ||
297 | assetID varchar(36) NULL, | ||
298 | parentFolderID varchar(36) NULL, | ||
299 | invType int NULL, | ||
300 | assetType int NULL, | ||
301 | name varchar(255) NULL, | ||
302 | description varchar(255) NULL, | ||
303 | creationDate varchar(255) NULL, | ||
304 | creatorID varchar(36) NULL, | ||
305 | ownerID varchar(36) NULL, | ||
306 | lastOwnerID varchar(36) NULL, | ||
307 | groupID varchar(36) NULL, | ||
308 | nextPermissions int NULL, | ||
309 | currentPermissions int NULL, | ||
310 | basePermissions int NULL, | ||
311 | everyonePermissions int NULL, | ||
312 | groupPermissions int NULL | ||
313 | ) ON [PRIMARY] | ||
314 | |||
315 | IF EXISTS(SELECT * FROM primitems) | ||
316 | EXEC('INSERT INTO Tmp_primitems (itemID, primID, assetID, parentFolderID, invType, assetType, name, description, creationDate, creatorID, ownerID, lastOwnerID, groupID, nextPermissions, currentPermissions, basePermissions, everyonePermissions, groupPermissions) | ||
317 | SELECT CONVERT(varchar(36), itemID), CONVERT(varchar(36), primID), CONVERT(varchar(36), assetID), CONVERT(varchar(36), parentFolderID), invType, assetType, name, description, creationDate, CONVERT(varchar(36), creatorID), CONVERT(varchar(36), ownerID), CONVERT(varchar(36), lastOwnerID), CONVERT(varchar(36), groupID), nextPermissions, currentPermissions, basePermissions, everyonePermissions, groupPermissions') | ||
318 | |||
319 | DROP TABLE primitems | ||
320 | |||
321 | EXECUTE sp_rename N'Tmp_primitems', N'primitems', 'OBJECT' | ||
322 | |||
323 | ALTER TABLE primitems ADD CONSTRAINT | ||
324 | PK__primitems__0A688BB1 PRIMARY KEY CLUSTERED | ||
325 | ( | ||
326 | itemID | ||
327 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
328 | |||
329 | |||
330 | COMMIT | ||
331 | |||
332 | |||
333 | :VERSION 5 | ||
334 | |||
335 | BEGIN TRANSACTION | ||
336 | |||
337 | CREATE TABLE Tmp_primshapes | ||
338 | ( | ||
339 | UUID varchar(36) NOT NULL, | ||
340 | Shape int NULL, | ||
341 | ScaleX float(53) NULL, | ||
342 | ScaleY float(53) NULL, | ||
343 | ScaleZ float(53) NULL, | ||
344 | PCode int NULL, | ||
345 | PathBegin int NULL, | ||
346 | PathEnd int NULL, | ||
347 | PathScaleX int NULL, | ||
348 | PathScaleY int NULL, | ||
349 | PathShearX int NULL, | ||
350 | PathShearY int NULL, | ||
351 | PathSkew int NULL, | ||
352 | PathCurve int NULL, | ||
353 | PathRadiusOffset int NULL, | ||
354 | PathRevolutions int NULL, | ||
355 | PathTaperX int NULL, | ||
356 | PathTaperY int NULL, | ||
357 | PathTwist int NULL, | ||
358 | PathTwistBegin int NULL, | ||
359 | ProfileBegin int NULL, | ||
360 | ProfileEnd int NULL, | ||
361 | ProfileCurve int NULL, | ||
362 | ProfileHollow int NULL, | ||
363 | State int NULL, | ||
364 | Texture image NULL, | ||
365 | ExtraParams image NULL | ||
366 | ) ON [PRIMARY] | ||
367 | TEXTIMAGE_ON [PRIMARY] | ||
368 | |||
369 | IF EXISTS(SELECT * FROM primshapes) | ||
370 | EXEC('INSERT INTO Tmp_primshapes (UUID, Shape, ScaleX, ScaleY, ScaleZ, PCode, PathBegin, PathEnd, PathScaleX, PathScaleY, PathShearX, PathShearY, PathSkew, PathCurve, PathRadiusOffset, PathRevolutions, PathTaperX, PathTaperY, PathTwist, PathTwistBegin, ProfileBegin, ProfileEnd, ProfileCurve, ProfileHollow, State, Texture, ExtraParams) | ||
371 | SELECT CONVERT(varchar(36), UUID), Shape, ScaleX, ScaleY, ScaleZ, PCode, PathBegin, PathEnd, PathScaleX, PathScaleY, PathShearX, PathShearY, PathSkew, PathCurve, PathRadiusOffset, PathRevolutions, PathTaperX, PathTaperY, PathTwist, PathTwistBegin, ProfileBegin, ProfileEnd, ProfileCurve, ProfileHollow, State, Texture, ExtraParams FROM primshapes WITH (HOLDLOCK TABLOCKX)') | ||
372 | |||
373 | DROP TABLE primshapes | ||
374 | |||
375 | EXECUTE sp_rename N'Tmp_primshapes', N'primshapes', 'OBJECT' | ||
376 | |||
377 | ALTER TABLE primshapes ADD CONSTRAINT | ||
378 | PK__primshapes__0880433F PRIMARY KEY CLUSTERED | ||
379 | ( | ||
380 | UUID | ||
381 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
382 | |||
383 | COMMIT | ||
384 | |||
385 | |||
386 | :VERSION 6 | ||
387 | |||
388 | BEGIN TRANSACTION | ||
389 | |||
390 | ALTER TABLE prims ADD PayPrice int not null default 0 | ||
391 | ALTER TABLE prims ADD PayButton1 int not null default 0 | ||
392 | ALTER TABLE prims ADD PayButton2 int not null default 0 | ||
393 | ALTER TABLE prims ADD PayButton3 int not null default 0 | ||
394 | ALTER TABLE prims ADD PayButton4 int not null default 0 | ||
395 | ALTER TABLE prims ADD LoopedSound varchar(36) not null default '00000000-0000-0000-0000-000000000000'; | ||
396 | ALTER TABLE prims ADD LoopedSoundGain float not null default 0.0; | ||
397 | ALTER TABLE prims ADD TextureAnimation image | ||
398 | ALTER TABLE prims ADD OmegaX float not null default 0.0 | ||
399 | ALTER TABLE prims ADD OmegaY float not null default 0.0 | ||
400 | ALTER TABLE prims ADD OmegaZ float not null default 0.0 | ||
401 | ALTER TABLE prims ADD CameraEyeOffsetX float not null default 0.0 | ||
402 | ALTER TABLE prims ADD CameraEyeOffsetY float not null default 0.0 | ||
403 | ALTER TABLE prims ADD CameraEyeOffsetZ float not null default 0.0 | ||
404 | ALTER TABLE prims ADD CameraAtOffsetX float not null default 0.0 | ||
405 | ALTER TABLE prims ADD CameraAtOffsetY float not null default 0.0 | ||
406 | ALTER TABLE prims ADD CameraAtOffsetZ float not null default 0.0 | ||
407 | ALTER TABLE prims ADD ForceMouselook tinyint not null default 0 | ||
408 | ALTER TABLE prims ADD ScriptAccessPin int not null default 0 | ||
409 | ALTER TABLE prims ADD AllowedDrop tinyint not null default 0 | ||
410 | ALTER TABLE prims ADD DieAtEdge tinyint not null default 0 | ||
411 | ALTER TABLE prims ADD SalePrice int not null default 10 | ||
412 | ALTER TABLE prims ADD SaleType tinyint not null default 0 | ||
413 | |||
414 | ALTER TABLE primitems add flags integer not null default 0 | ||
415 | |||
416 | ALTER TABLE land ADD AuthbuyerID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000' | ||
417 | |||
418 | CREATE index prims_regionuuid on prims(RegionUUID) | ||
419 | CREATE index prims_parentid on prims(ParentID) | ||
420 | |||
421 | CREATE index primitems_primid on primitems(primID) | ||
422 | |||
423 | COMMIT | ||
424 | |||
425 | |||
426 | :VERSION 7 | ||
427 | |||
428 | BEGIN TRANSACTION | ||
429 | |||
430 | ALTER TABLE prims ADD ColorR int not null default 0; | ||
431 | ALTER TABLE prims ADD ColorG int not null default 0; | ||
432 | ALTER TABLE prims ADD ColorB int not null default 0; | ||
433 | ALTER TABLE prims ADD ColorA int not null default 0; | ||
434 | ALTER TABLE prims ADD ParticleSystem IMAGE; | ||
435 | ALTER TABLE prims ADD ClickAction tinyint NOT NULL default 0; | ||
436 | |||
437 | COMMIT | ||
438 | |||
439 | |||
440 | :VERSION 8 | ||
441 | |||
442 | BEGIN TRANSACTION | ||
443 | |||
444 | ALTER TABLE land ADD OtherCleanTime integer NOT NULL default 0; | ||
445 | ALTER TABLE land ADD Dwell integer NOT NULL default 0; | ||
446 | |||
447 | COMMIT | ||
448 | |||
449 | :VERSION 9 | ||
450 | |||
451 | BEGIN TRANSACTION | ||
452 | |||
453 | ALTER TABLE prims ADD Material tinyint NOT NULL default 3 | ||
454 | |||
455 | COMMIT | ||
456 | |||
457 | |||
458 | :VERSION 10 | ||
459 | |||
460 | BEGIN TRANSACTION | ||
461 | |||
462 | ALTER TABLE regionsettings ADD sunvectorx float NOT NULL default 0; | ||
463 | ALTER TABLE regionsettings ADD sunvectory float NOT NULL default 0; | ||
464 | ALTER TABLE regionsettings ADD sunvectorz float NOT NULL default 0; | ||
465 | |||
466 | COMMIT | ||
467 | |||
468 | |||
469 | :VERSION 11 | ||
470 | |||
471 | BEGIN TRANSACTION | ||
472 | |||
473 | ALTER TABLE prims ADD CollisionSound char(36) not null default '00000000-0000-0000-0000-000000000000' | ||
474 | ALTER TABLE prims ADD CollisionSoundVolume float not null default 0.0 | ||
475 | |||
476 | COMMIT | ||
477 | |||
478 | |||
479 | :VERSION 12 | ||
480 | |||
481 | BEGIN TRANSACTION | ||
482 | |||
483 | ALTER TABLE prims ADD LinkNumber integer not null default 0 | ||
484 | |||
485 | COMMIT | ||
486 | |||
487 | |||
488 | :VERSION 13 | ||
489 | |||
490 | BEGIN TRANSACTION | ||
491 | |||
492 | CREATE TABLE dbo.Tmp_prims | ||
493 | ( | ||
494 | UUID uniqueidentifier NOT NULL, | ||
495 | RegionUUID uniqueidentifier NULL, | ||
496 | ParentID int NULL, | ||
497 | CreationDate int NULL, | ||
498 | Name varchar(255) NULL, | ||
499 | SceneGroupID uniqueidentifier NULL, | ||
500 | Text varchar(255) NULL, | ||
501 | Description varchar(255) NULL, | ||
502 | SitName varchar(255) NULL, | ||
503 | TouchName varchar(255) NULL, | ||
504 | ObjectFlags int NULL, | ||
505 | CreatorID uniqueidentifier NULL, | ||
506 | OwnerID uniqueidentifier NULL, | ||
507 | GroupID uniqueidentifier NULL, | ||
508 | LastOwnerID uniqueidentifier NULL, | ||
509 | OwnerMask int NULL, | ||
510 | NextOwnerMask int NULL, | ||
511 | GroupMask int NULL, | ||
512 | EveryoneMask int NULL, | ||
513 | BaseMask int NULL, | ||
514 | PositionX float(53) NULL, | ||
515 | PositionY float(53) NULL, | ||
516 | PositionZ float(53) NULL, | ||
517 | GroupPositionX float(53) NULL, | ||
518 | GroupPositionY float(53) NULL, | ||
519 | GroupPositionZ float(53) NULL, | ||
520 | VelocityX float(53) NULL, | ||
521 | VelocityY float(53) NULL, | ||
522 | VelocityZ float(53) NULL, | ||
523 | AngularVelocityX float(53) NULL, | ||
524 | AngularVelocityY float(53) NULL, | ||
525 | AngularVelocityZ float(53) NULL, | ||
526 | AccelerationX float(53) NULL, | ||
527 | AccelerationY float(53) NULL, | ||
528 | AccelerationZ float(53) NULL, | ||
529 | RotationX float(53) NULL, | ||
530 | RotationY float(53) NULL, | ||
531 | RotationZ float(53) NULL, | ||
532 | RotationW float(53) NULL, | ||
533 | SitTargetOffsetX float(53) NULL, | ||
534 | SitTargetOffsetY float(53) NULL, | ||
535 | SitTargetOffsetZ float(53) NULL, | ||
536 | SitTargetOrientW float(53) NULL, | ||
537 | SitTargetOrientX float(53) NULL, | ||
538 | SitTargetOrientY float(53) NULL, | ||
539 | SitTargetOrientZ float(53) NULL, | ||
540 | PayPrice int NOT NULL DEFAULT ((0)), | ||
541 | PayButton1 int NOT NULL DEFAULT ((0)), | ||
542 | PayButton2 int NOT NULL DEFAULT ((0)), | ||
543 | PayButton3 int NOT NULL DEFAULT ((0)), | ||
544 | PayButton4 int NOT NULL DEFAULT ((0)), | ||
545 | LoopedSound uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'), | ||
546 | LoopedSoundGain float(53) NOT NULL DEFAULT ((0.0)), | ||
547 | TextureAnimation image NULL, | ||
548 | OmegaX float(53) NOT NULL DEFAULT ((0.0)), | ||
549 | OmegaY float(53) NOT NULL DEFAULT ((0.0)), | ||
550 | OmegaZ float(53) NOT NULL DEFAULT ((0.0)), | ||
551 | CameraEyeOffsetX float(53) NOT NULL DEFAULT ((0.0)), | ||
552 | CameraEyeOffsetY float(53) NOT NULL DEFAULT ((0.0)), | ||
553 | CameraEyeOffsetZ float(53) NOT NULL DEFAULT ((0.0)), | ||
554 | CameraAtOffsetX float(53) NOT NULL DEFAULT ((0.0)), | ||
555 | CameraAtOffsetY float(53) NOT NULL DEFAULT ((0.0)), | ||
556 | CameraAtOffsetZ float(53) NOT NULL DEFAULT ((0.0)), | ||
557 | ForceMouselook tinyint NOT NULL DEFAULT ((0)), | ||
558 | ScriptAccessPin int NOT NULL DEFAULT ((0)), | ||
559 | AllowedDrop tinyint NOT NULL DEFAULT ((0)), | ||
560 | DieAtEdge tinyint NOT NULL DEFAULT ((0)), | ||
561 | SalePrice int NOT NULL DEFAULT ((10)), | ||
562 | SaleType tinyint NOT NULL DEFAULT ((0)), | ||
563 | ColorR int NOT NULL DEFAULT ((0)), | ||
564 | ColorG int NOT NULL DEFAULT ((0)), | ||
565 | ColorB int NOT NULL DEFAULT ((0)), | ||
566 | ColorA int NOT NULL DEFAULT ((0)), | ||
567 | ParticleSystem image NULL, | ||
568 | ClickAction tinyint NOT NULL DEFAULT ((0)), | ||
569 | Material tinyint NOT NULL DEFAULT ((3)), | ||
570 | CollisionSound uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'), | ||
571 | CollisionSoundVolume float(53) NOT NULL DEFAULT ((0.0)), | ||
572 | LinkNumber int NOT NULL DEFAULT ((0)) | ||
573 | ) ON [PRIMARY] | ||
574 | TEXTIMAGE_ON [PRIMARY] | ||
575 | |||
576 | IF EXISTS(SELECT * FROM dbo.prims) | ||
577 | EXEC('INSERT INTO dbo.Tmp_prims (UUID, RegionUUID, ParentID, CreationDate, Name, SceneGroupID, Text, Description, SitName, TouchName, ObjectFlags, CreatorID, OwnerID, GroupID, LastOwnerID, OwnerMask, NextOwnerMask, GroupMask, EveryoneMask, BaseMask, PositionX, PositionY, PositionZ, GroupPositionX, GroupPositionY, GroupPositionZ, VelocityX, VelocityY, VelocityZ, AngularVelocityX, AngularVelocityY, AngularVelocityZ, AccelerationX, AccelerationY, AccelerationZ, RotationX, RotationY, RotationZ, RotationW, SitTargetOffsetX, SitTargetOffsetY, SitTargetOffsetZ, SitTargetOrientW, SitTargetOrientX, SitTargetOrientY, SitTargetOrientZ, PayPrice, PayButton1, PayButton2, PayButton3, PayButton4, LoopedSound, LoopedSoundGain, TextureAnimation, OmegaX, OmegaY, OmegaZ, CameraEyeOffsetX, CameraEyeOffsetY, CameraEyeOffsetZ, CameraAtOffsetX, CameraAtOffsetY, CameraAtOffsetZ, ForceMouselook, ScriptAccessPin, AllowedDrop, DieAtEdge, SalePrice, SaleType, ColorR, ColorG, ColorB, ColorA, ParticleSystem, ClickAction, Material, CollisionSound, CollisionSoundVolume, LinkNumber) | ||
578 | SELECT CONVERT(uniqueidentifier, UUID), CONVERT(uniqueidentifier, RegionUUID), ParentID, CreationDate, Name, CONVERT(uniqueidentifier, SceneGroupID), Text, Description, SitName, TouchName, ObjectFlags, CONVERT(uniqueidentifier, CreatorID), CONVERT(uniqueidentifier, OwnerID), CONVERT(uniqueidentifier, GroupID), CONVERT(uniqueidentifier, LastOwnerID), OwnerMask, NextOwnerMask, GroupMask, EveryoneMask, BaseMask, PositionX, PositionY, PositionZ, GroupPositionX, GroupPositionY, GroupPositionZ, VelocityX, VelocityY, VelocityZ, AngularVelocityX, AngularVelocityY, AngularVelocityZ, AccelerationX, AccelerationY, AccelerationZ, RotationX, RotationY, RotationZ, RotationW, SitTargetOffsetX, SitTargetOffsetY, SitTargetOffsetZ, SitTargetOrientW, SitTargetOrientX, SitTargetOrientY, SitTargetOrientZ, PayPrice, PayButton1, PayButton2, PayButton3, PayButton4, CONVERT(uniqueidentifier, LoopedSound), LoopedSoundGain, TextureAnimation, OmegaX, OmegaY, OmegaZ, CameraEyeOffsetX, CameraEyeOffsetY, CameraEyeOffsetZ, CameraAtOffsetX, CameraAtOffsetY, CameraAtOffsetZ, ForceMouselook, ScriptAccessPin, AllowedDrop, DieAtEdge, SalePrice, SaleType, ColorR, ColorG, ColorB, ColorA, ParticleSystem, ClickAction, Material, CONVERT(uniqueidentifier, CollisionSound), CollisionSoundVolume, LinkNumber FROM dbo.prims WITH (HOLDLOCK TABLOCKX)') | ||
579 | |||
580 | DROP TABLE dbo.prims | ||
581 | |||
582 | EXECUTE sp_rename N'dbo.Tmp_prims', N'prims', 'OBJECT' | ||
583 | |||
584 | ALTER TABLE dbo.prims ADD CONSTRAINT | ||
585 | PK__prims__10566F31 PRIMARY KEY CLUSTERED | ||
586 | ( | ||
587 | UUID | ||
588 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
589 | |||
590 | |||
591 | CREATE NONCLUSTERED INDEX prims_regionuuid ON dbo.prims | ||
592 | ( | ||
593 | RegionUUID | ||
594 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
595 | |||
596 | CREATE NONCLUSTERED INDEX prims_parentid ON dbo.prims | ||
597 | ( | ||
598 | ParentID | ||
599 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
600 | |||
601 | COMMIT | ||
602 | |||
603 | |||
604 | :VERSION 14 | ||
605 | |||
606 | BEGIN TRANSACTION | ||
607 | |||
608 | CREATE TABLE dbo.Tmp_primshapes | ||
609 | ( | ||
610 | UUID uniqueidentifier NOT NULL, | ||
611 | Shape int NULL, | ||
612 | ScaleX float(53) NULL, | ||
613 | ScaleY float(53) NULL, | ||
614 | ScaleZ float(53) NULL, | ||
615 | PCode int NULL, | ||
616 | PathBegin int NULL, | ||
617 | PathEnd int NULL, | ||
618 | PathScaleX int NULL, | ||
619 | PathScaleY int NULL, | ||
620 | PathShearX int NULL, | ||
621 | PathShearY int NULL, | ||
622 | PathSkew int NULL, | ||
623 | PathCurve int NULL, | ||
624 | PathRadiusOffset int NULL, | ||
625 | PathRevolutions int NULL, | ||
626 | PathTaperX int NULL, | ||
627 | PathTaperY int NULL, | ||
628 | PathTwist int NULL, | ||
629 | PathTwistBegin int NULL, | ||
630 | ProfileBegin int NULL, | ||
631 | ProfileEnd int NULL, | ||
632 | ProfileCurve int NULL, | ||
633 | ProfileHollow int NULL, | ||
634 | State int NULL, | ||
635 | Texture image NULL, | ||
636 | ExtraParams image NULL | ||
637 | ) ON [PRIMARY] | ||
638 | TEXTIMAGE_ON [PRIMARY] | ||
639 | |||
640 | IF EXISTS(SELECT * FROM dbo.primshapes) | ||
641 | EXEC('INSERT INTO dbo.Tmp_primshapes (UUID, Shape, ScaleX, ScaleY, ScaleZ, PCode, PathBegin, PathEnd, PathScaleX, PathScaleY, PathShearX, PathShearY, PathSkew, PathCurve, PathRadiusOffset, PathRevolutions, PathTaperX, PathTaperY, PathTwist, PathTwistBegin, ProfileBegin, ProfileEnd, ProfileCurve, ProfileHollow, State, Texture, ExtraParams) | ||
642 | SELECT CONVERT(uniqueidentifier, UUID), Shape, ScaleX, ScaleY, ScaleZ, PCode, PathBegin, PathEnd, PathScaleX, PathScaleY, PathShearX, PathShearY, PathSkew, PathCurve, PathRadiusOffset, PathRevolutions, PathTaperX, PathTaperY, PathTwist, PathTwistBegin, ProfileBegin, ProfileEnd, ProfileCurve, ProfileHollow, State, Texture, ExtraParams FROM dbo.primshapes WITH (HOLDLOCK TABLOCKX)') | ||
643 | |||
644 | DROP TABLE dbo.primshapes | ||
645 | |||
646 | EXECUTE sp_rename N'dbo.Tmp_primshapes', N'primshapes', 'OBJECT' | ||
647 | |||
648 | ALTER TABLE dbo.primshapes ADD CONSTRAINT | ||
649 | PK__primshapes__0880433F PRIMARY KEY CLUSTERED | ||
650 | ( | ||
651 | UUID | ||
652 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
653 | |||
654 | COMMIT | ||
655 | |||
656 | |||
657 | :VERSION 15 | ||
658 | |||
659 | BEGIN TRANSACTION | ||
660 | |||
661 | CREATE TABLE dbo.Tmp_primitems | ||
662 | ( | ||
663 | itemID uniqueidentifier NOT NULL, | ||
664 | primID uniqueidentifier NULL, | ||
665 | assetID uniqueidentifier NULL, | ||
666 | parentFolderID uniqueidentifier NULL, | ||
667 | invType int NULL, | ||
668 | assetType int NULL, | ||
669 | name varchar(255) NULL, | ||
670 | description varchar(255) NULL, | ||
671 | creationDate varchar(255) NULL, | ||
672 | creatorID uniqueidentifier NULL, | ||
673 | ownerID uniqueidentifier NULL, | ||
674 | lastOwnerID uniqueidentifier NULL, | ||
675 | groupID uniqueidentifier NULL, | ||
676 | nextPermissions int NULL, | ||
677 | currentPermissions int NULL, | ||
678 | basePermissions int NULL, | ||
679 | everyonePermissions int NULL, | ||
680 | groupPermissions int NULL, | ||
681 | flags int NOT NULL DEFAULT ((0)) | ||
682 | ) ON [PRIMARY] | ||
683 | |||
684 | IF EXISTS(SELECT * FROM dbo.primitems) | ||
685 | EXEC('INSERT INTO dbo.Tmp_primitems (itemID, primID, assetID, parentFolderID, invType, assetType, name, description, creationDate, creatorID, ownerID, lastOwnerID, groupID, nextPermissions, currentPermissions, basePermissions, everyonePermissions, groupPermissions, flags) | ||
686 | SELECT CONVERT(uniqueidentifier, itemID), CONVERT(uniqueidentifier, primID), CONVERT(uniqueidentifier, assetID), CONVERT(uniqueidentifier, parentFolderID), invType, assetType, name, description, creationDate, CONVERT(uniqueidentifier, creatorID), CONVERT(uniqueidentifier, ownerID), CONVERT(uniqueidentifier, lastOwnerID), CONVERT(uniqueidentifier, groupID), nextPermissions, currentPermissions, basePermissions, everyonePermissions, groupPermissions, flags FROM dbo.primitems WITH (HOLDLOCK TABLOCKX)') | ||
687 | |||
688 | DROP TABLE dbo.primitems | ||
689 | |||
690 | EXECUTE sp_rename N'dbo.Tmp_primitems', N'primitems', 'OBJECT' | ||
691 | |||
692 | ALTER TABLE dbo.primitems ADD CONSTRAINT | ||
693 | PK__primitems__0A688BB1 PRIMARY KEY CLUSTERED | ||
694 | ( | ||
695 | itemID | ||
696 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
697 | |||
698 | CREATE NONCLUSTERED INDEX primitems_primid ON dbo.primitems | ||
699 | ( | ||
700 | primID | ||
701 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
702 | |||
703 | COMMIT | ||
704 | |||
705 | |||
706 | :VERSION 16 | ||
707 | |||
708 | |||
709 | BEGIN TRANSACTION | ||
710 | |||
711 | CREATE TABLE dbo.Tmp_terrain | ||
712 | ( | ||
713 | RegionUUID uniqueidentifier NULL, | ||
714 | Revision int NULL, | ||
715 | Heightfield image NULL | ||
716 | ) ON [PRIMARY] | ||
717 | TEXTIMAGE_ON [PRIMARY] | ||
718 | |||
719 | IF EXISTS(SELECT * FROM dbo.terrain) | ||
720 | EXEC('INSERT INTO dbo.Tmp_terrain (RegionUUID, Revision, Heightfield) | ||
721 | SELECT CONVERT(uniqueidentifier, RegionUUID), Revision, Heightfield FROM dbo.terrain WITH (HOLDLOCK TABLOCKX)') | ||
722 | |||
723 | DROP TABLE dbo.terrain | ||
724 | |||
725 | EXECUTE sp_rename N'dbo.Tmp_terrain', N'terrain', 'OBJECT' | ||
726 | |||
727 | COMMIT | ||
728 | |||
729 | |||
730 | :VERSION 17 | ||
731 | |||
732 | BEGIN TRANSACTION | ||
733 | |||
734 | CREATE TABLE dbo.Tmp_land | ||
735 | ( | ||
736 | UUID uniqueidentifier NOT NULL, | ||
737 | RegionUUID uniqueidentifier NULL, | ||
738 | LocalLandID int NULL, | ||
739 | Bitmap image NULL, | ||
740 | Name varchar(255) NULL, | ||
741 | Description varchar(255) NULL, | ||
742 | OwnerUUID uniqueidentifier NULL, | ||
743 | IsGroupOwned int NULL, | ||
744 | Area int NULL, | ||
745 | AuctionID int NULL, | ||
746 | Category int NULL, | ||
747 | ClaimDate int NULL, | ||
748 | ClaimPrice int NULL, | ||
749 | GroupUUID uniqueidentifier NULL, | ||
750 | SalePrice int NULL, | ||
751 | LandStatus int NULL, | ||
752 | LandFlags int NULL, | ||
753 | LandingType int NULL, | ||
754 | MediaAutoScale int NULL, | ||
755 | MediaTextureUUID uniqueidentifier NULL, | ||
756 | MediaURL varchar(255) NULL, | ||
757 | MusicURL varchar(255) NULL, | ||
758 | PassHours float(53) NULL, | ||
759 | PassPrice int NULL, | ||
760 | SnapshotUUID uniqueidentifier NULL, | ||
761 | UserLocationX float(53) NULL, | ||
762 | UserLocationY float(53) NULL, | ||
763 | UserLocationZ float(53) NULL, | ||
764 | UserLookAtX float(53) NULL, | ||
765 | UserLookAtY float(53) NULL, | ||
766 | UserLookAtZ float(53) NULL, | ||
767 | AuthbuyerID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'), | ||
768 | OtherCleanTime int NOT NULL DEFAULT ((0)), | ||
769 | Dwell int NOT NULL DEFAULT ((0)) | ||
770 | ) ON [PRIMARY] | ||
771 | TEXTIMAGE_ON [PRIMARY] | ||
772 | |||
773 | IF EXISTS(SELECT * FROM dbo.land) | ||
774 | EXEC('INSERT INTO dbo.Tmp_land (UUID, RegionUUID, LocalLandID, Bitmap, Name, Description, OwnerUUID, IsGroupOwned, Area, AuctionID, Category, ClaimDate, ClaimPrice, GroupUUID, SalePrice, LandStatus, LandFlags, LandingType, MediaAutoScale, MediaTextureUUID, MediaURL, MusicURL, PassHours, PassPrice, SnapshotUUID, UserLocationX, UserLocationY, UserLocationZ, UserLookAtX, UserLookAtY, UserLookAtZ, AuthbuyerID, OtherCleanTime, Dwell) | ||
775 | SELECT CONVERT(uniqueidentifier, UUID), CONVERT(uniqueidentifier, RegionUUID), LocalLandID, Bitmap, Name, Description, CONVERT(uniqueidentifier, OwnerUUID), IsGroupOwned, Area, AuctionID, Category, ClaimDate, ClaimPrice, CONVERT(uniqueidentifier, GroupUUID), SalePrice, LandStatus, LandFlags, LandingType, MediaAutoScale, CONVERT(uniqueidentifier, MediaTextureUUID), MediaURL, MusicURL, PassHours, PassPrice, CONVERT(uniqueidentifier, SnapshotUUID), UserLocationX, UserLocationY, UserLocationZ, UserLookAtX, UserLookAtY, UserLookAtZ, CONVERT(uniqueidentifier, AuthbuyerID), OtherCleanTime, Dwell FROM dbo.land WITH (HOLDLOCK TABLOCKX)') | ||
776 | |||
777 | DROP TABLE dbo.land | ||
778 | |||
779 | EXECUTE sp_rename N'dbo.Tmp_land', N'land', 'OBJECT' | ||
780 | |||
781 | ALTER TABLE dbo.land ADD CONSTRAINT | ||
782 | PK__land__65A475E71BFD2C07 PRIMARY KEY CLUSTERED | ||
783 | ( | ||
784 | UUID | ||
785 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
786 | |||
787 | COMMIT | ||
788 | |||
789 | |||
790 | |||
791 | :VERSION 18 | ||
792 | |||
793 | BEGIN TRANSACTION | ||
794 | |||
795 | CREATE TABLE dbo.Tmp_landaccesslist | ||
796 | ( | ||
797 | LandUUID uniqueidentifier NULL, | ||
798 | AccessUUID uniqueidentifier NULL, | ||
799 | Flags int NULL | ||
800 | ) ON [PRIMARY] | ||
801 | |||
802 | IF EXISTS(SELECT * FROM dbo.landaccesslist) | ||
803 | EXEC('INSERT INTO dbo.Tmp_landaccesslist (LandUUID, AccessUUID, Flags) | ||
804 | SELECT CONVERT(uniqueidentifier, LandUUID), CONVERT(uniqueidentifier, AccessUUID), Flags FROM dbo.landaccesslist WITH (HOLDLOCK TABLOCKX)') | ||
805 | |||
806 | DROP TABLE dbo.landaccesslist | ||
807 | |||
808 | EXECUTE sp_rename N'dbo.Tmp_landaccesslist', N'landaccesslist', 'OBJECT' | ||
809 | |||
810 | COMMIT | ||
811 | |||
812 | |||
813 | |||
814 | :VERSION 19 | ||
815 | |||
816 | BEGIN TRANSACTION | ||
817 | |||
818 | CREATE TABLE dbo.Tmp_regionban | ||
819 | ( | ||
820 | regionUUID uniqueidentifier NOT NULL, | ||
821 | bannedUUID uniqueidentifier NOT NULL, | ||
822 | bannedIp varchar(16) NOT NULL, | ||
823 | bannedIpHostMask varchar(16) NOT NULL | ||
824 | ) ON [PRIMARY] | ||
825 | |||
826 | IF EXISTS(SELECT * FROM dbo.regionban) | ||
827 | EXEC('INSERT INTO dbo.Tmp_regionban (regionUUID, bannedUUID, bannedIp, bannedIpHostMask) | ||
828 | SELECT CONVERT(uniqueidentifier, regionUUID), CONVERT(uniqueidentifier, bannedUUID), bannedIp, bannedIpHostMask FROM dbo.regionban WITH (HOLDLOCK TABLOCKX)') | ||
829 | |||
830 | DROP TABLE dbo.regionban | ||
831 | |||
832 | EXECUTE sp_rename N'dbo.Tmp_regionban', N'regionban', 'OBJECT' | ||
833 | |||
834 | COMMIT | ||
835 | |||
836 | |||
837 | :VERSION 20 | ||
838 | |||
839 | BEGIN TRANSACTION | ||
840 | |||
841 | CREATE TABLE dbo.Tmp_regionsettings | ||
842 | ( | ||
843 | regionUUID uniqueidentifier NOT NULL, | ||
844 | block_terraform bit NOT NULL, | ||
845 | block_fly bit NOT NULL, | ||
846 | allow_damage bit NOT NULL, | ||
847 | restrict_pushing bit NOT NULL, | ||
848 | allow_land_resell bit NOT NULL, | ||
849 | allow_land_join_divide bit NOT NULL, | ||
850 | block_show_in_search bit NOT NULL, | ||
851 | agent_limit int NOT NULL, | ||
852 | object_bonus float(53) NOT NULL, | ||
853 | maturity int NOT NULL, | ||
854 | disable_scripts bit NOT NULL, | ||
855 | disable_collisions bit NOT NULL, | ||
856 | disable_physics bit NOT NULL, | ||
857 | terrain_texture_1 uniqueidentifier NOT NULL, | ||
858 | terrain_texture_2 uniqueidentifier NOT NULL, | ||
859 | terrain_texture_3 uniqueidentifier NOT NULL, | ||
860 | terrain_texture_4 uniqueidentifier NOT NULL, | ||
861 | elevation_1_nw float(53) NOT NULL, | ||
862 | elevation_2_nw float(53) NOT NULL, | ||
863 | elevation_1_ne float(53) NOT NULL, | ||
864 | elevation_2_ne float(53) NOT NULL, | ||
865 | elevation_1_se float(53) NOT NULL, | ||
866 | elevation_2_se float(53) NOT NULL, | ||
867 | elevation_1_sw float(53) NOT NULL, | ||
868 | elevation_2_sw float(53) NOT NULL, | ||
869 | water_height float(53) NOT NULL, | ||
870 | terrain_raise_limit float(53) NOT NULL, | ||
871 | terrain_lower_limit float(53) NOT NULL, | ||
872 | use_estate_sun bit NOT NULL, | ||
873 | fixed_sun bit NOT NULL, | ||
874 | sun_position float(53) NOT NULL, | ||
875 | covenant uniqueidentifier NULL DEFAULT (NULL), | ||
876 | Sandbox bit NOT NULL, | ||
877 | sunvectorx float(53) NOT NULL DEFAULT ((0)), | ||
878 | sunvectory float(53) NOT NULL DEFAULT ((0)), | ||
879 | sunvectorz float(53) NOT NULL DEFAULT ((0)) | ||
880 | ) ON [PRIMARY] | ||
881 | |||
882 | IF EXISTS(SELECT * FROM dbo.regionsettings) | ||
883 | EXEC('INSERT INTO dbo.Tmp_regionsettings (regionUUID, block_terraform, block_fly, allow_damage, restrict_pushing, allow_land_resell, allow_land_join_divide, block_show_in_search, agent_limit, object_bonus, maturity, disable_scripts, disable_collisions, disable_physics, terrain_texture_1, terrain_texture_2, terrain_texture_3, terrain_texture_4, elevation_1_nw, elevation_2_nw, elevation_1_ne, elevation_2_ne, elevation_1_se, elevation_2_se, elevation_1_sw, elevation_2_sw, water_height, terrain_raise_limit, terrain_lower_limit, use_estate_sun, fixed_sun, sun_position, covenant, Sandbox, sunvectorx, sunvectory, sunvectorz) | ||
884 | SELECT CONVERT(uniqueidentifier, regionUUID), block_terraform, block_fly, allow_damage, restrict_pushing, allow_land_resell, allow_land_join_divide, block_show_in_search, agent_limit, object_bonus, maturity, disable_scripts, disable_collisions, disable_physics, CONVERT(uniqueidentifier, terrain_texture_1), CONVERT(uniqueidentifier, terrain_texture_2), CONVERT(uniqueidentifier, terrain_texture_3), CONVERT(uniqueidentifier, terrain_texture_4), elevation_1_nw, elevation_2_nw, elevation_1_ne, elevation_2_ne, elevation_1_se, elevation_2_se, elevation_1_sw, elevation_2_sw, water_height, terrain_raise_limit, terrain_lower_limit, use_estate_sun, fixed_sun, sun_position, CONVERT(uniqueidentifier, covenant), Sandbox, sunvectorx, sunvectory, sunvectorz FROM dbo.regionsettings WITH (HOLDLOCK TABLOCKX)') | ||
885 | |||
886 | DROP TABLE dbo.regionsettings | ||
887 | |||
888 | EXECUTE sp_rename N'dbo.Tmp_regionsettings', N'regionsettings', 'OBJECT' | ||
889 | |||
890 | ALTER TABLE dbo.regionsettings ADD CONSTRAINT | ||
891 | PK__regionse__5B35159D21B6055D PRIMARY KEY CLUSTERED | ||
892 | ( | ||
893 | regionUUID | ||
894 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
895 | |||
896 | COMMIT | ||
897 | |||
898 | |||
899 | :VERSION 21 | ||
900 | |||
901 | BEGIN TRANSACTION | ||
902 | |||
903 | ALTER TABLE prims ADD PassTouches bit not null default 0 | ||
904 | |||
905 | COMMIT | ||
906 | |||
907 | |||
908 | :VERSION 22 | ||
909 | |||
910 | BEGIN TRANSACTION | ||
911 | |||
912 | ALTER TABLE regionsettings ADD loaded_creation_date varchar(20) | ||
913 | ALTER TABLE regionsettings ADD loaded_creation_time varchar(20) | ||
914 | ALTER TABLE regionsettings ADD loaded_creation_id varchar(64) | ||
915 | |||
916 | COMMIT | ||
917 | |||
918 | :VERSION 23 | ||
919 | |||
920 | BEGIN TRANSACTION | ||
921 | |||
922 | ALTER TABLE regionsettings DROP COLUMN loaded_creation_date | ||
923 | ALTER TABLE regionsettings DROP COLUMN loaded_creation_time | ||
924 | ALTER TABLE regionsettings ADD loaded_creation_datetime int NOT NULL default 0 | ||
925 | |||
926 | COMMIT | ||
927 | |||
928 | |||
929 | |||
diff --git a/OpenSim/Data/MSSQL/Resources/UserAccount.migrations b/OpenSim/Data/MSSQL/Resources/UserAccount.migrations new file mode 100644 index 0000000..8534e23 --- /dev/null +++ b/OpenSim/Data/MSSQL/Resources/UserAccount.migrations | |||
@@ -0,0 +1,55 @@ | |||
1 | :VERSION 1 | ||
2 | |||
3 | CREATE TABLE [UserAccounts] ( | ||
4 | [PrincipalID] uniqueidentifier NOT NULL, | ||
5 | [ScopeID] uniqueidentifier NOT NULL, | ||
6 | [FirstName] [varchar](64) NOT NULL, | ||
7 | [LastName] [varchar](64) NOT NULL, | ||
8 | [Email] [varchar](64) NULL, | ||
9 | [ServiceURLs] [text] NULL, | ||
10 | [Created] [int] default NULL, | ||
11 | |||
12 | PRIMARY KEY CLUSTERED | ||
13 | ( | ||
14 | [PrincipalID] ASC | ||
15 | )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
16 | ) ON [PRIMARY] | ||
17 | |||
18 | |||
19 | :VERSION 2 | ||
20 | |||
21 | BEGIN TRANSACTION | ||
22 | |||
23 | INSERT INTO UserAccounts (PrincipalID, ScopeID, FirstName, LastName, Email, ServiceURLs, Created) SELECT [UUID] AS PrincipalID, '00000000-0000-0000-0000-000000000000' AS ScopeID, | ||
24 | username AS FirstName, | ||
25 | lastname AS LastName, | ||
26 | email as Email, ( | ||
27 | 'AssetServerURI=' + | ||
28 | userAssetURI + ' InventoryServerURI=' + userInventoryURI + ' GatewayURI= HomeURI=') AS ServiceURLs, | ||
29 | created as Created FROM users; | ||
30 | |||
31 | |||
32 | COMMIT | ||
33 | |||
34 | :VERSION 3 | ||
35 | |||
36 | BEGIN TRANSACTION | ||
37 | |||
38 | CREATE UNIQUE INDEX PrincipalID ON UserAccounts(PrincipalID); | ||
39 | CREATE INDEX Email ON UserAccounts(Email); | ||
40 | CREATE INDEX FirstName ON UserAccounts(FirstName); | ||
41 | CREATE INDEX LastName ON UserAccounts(LastName); | ||
42 | CREATE INDEX Name ON UserAccounts(FirstName,LastName); | ||
43 | |||
44 | COMMIT | ||
45 | |||
46 | :VERSION 4 | ||
47 | |||
48 | BEGIN TRANSACTION | ||
49 | |||
50 | ALTER TABLE UserAccounts ADD UserLevel integer NOT NULL DEFAULT 0; | ||
51 | ALTER TABLE UserAccounts ADD UserFlags integer NOT NULL DEFAULT 0; | ||
52 | ALTER TABLE UserAccounts ADD UserTitle varchar(64) NOT NULL DEFAULT ''; | ||
53 | |||
54 | COMMIT | ||
55 | |||
diff --git a/OpenSim/Data/MSSQL/Resources/UserStore.migrations b/OpenSim/Data/MSSQL/Resources/UserStore.migrations new file mode 100644 index 0000000..050c544 --- /dev/null +++ b/OpenSim/Data/MSSQL/Resources/UserStore.migrations | |||
@@ -0,0 +1,421 @@ | |||
1 | :VERSION 1 | ||
2 | |||
3 | CREATE TABLE [users] ( | ||
4 | [UUID] [varchar](36) NOT NULL default '', | ||
5 | [username] [varchar](32) NOT NULL, | ||
6 | [lastname] [varchar](32) NOT NULL, | ||
7 | [passwordHash] [varchar](32) NOT NULL, | ||
8 | [passwordSalt] [varchar](32) NOT NULL, | ||
9 | [homeRegion] [bigint] default NULL, | ||
10 | [homeLocationX] [float] default NULL, | ||
11 | [homeLocationY] [float] default NULL, | ||
12 | [homeLocationZ] [float] default NULL, | ||
13 | [homeLookAtX] [float] default NULL, | ||
14 | [homeLookAtY] [float] default NULL, | ||
15 | [homeLookAtZ] [float] default NULL, | ||
16 | [created] [int] NOT NULL, | ||
17 | [lastLogin] [int] NOT NULL, | ||
18 | [userInventoryURI] [varchar](255) default NULL, | ||
19 | [userAssetURI] [varchar](255) default NULL, | ||
20 | [profileCanDoMask] [int] default NULL, | ||
21 | [profileWantDoMask] [int] default NULL, | ||
22 | [profileAboutText] [ntext], | ||
23 | [profileFirstText] [ntext], | ||
24 | [profileImage] [varchar](36) default NULL, | ||
25 | [profileFirstImage] [varchar](36) default NULL, | ||
26 | [webLoginKey] [varchar](36) default NULL, | ||
27 | PRIMARY KEY CLUSTERED | ||
28 | ( | ||
29 | [UUID] ASC | ||
30 | )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
31 | ) ON [PRIMARY] | ||
32 | |||
33 | |||
34 | CREATE NONCLUSTERED INDEX [usernames] ON [users] | ||
35 | ( | ||
36 | [username] ASC, | ||
37 | [lastname] ASC | ||
38 | )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
39 | |||
40 | |||
41 | CREATE TABLE [agents] ( | ||
42 | [UUID] [varchar](36) NOT NULL, | ||
43 | [sessionID] [varchar](36) NOT NULL, | ||
44 | [secureSessionID] [varchar](36) NOT NULL, | ||
45 | [agentIP] [varchar](16) NOT NULL, | ||
46 | [agentPort] [int] NOT NULL, | ||
47 | [agentOnline] [tinyint] NOT NULL, | ||
48 | [loginTime] [int] NOT NULL, | ||
49 | [logoutTime] [int] NOT NULL, | ||
50 | [currentRegion] [varchar](36) NOT NULL, | ||
51 | [currentHandle] [bigint] NOT NULL, | ||
52 | [currentPos] [varchar](64) NOT NULL, | ||
53 | PRIMARY KEY CLUSTERED | ||
54 | ( | ||
55 | [UUID] ASC | ||
56 | )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
57 | ) ON [PRIMARY] | ||
58 | |||
59 | |||
60 | CREATE NONCLUSTERED INDEX [session] ON [agents] | ||
61 | ( | ||
62 | [sessionID] ASC | ||
63 | )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
64 | |||
65 | CREATE NONCLUSTERED INDEX [ssession] ON [agents] | ||
66 | ( | ||
67 | [secureSessionID] ASC | ||
68 | )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
69 | |||
70 | |||
71 | CREATE TABLE [dbo].[userfriends]( | ||
72 | [ownerID] [varchar](50) COLLATE Latin1_General_CI_AS NOT NULL, | ||
73 | [friendID] [varchar](50) COLLATE Latin1_General_CI_AS NOT NULL, | ||
74 | [friendPerms] [nvarchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, | ||
75 | [datetimestamp] [nvarchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL | ||
76 | ) ON [PRIMARY] | ||
77 | |||
78 | CREATE TABLE [avatarappearance] ( | ||
79 | [Owner] [varchar](36) NOT NULL, | ||
80 | [Serial] int NOT NULL, | ||
81 | [Visual_Params] [image] NOT NULL, | ||
82 | [Texture] [image] NOT NULL, | ||
83 | [Avatar_Height] float NOT NULL, | ||
84 | [Body_Item] [varchar](36) NOT NULL, | ||
85 | [Body_Asset] [varchar](36) NOT NULL, | ||
86 | [Skin_Item] [varchar](36) NOT NULL, | ||
87 | [Skin_Asset] [varchar](36) NOT NULL, | ||
88 | [Hair_Item] [varchar](36) NOT NULL, | ||
89 | [Hair_Asset] [varchar](36) NOT NULL, | ||
90 | [Eyes_Item] [varchar](36) NOT NULL, | ||
91 | [Eyes_Asset] [varchar](36) NOT NULL, | ||
92 | [Shirt_Item] [varchar](36) NOT NULL, | ||
93 | [Shirt_Asset] [varchar](36) NOT NULL, | ||
94 | [Pants_Item] [varchar](36) NOT NULL, | ||
95 | [Pants_Asset] [varchar](36) NOT NULL, | ||
96 | [Shoes_Item] [varchar](36) NOT NULL, | ||
97 | [Shoes_Asset] [varchar](36) NOT NULL, | ||
98 | [Socks_Item] [varchar](36) NOT NULL, | ||
99 | [Socks_Asset] [varchar](36) NOT NULL, | ||
100 | [Jacket_Item] [varchar](36) NOT NULL, | ||
101 | [Jacket_Asset] [varchar](36) NOT NULL, | ||
102 | [Gloves_Item] [varchar](36) NOT NULL, | ||
103 | [Gloves_Asset] [varchar](36) NOT NULL, | ||
104 | [Undershirt_Item] [varchar](36) NOT NULL, | ||
105 | [Undershirt_Asset] [varchar](36) NOT NULL, | ||
106 | [Underpants_Item] [varchar](36) NOT NULL, | ||
107 | [Underpants_Asset] [varchar](36) NOT NULL, | ||
108 | [Skirt_Item] [varchar](36) NOT NULL, | ||
109 | [Skirt_Asset] [varchar](36) NOT NULL, | ||
110 | |||
111 | PRIMARY KEY CLUSTERED ( | ||
112 | [Owner] | ||
113 | ) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
114 | ) ON [PRIMARY] | ||
115 | |||
116 | :VERSION 2 | ||
117 | |||
118 | BEGIN TRANSACTION | ||
119 | |||
120 | ALTER TABLE users ADD homeRegionID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000'; | ||
121 | ALTER TABLE users ADD userFlags int NOT NULL default 0; | ||
122 | ALTER TABLE users ADD godLevel int NOT NULL default 0; | ||
123 | ALTER TABLE users ADD customType varchar(32) not null default ''; | ||
124 | ALTER TABLE users ADD partner varchar(36) not null default '00000000-0000-0000-0000-000000000000'; | ||
125 | |||
126 | COMMIT | ||
127 | |||
128 | |||
129 | :VERSION 3 | ||
130 | |||
131 | BEGIN TRANSACTION | ||
132 | |||
133 | CREATE TABLE [avatarattachments] ( | ||
134 | [UUID] varchar(36) NOT NULL | ||
135 | , [attachpoint] int NOT NULL | ||
136 | , [item] varchar(36) NOT NULL | ||
137 | , [asset] varchar(36) NOT NULL) | ||
138 | |||
139 | CREATE NONCLUSTERED INDEX IX_avatarattachments ON dbo.avatarattachments | ||
140 | ( | ||
141 | UUID | ||
142 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
143 | |||
144 | |||
145 | COMMIT | ||
146 | |||
147 | |||
148 | :VERSION 4 | ||
149 | |||
150 | BEGIN TRANSACTION | ||
151 | |||
152 | CREATE TABLE Tmp_userfriends | ||
153 | ( | ||
154 | ownerID varchar(36) NOT NULL, | ||
155 | friendID varchar(36) NOT NULL, | ||
156 | friendPerms int NOT NULL, | ||
157 | datetimestamp int NOT NULL | ||
158 | ) ON [PRIMARY] | ||
159 | |||
160 | IF EXISTS(SELECT * FROM userfriends) | ||
161 | EXEC('INSERT INTO dbo.Tmp_userfriends (ownerID, friendID, friendPerms, datetimestamp) | ||
162 | SELECT CONVERT(varchar(36), ownerID), CONVERT(varchar(36), friendID), CONVERT(int, friendPerms), CONVERT(int, datetimestamp) FROM dbo.userfriends WITH (HOLDLOCK TABLOCKX)') | ||
163 | |||
164 | DROP TABLE dbo.userfriends | ||
165 | |||
166 | EXECUTE sp_rename N'Tmp_userfriends', N'userfriends', 'OBJECT' | ||
167 | |||
168 | CREATE NONCLUSTERED INDEX IX_userfriends_ownerID ON userfriends | ||
169 | ( | ||
170 | ownerID | ||
171 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
172 | |||
173 | CREATE NONCLUSTERED INDEX IX_userfriends_friendID ON userfriends | ||
174 | ( | ||
175 | friendID | ||
176 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
177 | |||
178 | COMMIT | ||
179 | |||
180 | |||
181 | :VERSION 5 | ||
182 | |||
183 | BEGIN TRANSACTION | ||
184 | |||
185 | ALTER TABLE users add email varchar(250); | ||
186 | |||
187 | COMMIT | ||
188 | |||
189 | |||
190 | :VERSION 6 | ||
191 | |||
192 | BEGIN TRANSACTION | ||
193 | |||
194 | CREATE TABLE dbo.Tmp_users | ||
195 | ( | ||
196 | UUID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'), | ||
197 | username varchar(32) NOT NULL, | ||
198 | lastname varchar(32) NOT NULL, | ||
199 | passwordHash varchar(32) NOT NULL, | ||
200 | passwordSalt varchar(32) NOT NULL, | ||
201 | homeRegion bigint NULL DEFAULT (NULL), | ||
202 | homeLocationX float(53) NULL DEFAULT (NULL), | ||
203 | homeLocationY float(53) NULL DEFAULT (NULL), | ||
204 | homeLocationZ float(53) NULL DEFAULT (NULL), | ||
205 | homeLookAtX float(53) NULL DEFAULT (NULL), | ||
206 | homeLookAtY float(53) NULL DEFAULT (NULL), | ||
207 | homeLookAtZ float(53) NULL DEFAULT (NULL), | ||
208 | created int NOT NULL, | ||
209 | lastLogin int NOT NULL, | ||
210 | userInventoryURI varchar(255) NULL DEFAULT (NULL), | ||
211 | userAssetURI varchar(255) NULL DEFAULT (NULL), | ||
212 | profileCanDoMask int NULL DEFAULT (NULL), | ||
213 | profileWantDoMask int NULL DEFAULT (NULL), | ||
214 | profileAboutText ntext NULL, | ||
215 | profileFirstText ntext NULL, | ||
216 | profileImage uniqueidentifier NULL DEFAULT (NULL), | ||
217 | profileFirstImage uniqueidentifier NULL DEFAULT (NULL), | ||
218 | webLoginKey uniqueidentifier NULL DEFAULT (NULL), | ||
219 | homeRegionID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'), | ||
220 | userFlags int NOT NULL DEFAULT ((0)), | ||
221 | godLevel int NOT NULL DEFAULT ((0)), | ||
222 | customType varchar(32) NOT NULL DEFAULT (''), | ||
223 | partner uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'), | ||
224 | email varchar(250) NULL | ||
225 | ) ON [PRIMARY] | ||
226 | TEXTIMAGE_ON [PRIMARY] | ||
227 | |||
228 | IF EXISTS(SELECT * FROM dbo.users) | ||
229 | EXEC('INSERT INTO dbo.Tmp_users (UUID, username, lastname, passwordHash, passwordSalt, homeRegion, homeLocationX, homeLocationY, homeLocationZ, homeLookAtX, homeLookAtY, homeLookAtZ, created, lastLogin, userInventoryURI, userAssetURI, profileCanDoMask, profileWantDoMask, profileAboutText, profileFirstText, profileImage, profileFirstImage, webLoginKey, homeRegionID, userFlags, godLevel, customType, partner, email) | ||
230 | SELECT CONVERT(uniqueidentifier, UUID), username, lastname, passwordHash, passwordSalt, homeRegion, homeLocationX, homeLocationY, homeLocationZ, homeLookAtX, homeLookAtY, homeLookAtZ, created, lastLogin, userInventoryURI, userAssetURI, profileCanDoMask, profileWantDoMask, profileAboutText, profileFirstText, CONVERT(uniqueidentifier, profileImage), CONVERT(uniqueidentifier, profileFirstImage), CONVERT(uniqueidentifier, webLoginKey), CONVERT(uniqueidentifier, homeRegionID), userFlags, godLevel, customType, CONVERT(uniqueidentifier, partner), email FROM dbo.users WITH (HOLDLOCK TABLOCKX)') | ||
231 | |||
232 | DROP TABLE dbo.users | ||
233 | |||
234 | EXECUTE sp_rename N'dbo.Tmp_users', N'users', 'OBJECT' | ||
235 | |||
236 | ALTER TABLE dbo.users ADD CONSTRAINT | ||
237 | PK__users__65A475E737A5467C PRIMARY KEY CLUSTERED | ||
238 | ( | ||
239 | UUID | ||
240 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
241 | |||
242 | CREATE NONCLUSTERED INDEX usernames ON dbo.users | ||
243 | ( | ||
244 | username, | ||
245 | lastname | ||
246 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
247 | |||
248 | COMMIT | ||
249 | |||
250 | |||
251 | :VERSION 7 | ||
252 | |||
253 | BEGIN TRANSACTION | ||
254 | |||
255 | CREATE TABLE dbo.Tmp_agents | ||
256 | ( | ||
257 | UUID uniqueidentifier NOT NULL, | ||
258 | sessionID uniqueidentifier NOT NULL, | ||
259 | secureSessionID uniqueidentifier NOT NULL, | ||
260 | agentIP varchar(16) NOT NULL, | ||
261 | agentPort int NOT NULL, | ||
262 | agentOnline tinyint NOT NULL, | ||
263 | loginTime int NOT NULL, | ||
264 | logoutTime int NOT NULL, | ||
265 | currentRegion uniqueidentifier NOT NULL, | ||
266 | currentHandle bigint NOT NULL, | ||
267 | currentPos varchar(64) NOT NULL | ||
268 | ) ON [PRIMARY] | ||
269 | |||
270 | IF EXISTS(SELECT * FROM dbo.agents) | ||
271 | EXEC('INSERT INTO dbo.Tmp_agents (UUID, sessionID, secureSessionID, agentIP, agentPort, agentOnline, loginTime, logoutTime, currentRegion, currentHandle, currentPos) | ||
272 | SELECT CONVERT(uniqueidentifier, UUID), CONVERT(uniqueidentifier, sessionID), CONVERT(uniqueidentifier, secureSessionID), agentIP, agentPort, agentOnline, loginTime, logoutTime, CONVERT(uniqueidentifier, currentRegion), currentHandle, currentPos FROM dbo.agents WITH (HOLDLOCK TABLOCKX)') | ||
273 | |||
274 | DROP TABLE dbo.agents | ||
275 | |||
276 | EXECUTE sp_rename N'dbo.Tmp_agents', N'agents', 'OBJECT' | ||
277 | |||
278 | ALTER TABLE dbo.agents ADD CONSTRAINT | ||
279 | PK__agents__65A475E749C3F6B7 PRIMARY KEY CLUSTERED | ||
280 | ( | ||
281 | UUID | ||
282 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
283 | |||
284 | CREATE NONCLUSTERED INDEX session ON dbo.agents | ||
285 | ( | ||
286 | sessionID | ||
287 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
288 | |||
289 | CREATE NONCLUSTERED INDEX ssession ON dbo.agents | ||
290 | ( | ||
291 | secureSessionID | ||
292 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
293 | |||
294 | COMMIT | ||
295 | |||
296 | |||
297 | :VERSION 8 | ||
298 | |||
299 | BEGIN TRANSACTION | ||
300 | |||
301 | CREATE TABLE dbo.Tmp_userfriends | ||
302 | ( | ||
303 | ownerID uniqueidentifier NOT NULL, | ||
304 | friendID uniqueidentifier NOT NULL, | ||
305 | friendPerms int NOT NULL, | ||
306 | datetimestamp int NOT NULL | ||
307 | ) ON [PRIMARY] | ||
308 | |||
309 | IF EXISTS(SELECT * FROM dbo.userfriends) | ||
310 | EXEC('INSERT INTO dbo.Tmp_userfriends (ownerID, friendID, friendPerms, datetimestamp) | ||
311 | SELECT CONVERT(uniqueidentifier, ownerID), CONVERT(uniqueidentifier, friendID), friendPerms, datetimestamp FROM dbo.userfriends WITH (HOLDLOCK TABLOCKX)') | ||
312 | |||
313 | DROP TABLE dbo.userfriends | ||
314 | |||
315 | EXECUTE sp_rename N'dbo.Tmp_userfriends', N'userfriends', 'OBJECT' | ||
316 | |||
317 | CREATE NONCLUSTERED INDEX IX_userfriends_ownerID ON dbo.userfriends | ||
318 | ( | ||
319 | ownerID | ||
320 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
321 | |||
322 | CREATE NONCLUSTERED INDEX IX_userfriends_friendID ON dbo.userfriends | ||
323 | ( | ||
324 | friendID | ||
325 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
326 | |||
327 | COMMIT | ||
328 | |||
329 | |||
330 | :VERSION 9 | ||
331 | |||
332 | BEGIN TRANSACTION | ||
333 | |||
334 | CREATE TABLE dbo.Tmp_avatarappearance | ||
335 | ( | ||
336 | Owner uniqueidentifier NOT NULL, | ||
337 | Serial int NOT NULL, | ||
338 | Visual_Params image NOT NULL, | ||
339 | Texture image NOT NULL, | ||
340 | Avatar_Height float(53) NOT NULL, | ||
341 | Body_Item uniqueidentifier NOT NULL, | ||
342 | Body_Asset uniqueidentifier NOT NULL, | ||
343 | Skin_Item uniqueidentifier NOT NULL, | ||
344 | Skin_Asset uniqueidentifier NOT NULL, | ||
345 | Hair_Item uniqueidentifier NOT NULL, | ||
346 | Hair_Asset uniqueidentifier NOT NULL, | ||
347 | Eyes_Item uniqueidentifier NOT NULL, | ||
348 | Eyes_Asset uniqueidentifier NOT NULL, | ||
349 | Shirt_Item uniqueidentifier NOT NULL, | ||
350 | Shirt_Asset uniqueidentifier NOT NULL, | ||
351 | Pants_Item uniqueidentifier NOT NULL, | ||
352 | Pants_Asset uniqueidentifier NOT NULL, | ||
353 | Shoes_Item uniqueidentifier NOT NULL, | ||
354 | Shoes_Asset uniqueidentifier NOT NULL, | ||
355 | Socks_Item uniqueidentifier NOT NULL, | ||
356 | Socks_Asset uniqueidentifier NOT NULL, | ||
357 | Jacket_Item uniqueidentifier NOT NULL, | ||
358 | Jacket_Asset uniqueidentifier NOT NULL, | ||
359 | Gloves_Item uniqueidentifier NOT NULL, | ||
360 | Gloves_Asset uniqueidentifier NOT NULL, | ||
361 | Undershirt_Item uniqueidentifier NOT NULL, | ||
362 | Undershirt_Asset uniqueidentifier NOT NULL, | ||
363 | Underpants_Item uniqueidentifier NOT NULL, | ||
364 | Underpants_Asset uniqueidentifier NOT NULL, | ||
365 | Skirt_Item uniqueidentifier NOT NULL, | ||
366 | Skirt_Asset uniqueidentifier NOT NULL | ||
367 | ) ON [PRIMARY] | ||
368 | TEXTIMAGE_ON [PRIMARY] | ||
369 | |||
370 | IF EXISTS(SELECT * FROM dbo.avatarappearance) | ||
371 | EXEC('INSERT INTO dbo.Tmp_avatarappearance (Owner, Serial, Visual_Params, Texture, Avatar_Height, Body_Item, Body_Asset, Skin_Item, Skin_Asset, Hair_Item, Hair_Asset, Eyes_Item, Eyes_Asset, Shirt_Item, Shirt_Asset, Pants_Item, Pants_Asset, Shoes_Item, Shoes_Asset, Socks_Item, Socks_Asset, Jacket_Item, Jacket_Asset, Gloves_Item, Gloves_Asset, Undershirt_Item, Undershirt_Asset, Underpants_Item, Underpants_Asset, Skirt_Item, Skirt_Asset) | ||
372 | SELECT CONVERT(uniqueidentifier, Owner), Serial, Visual_Params, Texture, Avatar_Height, CONVERT(uniqueidentifier, Body_Item), CONVERT(uniqueidentifier, Body_Asset), CONVERT(uniqueidentifier, Skin_Item), CONVERT(uniqueidentifier, Skin_Asset), CONVERT(uniqueidentifier, Hair_Item), CONVERT(uniqueidentifier, Hair_Asset), CONVERT(uniqueidentifier, Eyes_Item), CONVERT(uniqueidentifier, Eyes_Asset), CONVERT(uniqueidentifier, Shirt_Item), CONVERT(uniqueidentifier, Shirt_Asset), CONVERT(uniqueidentifier, Pants_Item), CONVERT(uniqueidentifier, Pants_Asset), CONVERT(uniqueidentifier, Shoes_Item), CONVERT(uniqueidentifier, Shoes_Asset), CONVERT(uniqueidentifier, Socks_Item), CONVERT(uniqueidentifier, Socks_Asset), CONVERT(uniqueidentifier, Jacket_Item), CONVERT(uniqueidentifier, Jacket_Asset), CONVERT(uniqueidentifier, Gloves_Item), CONVERT(uniqueidentifier, Gloves_Asset), CONVERT(uniqueidentifier, Undershirt_Item), CONVERT(uniqueidentifier, Undershirt_Asset), CONVERT(uniqueidentifier, Underpants_Item), CONVERT(uniqueidentifier, Underpants_Asset), CONVERT(uniqueidentifier, Skirt_Item), CONVERT(uniqueidentifier, Skirt_Asset) FROM dbo.avatarappearance WITH (HOLDLOCK TABLOCKX)') | ||
373 | |||
374 | DROP TABLE dbo.avatarappearance | ||
375 | |||
376 | EXECUTE sp_rename N'dbo.Tmp_avatarappearance', N'avatarappearance', 'OBJECT' | ||
377 | |||
378 | ALTER TABLE dbo.avatarappearance ADD CONSTRAINT | ||
379 | PK__avatarap__7DD115CC4E88ABD4 PRIMARY KEY CLUSTERED | ||
380 | ( | ||
381 | Owner | ||
382 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
383 | |||
384 | COMMIT | ||
385 | |||
386 | |||
387 | :VERSION 10 | ||
388 | |||
389 | BEGIN TRANSACTION | ||
390 | |||
391 | CREATE TABLE dbo.Tmp_avatarattachments | ||
392 | ( | ||
393 | UUID uniqueidentifier NOT NULL, | ||
394 | attachpoint int NOT NULL, | ||
395 | item uniqueidentifier NOT NULL, | ||
396 | asset uniqueidentifier NOT NULL | ||
397 | ) ON [PRIMARY] | ||
398 | |||
399 | IF EXISTS(SELECT * FROM dbo.avatarattachments) | ||
400 | EXEC('INSERT INTO dbo.Tmp_avatarattachments (UUID, attachpoint, item, asset) | ||
401 | SELECT CONVERT(uniqueidentifier, UUID), attachpoint, CONVERT(uniqueidentifier, item), CONVERT(uniqueidentifier, asset) FROM dbo.avatarattachments WITH (HOLDLOCK TABLOCKX)') | ||
402 | |||
403 | DROP TABLE dbo.avatarattachments | ||
404 | |||
405 | EXECUTE sp_rename N'dbo.Tmp_avatarattachments', N'avatarattachments', 'OBJECT' | ||
406 | |||
407 | CREATE NONCLUSTERED INDEX IX_avatarattachments ON dbo.avatarattachments | ||
408 | ( | ||
409 | UUID | ||
410 | ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | ||
411 | |||
412 | COMMIT | ||
413 | |||
414 | |||
415 | :VERSION 11 | ||
416 | |||
417 | BEGIN TRANSACTION | ||
418 | |||
419 | ALTER TABLE users ADD scopeID uniqueidentifier not null default '00000000-0000-0000-0000-000000000000' | ||
420 | |||
421 | COMMIT | ||
diff --git a/OpenSim/Data/Migration.cs b/OpenSim/Data/Migration.cs index 06defe4..4f113a2 100644 --- a/OpenSim/Data/Migration.cs +++ b/OpenSim/Data/Migration.cs | |||
@@ -72,59 +72,116 @@ namespace OpenSim.Data | |||
72 | { | 72 | { |
73 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 73 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
74 | 74 | ||
75 | private string _type; | 75 | protected string _type; |
76 | private DbConnection _conn; | 76 | protected DbConnection _conn; |
77 | // private string _subtype; | 77 | protected Assembly _assem; |
78 | private Assembly _assem; | ||
79 | private Regex _match; | ||
80 | 78 | ||
81 | private static readonly string _migrations_create = "create table migrations(name varchar(100), version int)"; | 79 | private Regex _match_old; |
82 | // private static readonly string _migrations_init = "insert into migrations values('migrations', 1)"; | 80 | private Regex _match_new; |
83 | // private static readonly string _migrations_find = "select version from migrations where name='migrations'"; | ||
84 | 81 | ||
82 | /// <summary>Have the parameterless constructor just so we can specify it as a generic parameter with the new() constraint. | ||
83 | /// Currently this is only used in the tests. A Migration instance created this way must be then | ||
84 | /// initialized with Initialize(). Regular creation should be through the parameterized constructors. | ||
85 | /// </summary> | ||
86 | public Migration() | ||
87 | { | ||
88 | } | ||
85 | 89 | ||
86 | public Migration(DbConnection conn, Assembly assem, string type) | 90 | public Migration(DbConnection conn, Assembly assem, string subtype, string type) |
87 | { | 91 | { |
88 | _type = type; | 92 | Initialize(conn, assem, type, subtype); |
89 | _conn = conn; | ||
90 | _assem = assem; | ||
91 | _match = new Regex(@"\.(\d\d\d)_" + _type + @"\.sql"); | ||
92 | Initialize(); | ||
93 | } | 93 | } |
94 | 94 | ||
95 | public Migration(DbConnection conn, Assembly assem, string subtype, string type) | 95 | public Migration(DbConnection conn, Assembly assem, string type) |
96 | { | ||
97 | Initialize(conn, assem, type, ""); | ||
98 | } | ||
99 | |||
100 | /// <summary>Must be called after creating with the parameterless constructor. | ||
101 | /// NOTE that the Migration class now doesn't access database in any way during initialization. | ||
102 | /// Specifically, it won't check if the [migrations] table exists. Such checks are done later: | ||
103 | /// automatically on Update(), or you can explicitly call InitMigrationsTable(). | ||
104 | /// </summary> | ||
105 | /// <param name="conn"></param> | ||
106 | /// <param name="assem"></param> | ||
107 | /// <param name="subtype"></param> | ||
108 | /// <param name="type"></param> | ||
109 | public void Initialize (DbConnection conn, Assembly assem, string type, string subtype) | ||
96 | { | 110 | { |
97 | _type = type; | 111 | _type = type; |
98 | _conn = conn; | 112 | _conn = conn; |
99 | _assem = assem; | 113 | _assem = assem; |
100 | _match = new Regex(subtype + @"\.(\d\d\d)_" + _type + @"\.sql"); | 114 | _match_old = new Regex(subtype + @"\.(\d\d\d)_" + _type + @"\.sql"); |
101 | Initialize(); | 115 | string s = String.IsNullOrEmpty(subtype) ? _type : _type + @"\." + subtype; |
116 | _match_new = new Regex(@"\." + s + @"\.migrations(?:\.(?<ver>\d+)$|.*)"); | ||
102 | } | 117 | } |
103 | 118 | ||
104 | private void Initialize() | 119 | public void InitMigrationsTable() |
105 | { | 120 | { |
106 | // clever, eh, we figure out which migrations version we are | 121 | // NOTE: normally when the [migrations] table is created, the version record for 'migrations' is |
107 | int migration_version = FindVersion(_conn, "migrations"); | 122 | // added immediately. However, if for some reason the table is there but empty, we want to handle that as well. |
108 | 123 | int ver = FindVersion(_conn, "migrations"); | |
109 | if (migration_version > 0) | 124 | if (ver <= 0) // -1 = no table, 0 = no version record |
110 | return; | 125 | { |
126 | if( ver < 0 ) | ||
127 | ExecuteScript("create table migrations(name varchar(100), version int)"); | ||
128 | InsertVersion("migrations", 1); | ||
129 | } | ||
130 | } | ||
111 | 131 | ||
112 | // If not, create the migration tables | 132 | /// <summary>Executes a script, possibly in a database-specific way. |
113 | using (DbCommand cmd = _conn.CreateCommand()) | 133 | /// It can be redefined for a specific DBMS, if necessary. Specifically, |
134 | /// to avoid problems with proc definitions in MySQL, we must use | ||
135 | /// MySqlScript class instead of just DbCommand. We don't want to bring | ||
136 | /// MySQL references here, so instead define a MySQLMigration class | ||
137 | /// in OpenSim.Data.MySQL | ||
138 | /// </summary> | ||
139 | /// <param name="conn"></param> | ||
140 | /// <param name="script">Array of strings, one-per-batch (often just one)</param> | ||
141 | protected virtual void ExecuteScript(DbConnection conn, string[] script) | ||
142 | { | ||
143 | using (DbCommand cmd = conn.CreateCommand()) | ||
114 | { | 144 | { |
115 | cmd.CommandText = _migrations_create; | 145 | cmd.CommandTimeout = 0; |
116 | cmd.ExecuteNonQuery(); | 146 | foreach (string sql in script) |
147 | { | ||
148 | cmd.CommandText = sql; | ||
149 | try | ||
150 | { | ||
151 | cmd.ExecuteNonQuery(); | ||
152 | } | ||
153 | catch(Exception e) | ||
154 | { | ||
155 | throw new Exception(e.Message + " in SQL: " + sql); | ||
156 | } | ||
157 | } | ||
117 | } | 158 | } |
159 | } | ||
118 | 160 | ||
119 | InsertVersion("migrations", 1); | 161 | protected void ExecuteScript(DbConnection conn, string sql) |
162 | { | ||
163 | ExecuteScript(conn, new string[]{sql}); | ||
164 | } | ||
165 | |||
166 | protected void ExecuteScript(string sql) | ||
167 | { | ||
168 | ExecuteScript(_conn, sql); | ||
169 | } | ||
170 | |||
171 | protected void ExecuteScript(string[] script) | ||
172 | { | ||
173 | ExecuteScript(_conn, script); | ||
120 | } | 174 | } |
121 | 175 | ||
176 | |||
177 | |||
122 | public void Update() | 178 | public void Update() |
123 | { | 179 | { |
124 | int version = 0; | 180 | InitMigrationsTable(); |
125 | version = FindVersion(_conn, _type); | ||
126 | 181 | ||
127 | SortedList<int, string> migrations = GetMigrationsAfter(version); | 182 | int version = FindVersion(_conn, _type); |
183 | |||
184 | SortedList<int, string[]> migrations = GetMigrationsAfter(version); | ||
128 | if (migrations.Count < 1) | 185 | if (migrations.Count < 1) |
129 | return; | 186 | return; |
130 | 187 | ||
@@ -132,57 +189,40 @@ namespace OpenSim.Data | |||
132 | m_log.InfoFormat("[MIGRATIONS] Upgrading {0} to latest revision {1}.", _type, migrations.Keys[migrations.Count - 1]); | 189 | m_log.InfoFormat("[MIGRATIONS] Upgrading {0} to latest revision {1}.", _type, migrations.Keys[migrations.Count - 1]); |
133 | m_log.Info("[MIGRATIONS] NOTE: this may take a while, don't interupt this process!"); | 190 | m_log.Info("[MIGRATIONS] NOTE: this may take a while, don't interupt this process!"); |
134 | 191 | ||
135 | using (DbCommand cmd = _conn.CreateCommand()) | 192 | foreach (KeyValuePair<int, string[]> kvp in migrations) |
136 | { | 193 | { |
137 | foreach (KeyValuePair<int, string> kvp in migrations) | 194 | int newversion = kvp.Key; |
195 | // we need to up the command timeout to infinite as we might be doing long migrations. | ||
196 | |||
197 | /* [AlexRa 01-May-10]: We can't always just run any SQL in a single batch (= ExecuteNonQuery()). Things like | ||
198 | * stored proc definitions might have to be sent to the server each in a separate batch. | ||
199 | * This is certainly so for MS SQL; not sure how the MySQL connector sorts out the mess | ||
200 | * with 'delimiter @@'/'delimiter ;' around procs. So each "script" this code executes now is not | ||
201 | * a single string, but an array of strings, executed separately. | ||
202 | */ | ||
203 | try | ||
138 | { | 204 | { |
139 | int newversion = kvp.Key; | 205 | ExecuteScript(kvp.Value); |
140 | cmd.CommandText = kvp.Value; | 206 | } |
141 | // we need to up the command timeout to infinite as we might be doing long migrations. | 207 | catch (Exception e) |
142 | cmd.CommandTimeout = 0; | 208 | { |
143 | try | 209 | m_log.DebugFormat("[MIGRATIONS] Cmd was {0}", e.Message.Replace("\n", " ")); |
144 | { | 210 | m_log.Debug("[MIGRATIONS]: An error has occurred in the migration. This may mean you could see errors trying to run OpenSim. If you see database related errors, you will need to fix the issue manually. Continuing."); |
145 | cmd.ExecuteNonQuery(); | 211 | ExecuteScript("ROLLBACK;"); |
146 | } | 212 | } |
147 | catch (Exception e) | ||
148 | { | ||
149 | m_log.DebugFormat("[MIGRATIONS] Cmd was {0}", cmd.CommandText); | ||
150 | m_log.DebugFormat("[MIGRATIONS]: An error has occurred in the migration {0}.\n This may mean you could see errors trying to run OpenSim. If you see database related errors, you will need to fix the issue manually. Continuing.", e.Message); | ||
151 | cmd.CommandText = "ROLLBACK;"; | ||
152 | cmd.ExecuteNonQuery(); | ||
153 | } | ||
154 | 213 | ||
155 | if (version == 0) | 214 | if (version == 0) |
156 | { | 215 | { |
157 | InsertVersion(_type, newversion); | 216 | InsertVersion(_type, newversion); |
158 | } | ||
159 | else | ||
160 | { | ||
161 | UpdateVersion(_type, newversion); | ||
162 | } | ||
163 | version = newversion; | ||
164 | } | 217 | } |
218 | else | ||
219 | { | ||
220 | UpdateVersion(_type, newversion); | ||
221 | } | ||
222 | version = newversion; | ||
165 | } | 223 | } |
166 | } | 224 | } |
167 | 225 | ||
168 | // private int MaxVersion() | ||
169 | // { | ||
170 | // int max = 0; | ||
171 | // string[] names = _assem.GetManifestResourceNames(); | ||
172 | |||
173 | // foreach (string s in names) | ||
174 | // { | ||
175 | // Match m = _match.Match(s); | ||
176 | // if (m.Success) | ||
177 | // { | ||
178 | // int MigrationVersion = int.Parse(m.Groups[1].ToString()); | ||
179 | // if (MigrationVersion > max) | ||
180 | // max = MigrationVersion; | ||
181 | // } | ||
182 | // } | ||
183 | // return max; | ||
184 | // } | ||
185 | |||
186 | public int Version | 226 | public int Version |
187 | { | 227 | { |
188 | get { return FindVersion(_conn, _type); } | 228 | get { return FindVersion(_conn, _type); } |
@@ -206,7 +246,7 @@ namespace OpenSim.Data | |||
206 | try | 246 | try |
207 | { | 247 | { |
208 | cmd.CommandText = "select version from migrations where name='" + type + "' order by version desc"; | 248 | cmd.CommandText = "select version from migrations where name='" + type + "' order by version desc"; |
209 | using (IDataReader reader = cmd.ExecuteReader()) | 249 | using (DbDataReader reader = cmd.ExecuteReader()) |
210 | { | 250 | { |
211 | if (reader.Read()) | 251 | if (reader.Read()) |
212 | { | 252 | { |
@@ -217,7 +257,8 @@ namespace OpenSim.Data | |||
217 | } | 257 | } |
218 | catch | 258 | catch |
219 | { | 259 | { |
220 | // Something went wrong, so we're version 0 | 260 | // Something went wrong (probably no table), so we're at version -1 |
261 | version = -1; | ||
221 | } | 262 | } |
222 | } | 263 | } |
223 | return version; | 264 | return version; |
@@ -225,57 +266,151 @@ namespace OpenSim.Data | |||
225 | 266 | ||
226 | private void InsertVersion(string type, int version) | 267 | private void InsertVersion(string type, int version) |
227 | { | 268 | { |
228 | using (DbCommand cmd = _conn.CreateCommand()) | 269 | m_log.InfoFormat("[MIGRATIONS]: Creating {0} at version {1}", type, version); |
229 | { | 270 | ExecuteScript("insert into migrations(name, version) values('" + type + "', " + version + ")"); |
230 | cmd.CommandText = "insert into migrations(name, version) values('" + type + "', " + version + ")"; | ||
231 | m_log.InfoFormat("[MIGRATIONS]: Creating {0} at version {1}", type, version); | ||
232 | cmd.ExecuteNonQuery(); | ||
233 | } | ||
234 | } | 271 | } |
235 | 272 | ||
236 | private void UpdateVersion(string type, int version) | 273 | private void UpdateVersion(string type, int version) |
237 | { | 274 | { |
238 | using (DbCommand cmd = _conn.CreateCommand()) | 275 | m_log.InfoFormat("[MIGRATIONS]: Updating {0} to version {1}", type, version); |
239 | { | 276 | ExecuteScript("update migrations set version=" + version + " where name='" + type + "'"); |
240 | cmd.CommandText = "update migrations set version=" + version + " where name='" + type + "'"; | ||
241 | m_log.InfoFormat("[MIGRATIONS]: Updating {0} to version {1}", type, version); | ||
242 | cmd.ExecuteNonQuery(); | ||
243 | } | ||
244 | } | 277 | } |
245 | 278 | ||
246 | // private SortedList<int, string> GetAllMigrations() | 279 | private delegate void FlushProc(); |
247 | // { | ||
248 | // return GetMigrationsAfter(0); | ||
249 | // } | ||
250 | 280 | ||
251 | private SortedList<int, string> GetMigrationsAfter(int after) | 281 | /// <summary>Scans for migration resources in either old-style "scattered" (one file per version) |
282 | /// or new-style "integrated" format (single file with ":VERSION nnn" sections). | ||
283 | /// In the new-style migrations it also recognizes ':GO' separators for parts of the SQL script | ||
284 | /// that must be sent to the server separately. The old-style migrations are loaded each in one piece | ||
285 | /// and don't support the ':GO' feature. | ||
286 | /// </summary> | ||
287 | /// <param name="after">The version we are currently at. Scan for any higher versions</param> | ||
288 | /// <returns>A list of string arrays, representing the scripts.</returns> | ||
289 | private SortedList<int, string[]> GetMigrationsAfter(int after) | ||
252 | { | 290 | { |
291 | SortedList<int, string[]> migrations = new SortedList<int, string[]>(); | ||
292 | |||
253 | string[] names = _assem.GetManifestResourceNames(); | 293 | string[] names = _assem.GetManifestResourceNames(); |
254 | SortedList<int, string> migrations = new SortedList<int, string>(); | 294 | if( names.Length == 0 ) // should never happen |
255 | // because life is funny if we don't | 295 | return migrations; |
256 | Array.Sort(names); | 296 | |
297 | Array.Sort(names); // we want all the migrations ordered | ||
298 | |||
299 | int nLastVerFound = 0; | ||
300 | Match m = null; | ||
301 | string sFile = Array.FindLast(names, nm => { m = _match_new.Match(nm); return m.Success; }); // ; nm.StartsWith(sPrefix, StringComparison.InvariantCultureIgnoreCase | ||
302 | |||
303 | if( (m != null) && !String.IsNullOrEmpty(sFile) ) | ||
304 | { | ||
305 | /* The filename should be '<StoreName>.migrations[.NNN]' where NNN | ||
306 | * is the last version number defined in the file. If the '.NNN' part is recognized, the code can skip | ||
307 | * the file without looking inside if we have a higher version already. Without the suffix we read | ||
308 | * the file anyway and use the version numbers inside. Any unrecognized suffix (such as '.sql') | ||
309 | * is valid but ignored. | ||
310 | * | ||
311 | * NOTE that we expect only one 'merged' migration file. If there are several, we take the last one. | ||
312 | * If you are numbering them, leave only the latest one in the project or at least make sure they numbered | ||
313 | * to come up in the correct order (e.g. 'SomeStore.migrations.001' rather than 'SomeStore.migrations.1') | ||
314 | */ | ||
315 | |||
316 | if (m.Groups.Count > 1 && int.TryParse(m.Groups[1].Value, out nLastVerFound)) | ||
317 | { | ||
318 | if( nLastVerFound <= after ) | ||
319 | goto scan_old_style; | ||
320 | } | ||
321 | |||
322 | System.Text.StringBuilder sb = new System.Text.StringBuilder(4096); | ||
323 | int nVersion = -1; | ||
324 | |||
325 | List<string> script = new List<string>(); | ||
326 | |||
327 | FlushProc flush = delegate() | ||
328 | { | ||
329 | if (sb.Length > 0) // last SQL stmt to script list | ||
330 | { | ||
331 | script.Add(sb.ToString()); | ||
332 | sb.Length = 0; | ||
333 | } | ||
257 | 334 | ||
335 | if ( (nVersion > 0) && (nVersion > after) && (script.Count > 0) && !migrations.ContainsKey(nVersion)) // script to the versioned script list | ||
336 | { | ||
337 | migrations[nVersion] = script.ToArray(); | ||
338 | } | ||
339 | script.Clear(); | ||
340 | }; | ||
341 | |||
342 | using (Stream resource = _assem.GetManifestResourceStream(sFile)) | ||
343 | using (StreamReader resourceReader = new StreamReader(resource)) | ||
344 | { | ||
345 | int nLineNo = 0; | ||
346 | while (!resourceReader.EndOfStream) | ||
347 | { | ||
348 | string sLine = resourceReader.ReadLine(); | ||
349 | nLineNo++; | ||
350 | |||
351 | if( String.IsNullOrEmpty(sLine) || sLine.StartsWith("#") ) // ignore a comment or empty line | ||
352 | continue; | ||
353 | |||
354 | if (sLine.Trim().Equals(":GO", StringComparison.InvariantCultureIgnoreCase)) | ||
355 | { | ||
356 | if (sb.Length == 0) continue; | ||
357 | if (nVersion > after) | ||
358 | script.Add(sb.ToString()); | ||
359 | sb.Length = 0; | ||
360 | continue; | ||
361 | } | ||
362 | |||
363 | if (sLine.StartsWith(":VERSION ", StringComparison.InvariantCultureIgnoreCase)) // ":VERSION nnn" | ||
364 | { | ||
365 | flush(); | ||
366 | |||
367 | int n = sLine.IndexOf('#'); // Comment is allowed in version sections, ignored | ||
368 | if (n >= 0) | ||
369 | sLine = sLine.Substring(0, n); | ||
370 | |||
371 | if (!int.TryParse(sLine.Substring(9).Trim(), out nVersion)) | ||
372 | { | ||
373 | m_log.ErrorFormat("[MIGRATIONS]: invalid version marker at {0}: line {1}. Migration failed!", sFile, nLineNo); | ||
374 | break; | ||
375 | } | ||
376 | } | ||
377 | else | ||
378 | { | ||
379 | sb.AppendLine(sLine); | ||
380 | } | ||
381 | } | ||
382 | flush(); | ||
383 | |||
384 | // If there are scattered migration files as well, only look for those with higher version numbers. | ||
385 | if (after < nVersion) | ||
386 | after = nVersion; | ||
387 | } | ||
388 | } | ||
389 | |||
390 | scan_old_style: | ||
391 | // scan "old style" migration pieces anyway, ignore any versions already filled from the single file | ||
258 | foreach (string s in names) | 392 | foreach (string s in names) |
259 | { | 393 | { |
260 | Match m = _match.Match(s); | 394 | m = _match_old.Match(s); |
261 | if (m.Success) | 395 | if (m.Success) |
262 | { | 396 | { |
263 | int version = int.Parse(m.Groups[1].ToString()); | 397 | int version = int.Parse(m.Groups[1].ToString()); |
264 | if (version > after) | 398 | if ( (version > after) && !migrations.ContainsKey(version) ) |
265 | { | 399 | { |
266 | using (Stream resource = _assem.GetManifestResourceStream(s)) | 400 | using (Stream resource = _assem.GetManifestResourceStream(s)) |
267 | { | 401 | { |
268 | using (StreamReader resourceReader = new StreamReader(resource)) | 402 | using (StreamReader resourceReader = new StreamReader(resource)) |
269 | { | 403 | { |
270 | string resourceString = resourceReader.ReadToEnd(); | 404 | string sql = resourceReader.ReadToEnd(); |
271 | migrations.Add(version, resourceString); | 405 | migrations.Add(version, new string[]{sql}); |
272 | } | 406 | } |
273 | } | 407 | } |
274 | } | 408 | } |
275 | } | 409 | } |
276 | } | 410 | } |
277 | 411 | ||
278 | if (migrations.Count < 1) { | 412 | if (migrations.Count < 1) |
413 | { | ||
279 | m_log.InfoFormat("[MIGRATIONS]: {0} up to date, no migrations to apply", _type); | 414 | m_log.InfoFormat("[MIGRATIONS]: {0} up to date, no migrations to apply", _type); |
280 | } | 415 | } |
281 | return migrations; | 416 | return migrations; |
diff --git a/OpenSim/Data/MySQL/MySQLAssetData.cs b/OpenSim/Data/MySQL/MySQLAssetData.cs index 13f5fa2..fe5152a 100644 --- a/OpenSim/Data/MySQL/MySQLAssetData.cs +++ b/OpenSim/Data/MySQL/MySQLAssetData.cs | |||
@@ -33,6 +33,7 @@ using log4net; | |||
33 | using MySql.Data.MySqlClient; | 33 | using MySql.Data.MySqlClient; |
34 | using OpenMetaverse; | 34 | using OpenMetaverse; |
35 | using OpenSim.Framework; | 35 | using OpenSim.Framework; |
36 | using OpenSim.Data; | ||
36 | 37 | ||
37 | namespace OpenSim.Data.MySQL | 38 | namespace OpenSim.Data.MySQL |
38 | { | 39 | { |
@@ -111,7 +112,7 @@ namespace OpenSim.Data.MySQL | |||
111 | dbcon.Open(); | 112 | dbcon.Open(); |
112 | 113 | ||
113 | using (MySqlCommand cmd = new MySqlCommand( | 114 | using (MySqlCommand cmd = new MySqlCommand( |
114 | "SELECT name, description, assetType, local, temporary, asset_flags, data FROM assets WHERE id=?id", | 115 | "SELECT name, description, assetType, local, temporary, asset_flags, CreatorID, data FROM assets WHERE id=?id", |
115 | dbcon)) | 116 | dbcon)) |
116 | { | 117 | { |
117 | cmd.Parameters.AddWithValue("?id", assetID.ToString()); | 118 | cmd.Parameters.AddWithValue("?id", assetID.ToString()); |
@@ -122,7 +123,7 @@ namespace OpenSim.Data.MySQL | |||
122 | { | 123 | { |
123 | if (dbReader.Read()) | 124 | if (dbReader.Read()) |
124 | { | 125 | { |
125 | asset = new AssetBase(assetID, (string)dbReader["name"], (sbyte)dbReader["assetType"], UUID.Zero.ToString()); | 126 | asset = new AssetBase(assetID, (string)dbReader["name"], (sbyte)dbReader["assetType"], dbReader["CreatorID"].ToString()); |
126 | asset.Data = (byte[])dbReader["data"]; | 127 | asset.Data = (byte[])dbReader["data"]; |
127 | asset.Description = (string)dbReader["description"]; | 128 | asset.Description = (string)dbReader["description"]; |
128 | 129 | ||
@@ -162,8 +163,8 @@ namespace OpenSim.Data.MySQL | |||
162 | 163 | ||
163 | MySqlCommand cmd = | 164 | MySqlCommand cmd = |
164 | new MySqlCommand( | 165 | new MySqlCommand( |
165 | "replace INTO assets(id, name, description, assetType, local, temporary, create_time, access_time, asset_flags, data)" + | 166 | "replace INTO assets(id, name, description, assetType, local, temporary, create_time, access_time, asset_flags, CreatorID, data)" + |
166 | "VALUES(?id, ?name, ?description, ?assetType, ?local, ?temporary, ?create_time, ?access_time, ?asset_flags, ?data)", | 167 | "VALUES(?id, ?name, ?description, ?assetType, ?local, ?temporary, ?create_time, ?access_time, ?asset_flags, ?CreatorID, ?data)", |
167 | dbcon); | 168 | dbcon); |
168 | 169 | ||
169 | string assetName = asset.Name; | 170 | string assetName = asset.Name; |
@@ -195,6 +196,7 @@ namespace OpenSim.Data.MySQL | |||
195 | cmd.Parameters.AddWithValue("?temporary", asset.Temporary); | 196 | cmd.Parameters.AddWithValue("?temporary", asset.Temporary); |
196 | cmd.Parameters.AddWithValue("?create_time", now); | 197 | cmd.Parameters.AddWithValue("?create_time", now); |
197 | cmd.Parameters.AddWithValue("?access_time", now); | 198 | cmd.Parameters.AddWithValue("?access_time", now); |
199 | cmd.Parameters.AddWithValue("?CreatorID", asset.Metadata.CreatorID); | ||
198 | cmd.Parameters.AddWithValue("?asset_flags", (int)asset.Flags); | 200 | cmd.Parameters.AddWithValue("?asset_flags", (int)asset.Flags); |
199 | cmd.Parameters.AddWithValue("?data", asset.Data); | 201 | cmd.Parameters.AddWithValue("?data", asset.Data); |
200 | cmd.ExecuteNonQuery(); | 202 | cmd.ExecuteNonQuery(); |
@@ -304,7 +306,7 @@ namespace OpenSim.Data.MySQL | |||
304 | using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) | 306 | using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) |
305 | { | 307 | { |
306 | dbcon.Open(); | 308 | dbcon.Open(); |
307 | MySqlCommand cmd = new MySqlCommand("SELECT name,description,assetType,temporary,id,asset_flags FROM assets LIMIT ?start, ?count", dbcon); | 309 | MySqlCommand cmd = new MySqlCommand("SELECT name,description,assetType,temporary,id,asset_flags,CreatorID FROM assets LIMIT ?start, ?count", dbcon); |
308 | cmd.Parameters.AddWithValue("?start", start); | 310 | cmd.Parameters.AddWithValue("?start", start); |
309 | cmd.Parameters.AddWithValue("?count", count); | 311 | cmd.Parameters.AddWithValue("?count", count); |
310 | 312 | ||
@@ -320,7 +322,8 @@ namespace OpenSim.Data.MySQL | |||
320 | metadata.Type = (sbyte)dbReader["assetType"]; | 322 | metadata.Type = (sbyte)dbReader["assetType"]; |
321 | metadata.Temporary = Convert.ToBoolean(dbReader["temporary"]); // Not sure if this is correct. | 323 | metadata.Temporary = Convert.ToBoolean(dbReader["temporary"]); // Not sure if this is correct. |
322 | metadata.Flags = (AssetFlags)Convert.ToInt32(dbReader["asset_flags"]); | 324 | metadata.Flags = (AssetFlags)Convert.ToInt32(dbReader["asset_flags"]); |
323 | metadata.FullID = new UUID((string)dbReader["id"]); | 325 | metadata.FullID = DBGuid.FromDB(dbReader["id"]); |
326 | metadata.CreatorID = dbReader["CreatorID"].ToString(); | ||
324 | 327 | ||
325 | // Current SHA1s are not stored/computed. | 328 | // Current SHA1s are not stored/computed. |
326 | metadata.SHA1 = new byte[] { }; | 329 | metadata.SHA1 = new byte[] { }; |
diff --git a/OpenSim/Data/MySQL/MySQLEstateData.cs b/OpenSim/Data/MySQL/MySQLEstateData.cs index 08e2144..9158f7a 100644 --- a/OpenSim/Data/MySQL/MySQLEstateData.cs +++ b/OpenSim/Data/MySQL/MySQLEstateData.cs | |||
@@ -34,6 +34,7 @@ using MySql.Data.MySqlClient; | |||
34 | using OpenMetaverse; | 34 | using OpenMetaverse; |
35 | using OpenSim.Framework; | 35 | using OpenSim.Framework; |
36 | using OpenSim.Region.Framework.Interfaces; | 36 | using OpenSim.Region.Framework.Interfaces; |
37 | using OpenSim.Data; | ||
37 | 38 | ||
38 | namespace OpenSim.Data.MySQL | 39 | namespace OpenSim.Data.MySQL |
39 | { | 40 | { |
@@ -156,20 +157,13 @@ namespace OpenSim.Data.MySQL | |||
156 | 157 | ||
157 | foreach (string name in FieldList) | 158 | foreach (string name in FieldList) |
158 | { | 159 | { |
159 | if (m_FieldMap[name].GetValue(es) is bool) | 160 | if (m_FieldMap[name].FieldType == typeof(bool)) |
160 | { | 161 | { |
161 | int v = Convert.ToInt32(r[name]); | 162 | m_FieldMap[name].SetValue(es, Convert.ToInt32(r[name]) != 0); |
162 | if (v != 0) | ||
163 | m_FieldMap[name].SetValue(es, true); | ||
164 | else | ||
165 | m_FieldMap[name].SetValue(es, false); | ||
166 | } | 163 | } |
167 | else if (m_FieldMap[name].GetValue(es) is UUID) | 164 | else if (m_FieldMap[name].FieldType == typeof(UUID)) |
168 | { | 165 | { |
169 | UUID uuid = UUID.Zero; | 166 | m_FieldMap[name].SetValue(es, DBGuid.FromDB(r[name])); |
170 | |||
171 | UUID.TryParse(r[name].ToString(), out uuid); | ||
172 | m_FieldMap[name].SetValue(es, uuid); | ||
173 | } | 167 | } |
174 | else | 168 | else |
175 | { | 169 | { |
@@ -385,11 +379,7 @@ namespace OpenSim.Data.MySQL | |||
385 | while (r.Read()) | 379 | while (r.Read()) |
386 | { | 380 | { |
387 | // EstateBan eb = new EstateBan(); | 381 | // EstateBan eb = new EstateBan(); |
388 | 382 | uuids.Add(DBGuid.FromDB(r["uuid"])); | |
389 | UUID uuid = new UUID(); | ||
390 | UUID.TryParse(r["uuid"].ToString(), out uuid); | ||
391 | |||
392 | uuids.Add(uuid); | ||
393 | } | 383 | } |
394 | } | 384 | } |
395 | } | 385 | } |
@@ -490,7 +480,7 @@ namespace OpenSim.Data.MySQL | |||
490 | using (IDataReader reader = cmd.ExecuteReader()) | 480 | using (IDataReader reader = cmd.ExecuteReader()) |
491 | { | 481 | { |
492 | while(reader.Read()) | 482 | while(reader.Read()) |
493 | result.Add(new UUID(reader["RegionID"].ToString())); | 483 | result.Add(DBGuid.FromDB(reader["RegionID"])); |
494 | reader.Close(); | 484 | reader.Close(); |
495 | } | 485 | } |
496 | } | 486 | } |
diff --git a/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs b/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs index 1253e0b..6cbb2ee 100644 --- a/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs +++ b/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs | |||
@@ -148,19 +148,16 @@ namespace OpenSim.Data.MySQL | |||
148 | 148 | ||
149 | foreach (string name in m_Fields.Keys) | 149 | foreach (string name in m_Fields.Keys) |
150 | { | 150 | { |
151 | if (m_Fields[name].GetValue(row) is bool) | 151 | if (m_Fields[name].FieldType == typeof(bool)) |
152 | { | 152 | { |
153 | int v = Convert.ToInt32(reader[name]); | 153 | int v = Convert.ToInt32(reader[name]); |
154 | m_Fields[name].SetValue(row, v != 0 ? true : false); | 154 | m_Fields[name].SetValue(row, v != 0 ? true : false); |
155 | } | 155 | } |
156 | else if (m_Fields[name].GetValue(row) is UUID) | 156 | else if (m_Fields[name].FieldType == typeof(UUID)) |
157 | { | 157 | { |
158 | UUID uuid = UUID.Zero; | 158 | m_Fields[name].SetValue(row, DBGuid.FromDB(reader[name])); |
159 | |||
160 | UUID.TryParse(reader[name].ToString(), out uuid); | ||
161 | m_Fields[name].SetValue(row, uuid); | ||
162 | } | 159 | } |
163 | else if (m_Fields[name].GetValue(row) is int) | 160 | else if (m_Fields[name].FieldType == typeof(int)) |
164 | { | 161 | { |
165 | int v = Convert.ToInt32(reader[name]); | 162 | int v = Convert.ToInt32(reader[name]); |
166 | m_Fields[name].SetValue(row, v); | 163 | m_Fields[name].SetValue(row, v); |
diff --git a/OpenSim/Data/MySQL/MySQLInventoryData.cs b/OpenSim/Data/MySQL/MySQLInventoryData.cs index e0e9b9c..0aea30f 100644 --- a/OpenSim/Data/MySQL/MySQLInventoryData.cs +++ b/OpenSim/Data/MySQL/MySQLInventoryData.cs | |||
@@ -32,6 +32,7 @@ using log4net; | |||
32 | using MySql.Data.MySqlClient; | 32 | using MySql.Data.MySqlClient; |
33 | using OpenMetaverse; | 33 | using OpenMetaverse; |
34 | using OpenSim.Framework; | 34 | using OpenSim.Framework; |
35 | using OpenSim.Data; | ||
35 | 36 | ||
36 | namespace OpenSim.Data.MySQL | 37 | namespace OpenSim.Data.MySQL |
37 | { | 38 | { |
@@ -285,31 +286,23 @@ namespace OpenSim.Data.MySQL | |||
285 | InventoryItemBase item = new InventoryItemBase(); | 286 | InventoryItemBase item = new InventoryItemBase(); |
286 | 287 | ||
287 | // TODO: this is to handle a case where NULLs creep in there, which we are not sure is endemic to the system, or legacy. It would be nice to live fix these. | 288 | // TODO: this is to handle a case where NULLs creep in there, which we are not sure is endemic to the system, or legacy. It would be nice to live fix these. |
288 | if (reader["creatorID"] == null) | 289 | // ( DBGuid.FromDB() reads db NULLs as well, returns UUID.Zero ) |
289 | { | 290 | item.CreatorId = reader["creatorID"].ToString(); |
290 | item.CreatorId = UUID.Zero.ToString(); | ||
291 | } | ||
292 | else | ||
293 | { | ||
294 | item.CreatorId = (string)reader["creatorID"]; | ||
295 | } | ||
296 | 291 | ||
297 | // Be a bit safer in parsing these because the | 292 | // Be a bit safer in parsing these because the |
298 | // database doesn't enforce them to be not null, and | 293 | // database doesn't enforce them to be not null, and |
299 | // the inventory still works if these are weird in the | 294 | // the inventory still works if these are weird in the |
300 | // db | 295 | // db |
301 | UUID Owner = UUID.Zero; | 296 | |
302 | UUID GroupID = UUID.Zero; | 297 | // (Empty is Ok, but "weird" will throw!) |
303 | UUID.TryParse((string)reader["avatarID"], out Owner); | 298 | item.Owner = DBGuid.FromDB(reader["avatarID"]); |
304 | UUID.TryParse((string)reader["groupID"], out GroupID); | 299 | item.GroupID = DBGuid.FromDB(reader["groupID"]); |
305 | item.Owner = Owner; | ||
306 | item.GroupID = GroupID; | ||
307 | 300 | ||
308 | // Rest of the parsing. If these UUID's fail, we're dead anyway | 301 | // Rest of the parsing. If these UUID's fail, we're dead anyway |
309 | item.ID = new UUID((string) reader["inventoryID"]); | 302 | item.ID = DBGuid.FromDB(reader["inventoryID"]); |
310 | item.AssetID = new UUID((string) reader["assetID"]); | 303 | item.AssetID = DBGuid.FromDB(reader["assetID"]); |
311 | item.AssetType = (int) reader["assetType"]; | 304 | item.AssetType = (int) reader["assetType"]; |
312 | item.Folder = new UUID((string) reader["parentFolderID"]); | 305 | item.Folder = DBGuid.FromDB(reader["parentFolderID"]); |
313 | item.Name = (string)(reader["inventoryName"] ?? String.Empty); | 306 | item.Name = (string)(reader["inventoryName"] ?? String.Empty); |
314 | item.Description = (string)(reader["inventoryDescription"] ?? String.Empty); | 307 | item.Description = (string)(reader["inventoryDescription"] ?? String.Empty); |
315 | item.NextPermissions = (uint) reader["inventoryNextPermissions"]; | 308 | item.NextPermissions = (uint) reader["inventoryNextPermissions"]; |
@@ -382,9 +375,9 @@ namespace OpenSim.Data.MySQL | |||
382 | try | 375 | try |
383 | { | 376 | { |
384 | InventoryFolderBase folder = new InventoryFolderBase(); | 377 | InventoryFolderBase folder = new InventoryFolderBase(); |
385 | folder.Owner = new UUID((string) reader["agentID"]); | 378 | folder.Owner = DBGuid.FromDB(reader["agentID"]); |
386 | folder.ParentID = new UUID((string) reader["parentFolderID"]); | 379 | folder.ParentID = DBGuid.FromDB(reader["parentFolderID"]); |
387 | folder.ID = new UUID((string) reader["folderID"]); | 380 | folder.ID = DBGuid.FromDB(reader["folderID"]); |
388 | folder.Name = (string) reader["folderName"]; | 381 | folder.Name = (string) reader["folderName"]; |
389 | folder.Type = (short) reader["type"]; | 382 | folder.Type = (short) reader["type"]; |
390 | folder.Version = (ushort) ((int) reader["version"]); | 383 | folder.Version = (ushort) ((int) reader["version"]); |
diff --git a/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs b/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs index 07371e7..bfeae12 100644 --- a/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs +++ b/OpenSim/Data/MySQL/MySQLLegacyRegionData.cs | |||
@@ -38,6 +38,7 @@ using OpenMetaverse; | |||
38 | using OpenSim.Framework; | 38 | using OpenSim.Framework; |
39 | using OpenSim.Region.Framework.Interfaces; | 39 | using OpenSim.Region.Framework.Interfaces; |
40 | using OpenSim.Region.Framework.Scenes; | 40 | using OpenSim.Region.Framework.Scenes; |
41 | using OpenSim.Data; | ||
41 | 42 | ||
42 | namespace OpenSim.Data.MySQL | 43 | namespace OpenSim.Data.MySQL |
43 | { | 44 | { |
@@ -269,7 +270,7 @@ namespace OpenSim.Data.MySQL | |||
269 | using (IDataReader reader = ExecuteReader(cmd)) | 270 | using (IDataReader reader = ExecuteReader(cmd)) |
270 | { | 271 | { |
271 | while (reader.Read()) | 272 | while (reader.Read()) |
272 | uuids.Add(new UUID(reader["UUID"].ToString())); | 273 | uuids.Add(DBGuid.FromDB(reader["UUID"].ToString())); |
273 | } | 274 | } |
274 | 275 | ||
275 | // delete the main prims | 276 | // delete the main prims |
@@ -422,7 +423,7 @@ namespace OpenSim.Data.MySQL | |||
422 | else | 423 | else |
423 | prim.Shape = BuildShape(reader); | 424 | prim.Shape = BuildShape(reader); |
424 | 425 | ||
425 | UUID parentID = new UUID(reader["SceneGroupID"].ToString()); | 426 | UUID parentID = DBGuid.FromDB(reader["SceneGroupID"].ToString()); |
426 | if (parentID != prim.UUID) | 427 | if (parentID != prim.UUID) |
427 | prim.ParentUUID = parentID; | 428 | prim.ParentUUID = parentID; |
428 | 429 | ||
@@ -500,7 +501,7 @@ namespace OpenSim.Data.MySQL | |||
500 | { | 501 | { |
501 | if (!(itemReader["primID"] is DBNull)) | 502 | if (!(itemReader["primID"] is DBNull)) |
502 | { | 503 | { |
503 | UUID primID = new UUID(itemReader["primID"].ToString()); | 504 | UUID primID = DBGuid.FromDB(itemReader["primID"].ToString()); |
504 | if (prims.ContainsKey(primID)) | 505 | if (prims.ContainsKey(primID)) |
505 | primsWithInventory.Add(prims[primID]); | 506 | primsWithInventory.Add(prims[primID]); |
506 | } | 507 | } |
@@ -738,7 +739,7 @@ namespace OpenSim.Data.MySQL | |||
738 | } | 739 | } |
739 | else | 740 | else |
740 | { | 741 | { |
741 | UUID.TryParse(result["region_id"].ToString(), out nWP.regionID); | 742 | nWP.regionID = DBGuid.FromDB(result["region_id"]); |
742 | nWP.waterColor.X = Convert.ToSingle(result["water_color_r"]); | 743 | nWP.waterColor.X = Convert.ToSingle(result["water_color_r"]); |
743 | nWP.waterColor.Y = Convert.ToSingle(result["water_color_g"]); | 744 | nWP.waterColor.Y = Convert.ToSingle(result["water_color_g"]); |
744 | nWP.waterColor.Z = Convert.ToSingle(result["water_color_b"]); | 745 | nWP.waterColor.Z = Convert.ToSingle(result["water_color_b"]); |
@@ -1055,7 +1056,14 @@ namespace OpenSim.Data.MySQL | |||
1055 | private SceneObjectPart BuildPrim(IDataReader row) | 1056 | private SceneObjectPart BuildPrim(IDataReader row) |
1056 | { | 1057 | { |
1057 | SceneObjectPart prim = new SceneObjectPart(); | 1058 | SceneObjectPart prim = new SceneObjectPart(); |
1058 | prim.UUID = new UUID((string)row["UUID"]); | 1059 | |
1060 | // depending on the MySQL connector version, CHAR(36) may be already converted to Guid! | ||
1061 | prim.UUID = DBGuid.FromDB(row["UUID"]); | ||
1062 | prim.CreatorID = DBGuid.FromDB(row["CreatorID"]); | ||
1063 | prim.OwnerID = DBGuid.FromDB(row["OwnerID"]); | ||
1064 | prim.GroupID = DBGuid.FromDB(row["GroupID"]); | ||
1065 | prim.LastOwnerID = DBGuid.FromDB(row["LastOwnerID"]); | ||
1066 | |||
1059 | // explicit conversion of integers is required, which sort | 1067 | // explicit conversion of integers is required, which sort |
1060 | // of sucks. No idea if there is a shortcut here or not. | 1068 | // of sucks. No idea if there is a shortcut here or not. |
1061 | prim.CreationDate = (int)row["CreationDate"]; | 1069 | prim.CreationDate = (int)row["CreationDate"]; |
@@ -1074,15 +1082,12 @@ namespace OpenSim.Data.MySQL | |||
1074 | prim.TouchName = (string)row["TouchName"]; | 1082 | prim.TouchName = (string)row["TouchName"]; |
1075 | // Permissions | 1083 | // Permissions |
1076 | prim.ObjectFlags = (uint)(int)row["ObjectFlags"]; | 1084 | prim.ObjectFlags = (uint)(int)row["ObjectFlags"]; |
1077 | prim.CreatorID = new UUID((string)row["CreatorID"]); | ||
1078 | prim.OwnerID = new UUID((string)row["OwnerID"]); | ||
1079 | prim.GroupID = new UUID((string)row["GroupID"]); | ||
1080 | prim.LastOwnerID = new UUID((string)row["LastOwnerID"]); | ||
1081 | prim.OwnerMask = (uint)(int)row["OwnerMask"]; | 1085 | prim.OwnerMask = (uint)(int)row["OwnerMask"]; |
1082 | prim.NextOwnerMask = (uint)(int)row["NextOwnerMask"]; | 1086 | prim.NextOwnerMask = (uint)(int)row["NextOwnerMask"]; |
1083 | prim.GroupMask = (uint)(int)row["GroupMask"]; | 1087 | prim.GroupMask = (uint)(int)row["GroupMask"]; |
1084 | prim.EveryoneMask = (uint)(int)row["EveryoneMask"]; | 1088 | prim.EveryoneMask = (uint)(int)row["EveryoneMask"]; |
1085 | prim.BaseMask = (uint)(int)row["BaseMask"]; | 1089 | prim.BaseMask = (uint)(int)row["BaseMask"]; |
1090 | |||
1086 | // Vectors | 1091 | // Vectors |
1087 | prim.OffsetPosition = new Vector3( | 1092 | prim.OffsetPosition = new Vector3( |
1088 | (float)(double)row["PositionX"], | 1093 | (float)(double)row["PositionX"], |
@@ -1134,7 +1139,7 @@ namespace OpenSim.Data.MySQL | |||
1134 | prim.PayPrice[3] = (int)row["PayButton3"]; | 1139 | prim.PayPrice[3] = (int)row["PayButton3"]; |
1135 | prim.PayPrice[4] = (int)row["PayButton4"]; | 1140 | prim.PayPrice[4] = (int)row["PayButton4"]; |
1136 | 1141 | ||
1137 | prim.Sound = new UUID(row["LoopedSound"].ToString()); | 1142 | prim.Sound = DBGuid.FromDB(row["LoopedSound"].ToString()); |
1138 | prim.SoundGain = (float)(double)row["LoopedSoundGain"]; | 1143 | prim.SoundGain = (float)(double)row["LoopedSoundGain"]; |
1139 | prim.SoundFlags = 1; // If it's persisted at all, it's looped | 1144 | prim.SoundFlags = 1; // If it's persisted at all, it's looped |
1140 | 1145 | ||
@@ -1161,16 +1166,10 @@ namespace OpenSim.Data.MySQL | |||
1161 | (float)(double)row["CameraAtOffsetZ"] | 1166 | (float)(double)row["CameraAtOffsetZ"] |
1162 | )); | 1167 | )); |
1163 | 1168 | ||
1164 | if ((sbyte)row["ForceMouselook"] != 0) | 1169 | prim.SetForceMouselook((sbyte)row["ForceMouselook"] != 0); |
1165 | prim.SetForceMouselook(true); | ||
1166 | |||
1167 | prim.ScriptAccessPin = (int)row["ScriptAccessPin"]; | 1170 | prim.ScriptAccessPin = (int)row["ScriptAccessPin"]; |
1168 | 1171 | prim.AllowedDrop = ((sbyte)row["AllowedDrop"] != 0); | |
1169 | if ((sbyte)row["AllowedDrop"] != 0) | 1172 | prim.DIE_AT_EDGE = ((sbyte)row["DieAtEdge"] != 0); |
1170 | prim.AllowedDrop = true; | ||
1171 | |||
1172 | if ((sbyte)row["DieAtEdge"] != 0) | ||
1173 | prim.DIE_AT_EDGE = true; | ||
1174 | 1173 | ||
1175 | prim.SalePrice = (int)row["SalePrice"]; | 1174 | prim.SalePrice = (int)row["SalePrice"]; |
1176 | prim.ObjectSaleType = unchecked((byte)(sbyte)row["SaleType"]); | 1175 | prim.ObjectSaleType = unchecked((byte)(sbyte)row["SaleType"]); |
@@ -1180,11 +1179,10 @@ namespace OpenSim.Data.MySQL | |||
1180 | if (!(row["ClickAction"] is DBNull)) | 1179 | if (!(row["ClickAction"] is DBNull)) |
1181 | prim.ClickAction = unchecked((byte)(sbyte)row["ClickAction"]); | 1180 | prim.ClickAction = unchecked((byte)(sbyte)row["ClickAction"]); |
1182 | 1181 | ||
1183 | prim.CollisionSound = new UUID(row["CollisionSound"].ToString()); | 1182 | prim.CollisionSound = DBGuid.FromDB(row["CollisionSound"]); |
1184 | prim.CollisionSoundVolume = (float)(double)row["CollisionSoundVolume"]; | 1183 | prim.CollisionSoundVolume = (float)(double)row["CollisionSoundVolume"]; |
1185 | 1184 | ||
1186 | if ((sbyte)row["PassTouches"] != 0) | 1185 | prim.PassTouches = ((sbyte)row["PassTouches"] != 0); |
1187 | prim.PassTouches = true; | ||
1188 | prim.LinkNum = (int)row["LinkNumber"]; | 1186 | prim.LinkNum = (int)row["LinkNumber"]; |
1189 | 1187 | ||
1190 | return prim; | 1188 | return prim; |
@@ -1200,10 +1198,10 @@ namespace OpenSim.Data.MySQL | |||
1200 | { | 1198 | { |
1201 | TaskInventoryItem taskItem = new TaskInventoryItem(); | 1199 | TaskInventoryItem taskItem = new TaskInventoryItem(); |
1202 | 1200 | ||
1203 | taskItem.ItemID = new UUID((String)row["itemID"]); | 1201 | taskItem.ItemID = DBGuid.FromDB(row["itemID"]); |
1204 | taskItem.ParentPartID = new UUID((String)row["primID"]); | 1202 | taskItem.ParentPartID = DBGuid.FromDB(row["primID"]); |
1205 | taskItem.AssetID = new UUID((String)row["assetID"]); | 1203 | taskItem.AssetID = DBGuid.FromDB(row["assetID"]); |
1206 | taskItem.ParentID = new UUID((String)row["parentFolderID"]); | 1204 | taskItem.ParentID = DBGuid.FromDB(row["parentFolderID"]); |
1207 | 1205 | ||
1208 | taskItem.InvType = Convert.ToInt32(row["invType"]); | 1206 | taskItem.InvType = Convert.ToInt32(row["invType"]); |
1209 | taskItem.Type = Convert.ToInt32(row["assetType"]); | 1207 | taskItem.Type = Convert.ToInt32(row["assetType"]); |
@@ -1211,10 +1209,10 @@ namespace OpenSim.Data.MySQL | |||
1211 | taskItem.Name = (String)row["name"]; | 1209 | taskItem.Name = (String)row["name"]; |
1212 | taskItem.Description = (String)row["description"]; | 1210 | taskItem.Description = (String)row["description"]; |
1213 | taskItem.CreationDate = Convert.ToUInt32(row["creationDate"]); | 1211 | taskItem.CreationDate = Convert.ToUInt32(row["creationDate"]); |
1214 | taskItem.CreatorID = new UUID((String)row["creatorID"]); | 1212 | taskItem.CreatorID = DBGuid.FromDB(row["creatorID"]); |
1215 | taskItem.OwnerID = new UUID((String)row["ownerID"]); | 1213 | taskItem.OwnerID = DBGuid.FromDB(row["ownerID"]); |
1216 | taskItem.LastOwnerID = new UUID((String)row["lastOwnerID"]); | 1214 | taskItem.LastOwnerID = DBGuid.FromDB(row["lastOwnerID"]); |
1217 | taskItem.GroupID = new UUID((String)row["groupID"]); | 1215 | taskItem.GroupID = DBGuid.FromDB(row["groupID"]); |
1218 | 1216 | ||
1219 | taskItem.NextPermissions = Convert.ToUInt32(row["nextPermissions"]); | 1217 | taskItem.NextPermissions = Convert.ToUInt32(row["nextPermissions"]); |
1220 | taskItem.CurrentPermissions = Convert.ToUInt32(row["currentPermissions"]); | 1218 | taskItem.CurrentPermissions = Convert.ToUInt32(row["currentPermissions"]); |
@@ -1230,7 +1228,7 @@ namespace OpenSim.Data.MySQL | |||
1230 | { | 1228 | { |
1231 | RegionSettings newSettings = new RegionSettings(); | 1229 | RegionSettings newSettings = new RegionSettings(); |
1232 | 1230 | ||
1233 | newSettings.RegionUUID = new UUID((string) row["regionUUID"]); | 1231 | newSettings.RegionUUID = DBGuid.FromDB(row["regionUUID"]); |
1234 | newSettings.BlockTerraform = Convert.ToBoolean(row["block_terraform"]); | 1232 | newSettings.BlockTerraform = Convert.ToBoolean(row["block_terraform"]); |
1235 | newSettings.AllowDamage = Convert.ToBoolean(row["allow_damage"]); | 1233 | newSettings.AllowDamage = Convert.ToBoolean(row["allow_damage"]); |
1236 | newSettings.BlockFly = Convert.ToBoolean(row["block_fly"]); | 1234 | newSettings.BlockFly = Convert.ToBoolean(row["block_fly"]); |
@@ -1244,10 +1242,10 @@ namespace OpenSim.Data.MySQL | |||
1244 | newSettings.DisableScripts = Convert.ToBoolean(row["disable_scripts"]); | 1242 | newSettings.DisableScripts = Convert.ToBoolean(row["disable_scripts"]); |
1245 | newSettings.DisableCollisions = Convert.ToBoolean(row["disable_collisions"]); | 1243 | newSettings.DisableCollisions = Convert.ToBoolean(row["disable_collisions"]); |
1246 | newSettings.DisablePhysics = Convert.ToBoolean(row["disable_physics"]); | 1244 | newSettings.DisablePhysics = Convert.ToBoolean(row["disable_physics"]); |
1247 | newSettings.TerrainTexture1 = new UUID((String) row["terrain_texture_1"]); | 1245 | newSettings.TerrainTexture1 = DBGuid.FromDB(row["terrain_texture_1"]); |
1248 | newSettings.TerrainTexture2 = new UUID((String) row["terrain_texture_2"]); | 1246 | newSettings.TerrainTexture2 = DBGuid.FromDB(row["terrain_texture_2"]); |
1249 | newSettings.TerrainTexture3 = new UUID((String) row["terrain_texture_3"]); | 1247 | newSettings.TerrainTexture3 = DBGuid.FromDB(row["terrain_texture_3"]); |
1250 | newSettings.TerrainTexture4 = new UUID((String) row["terrain_texture_4"]); | 1248 | newSettings.TerrainTexture4 = DBGuid.FromDB(row["terrain_texture_4"]); |
1251 | newSettings.Elevation1NW = Convert.ToDouble(row["elevation_1_nw"]); | 1249 | newSettings.Elevation1NW = Convert.ToDouble(row["elevation_1_nw"]); |
1252 | newSettings.Elevation2NW = Convert.ToDouble(row["elevation_2_nw"]); | 1250 | newSettings.Elevation2NW = Convert.ToDouble(row["elevation_2_nw"]); |
1253 | newSettings.Elevation1NE = Convert.ToDouble(row["elevation_1_ne"]); | 1251 | newSettings.Elevation1NE = Convert.ToDouble(row["elevation_1_ne"]); |
@@ -1268,7 +1266,7 @@ namespace OpenSim.Data.MySQL | |||
1268 | ); | 1266 | ); |
1269 | newSettings.FixedSun = Convert.ToBoolean(row["fixed_sun"]); | 1267 | newSettings.FixedSun = Convert.ToBoolean(row["fixed_sun"]); |
1270 | newSettings.SunPosition = Convert.ToDouble(row["sun_position"]); | 1268 | newSettings.SunPosition = Convert.ToDouble(row["sun_position"]); |
1271 | newSettings.Covenant = new UUID((String) row["covenant"]); | 1269 | newSettings.Covenant = DBGuid.FromDB(row["covenant"]); |
1272 | 1270 | ||
1273 | newSettings.LoadedCreationDateTime = Convert.ToInt32(row["loaded_creation_datetime"]); | 1271 | newSettings.LoadedCreationDateTime = Convert.ToInt32(row["loaded_creation_datetime"]); |
1274 | 1272 | ||
@@ -1277,7 +1275,7 @@ namespace OpenSim.Data.MySQL | |||
1277 | else | 1275 | else |
1278 | newSettings.LoadedCreationID = (String) row["loaded_creation_id"]; | 1276 | newSettings.LoadedCreationID = (String) row["loaded_creation_id"]; |
1279 | 1277 | ||
1280 | newSettings.TerrainImageID = new UUID((String)row["map_tile_ID"]); | 1278 | newSettings.TerrainImageID = DBGuid.FromDB(row["map_tile_ID"]); |
1281 | 1279 | ||
1282 | return newSettings; | 1280 | return newSettings; |
1283 | } | 1281 | } |
@@ -1291,7 +1289,7 @@ namespace OpenSim.Data.MySQL | |||
1291 | { | 1289 | { |
1292 | LandData newData = new LandData(); | 1290 | LandData newData = new LandData(); |
1293 | 1291 | ||
1294 | newData.GlobalID = new UUID((String) row["UUID"]); | 1292 | newData.GlobalID = DBGuid.FromDB(row["UUID"]); |
1295 | newData.LocalID = Convert.ToInt32(row["LocalLandID"]); | 1293 | newData.LocalID = Convert.ToInt32(row["LocalLandID"]); |
1296 | 1294 | ||
1297 | // Bitmap is a byte[512] | 1295 | // Bitmap is a byte[512] |
@@ -1299,7 +1297,7 @@ namespace OpenSim.Data.MySQL | |||
1299 | 1297 | ||
1300 | newData.Name = (String) row["Name"]; | 1298 | newData.Name = (String) row["Name"]; |
1301 | newData.Description = (String) row["Description"]; | 1299 | newData.Description = (String) row["Description"]; |
1302 | newData.OwnerID = new UUID((String)row["OwnerUUID"]); | 1300 | newData.OwnerID = DBGuid.FromDB(row["OwnerUUID"]); |
1303 | newData.IsGroupOwned = Convert.ToBoolean(row["IsGroupOwned"]); | 1301 | newData.IsGroupOwned = Convert.ToBoolean(row["IsGroupOwned"]); |
1304 | newData.Area = Convert.ToInt32(row["Area"]); | 1302 | newData.Area = Convert.ToInt32(row["Area"]); |
1305 | newData.AuctionID = Convert.ToUInt32(row["AuctionID"]); //Unimplemented | 1303 | newData.AuctionID = Convert.ToUInt32(row["AuctionID"]); //Unimplemented |
@@ -1307,14 +1305,14 @@ namespace OpenSim.Data.MySQL | |||
1307 | //Enum libsecondlife.Parcel.ParcelCategory | 1305 | //Enum libsecondlife.Parcel.ParcelCategory |
1308 | newData.ClaimDate = Convert.ToInt32(row["ClaimDate"]); | 1306 | newData.ClaimDate = Convert.ToInt32(row["ClaimDate"]); |
1309 | newData.ClaimPrice = Convert.ToInt32(row["ClaimPrice"]); | 1307 | newData.ClaimPrice = Convert.ToInt32(row["ClaimPrice"]); |
1310 | newData.GroupID = new UUID((String) row["GroupUUID"]); | 1308 | newData.GroupID = DBGuid.FromDB(row["GroupUUID"]); |
1311 | newData.SalePrice = Convert.ToInt32(row["SalePrice"]); | 1309 | newData.SalePrice = Convert.ToInt32(row["SalePrice"]); |
1312 | newData.Status = (ParcelStatus) Convert.ToInt32(row["LandStatus"]); | 1310 | newData.Status = (ParcelStatus) Convert.ToInt32(row["LandStatus"]); |
1313 | //Enum. libsecondlife.Parcel.ParcelStatus | 1311 | //Enum. libsecondlife.Parcel.ParcelStatus |
1314 | newData.Flags = Convert.ToUInt32(row["LandFlags"]); | 1312 | newData.Flags = Convert.ToUInt32(row["LandFlags"]); |
1315 | newData.LandingType = Convert.ToByte(row["LandingType"]); | 1313 | newData.LandingType = Convert.ToByte(row["LandingType"]); |
1316 | newData.MediaAutoScale = Convert.ToByte(row["MediaAutoScale"]); | 1314 | newData.MediaAutoScale = Convert.ToByte(row["MediaAutoScale"]); |
1317 | newData.MediaID = new UUID((String) row["MediaTextureUUID"]); | 1315 | newData.MediaID = DBGuid.FromDB(row["MediaTextureUUID"]); |
1318 | newData.MediaURL = (String) row["MediaURL"]; | 1316 | newData.MediaURL = (String) row["MediaURL"]; |
1319 | newData.MusicURL = (String) row["MusicURL"]; | 1317 | newData.MusicURL = (String) row["MusicURL"]; |
1320 | newData.PassHours = Convert.ToSingle(row["PassHours"]); | 1318 | newData.PassHours = Convert.ToSingle(row["PassHours"]); |
@@ -1358,7 +1356,7 @@ namespace OpenSim.Data.MySQL | |||
1358 | private static ParcelManager.ParcelAccessEntry BuildLandAccessData(IDataReader row) | 1356 | private static ParcelManager.ParcelAccessEntry BuildLandAccessData(IDataReader row) |
1359 | { | 1357 | { |
1360 | ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); | 1358 | ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); |
1361 | entry.AgentID = new UUID((string) row["AccessUUID"]); | 1359 | entry.AgentID = DBGuid.FromDB(row["AccessUUID"]); |
1362 | entry.Flags = (AccessList) Convert.ToInt32(row["Flags"]); | 1360 | entry.Flags = (AccessList) Convert.ToInt32(row["Flags"]); |
1363 | entry.Time = new DateTime(); | 1361 | entry.Time = new DateTime(); |
1364 | return entry; | 1362 | return entry; |
diff --git a/OpenSim/Data/MySQL/MySQLMigrations.cs b/OpenSim/Data/MySQL/MySQLMigrations.cs new file mode 100644 index 0000000..81a0e83 --- /dev/null +++ b/OpenSim/Data/MySQL/MySQLMigrations.cs | |||
@@ -0,0 +1,83 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using System.Data; | ||
31 | using System.Data.Common; | ||
32 | using System.IO; | ||
33 | using System.Reflection; | ||
34 | using System.Text.RegularExpressions; | ||
35 | using log4net; | ||
36 | using MySql.Data.MySqlClient; | ||
37 | |||
38 | namespace OpenSim.Data.MySQL | ||
39 | { | ||
40 | /// <summary>This is a MySQL-customized migration processor. The only difference is in how | ||
41 | /// it executes SQL scripts (using MySqlScript instead of MyCommand) | ||
42 | /// | ||
43 | /// </summary> | ||
44 | public class MySqlMigration : Migration | ||
45 | { | ||
46 | public MySqlMigration() | ||
47 | : base() | ||
48 | { | ||
49 | } | ||
50 | |||
51 | public MySqlMigration(DbConnection conn, Assembly assem, string subtype, string type) : | ||
52 | base(conn, assem, subtype, type) | ||
53 | { | ||
54 | } | ||
55 | |||
56 | public MySqlMigration(DbConnection conn, Assembly assem, string type) : | ||
57 | base(conn, assem, type) | ||
58 | { | ||
59 | } | ||
60 | |||
61 | protected override void ExecuteScript(DbConnection conn, string[] script) | ||
62 | { | ||
63 | if (!(conn is MySqlConnection)) | ||
64 | { | ||
65 | base.ExecuteScript(conn, script); | ||
66 | return; | ||
67 | } | ||
68 | |||
69 | MySqlScript scr = new MySqlScript((MySqlConnection)conn); | ||
70 | { | ||
71 | foreach (string sql in script) | ||
72 | { | ||
73 | scr.Query = sql; | ||
74 | scr.Error += delegate(object sender, MySqlScriptErrorEventArgs args) | ||
75 | { | ||
76 | throw new Exception(sql); | ||
77 | }; | ||
78 | scr.Execute(); | ||
79 | } | ||
80 | } | ||
81 | } | ||
82 | } | ||
83 | } | ||
diff --git a/OpenSim/Data/MySQL/MySQLRegionData.cs b/OpenSim/Data/MySQL/MySQLRegionData.cs index aa9a104..c7bddac 100644 --- a/OpenSim/Data/MySQL/MySQLRegionData.cs +++ b/OpenSim/Data/MySQL/MySQLRegionData.cs | |||
@@ -31,6 +31,7 @@ using System.Collections.Generic; | |||
31 | using System.Data; | 31 | using System.Data; |
32 | using OpenMetaverse; | 32 | using OpenMetaverse; |
33 | using OpenSim.Framework; | 33 | using OpenSim.Framework; |
34 | using OpenSim.Data; | ||
34 | using MySql.Data.MySqlClient; | 35 | using MySql.Data.MySqlClient; |
35 | 36 | ||
36 | namespace OpenSim.Data.MySQL | 37 | namespace OpenSim.Data.MySQL |
@@ -143,12 +144,9 @@ namespace OpenSim.Data.MySQL | |||
143 | RegionData ret = new RegionData(); | 144 | RegionData ret = new RegionData(); |
144 | ret.Data = new Dictionary<string, object>(); | 145 | ret.Data = new Dictionary<string, object>(); |
145 | 146 | ||
146 | UUID regionID; | 147 | ret.RegionID = DBGuid.FromDB(result["uuid"]); |
147 | UUID.TryParse(result["uuid"].ToString(), out regionID); | 148 | ret.ScopeID = DBGuid.FromDB(result["ScopeID"]); |
148 | ret.RegionID = regionID; | 149 | |
149 | UUID scope; | ||
150 | UUID.TryParse(result["ScopeID"].ToString(), out scope); | ||
151 | ret.ScopeID = scope; | ||
152 | ret.RegionName = result["regionName"].ToString(); | 150 | ret.RegionName = result["regionName"].ToString(); |
153 | ret.posX = Convert.ToInt32(result["locX"]); | 151 | ret.posX = Convert.ToInt32(result["locX"]); |
154 | ret.posY = Convert.ToInt32(result["locY"]); | 152 | ret.posY = Convert.ToInt32(result["locY"]); |
diff --git a/OpenSim/Data/MySQL/Resources/001_AssetStore.sql b/OpenSim/Data/MySQL/Resources/001_AssetStore.sql deleted file mode 100644 index 6a9a127..0000000 --- a/OpenSim/Data/MySQL/Resources/001_AssetStore.sql +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | CREATE TABLE `assets` ( | ||
4 | `id` binary(16) NOT NULL, | ||
5 | `name` varchar(64) NOT NULL, | ||
6 | `description` varchar(64) NOT NULL, | ||
7 | `assetType` tinyint(4) NOT NULL, | ||
8 | `invType` tinyint(4) NOT NULL, | ||
9 | `local` tinyint(1) NOT NULL, | ||
10 | `temporary` tinyint(1) NOT NULL, | ||
11 | `data` longblob NOT NULL, | ||
12 | PRIMARY KEY (`id`) | ||
13 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1'; | ||
14 | |||
15 | COMMIT; \ No newline at end of file | ||
diff --git a/OpenSim/Data/MySQL/Resources/001_Avatar.sql b/OpenSim/Data/MySQL/Resources/001_Avatar.sql deleted file mode 100644 index 27a3072..0000000 --- a/OpenSim/Data/MySQL/Resources/001_Avatar.sql +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | CREATE TABLE Avatars (PrincipalID CHAR(36) NOT NULL, Name VARCHAR(32) NOT NULL, Value VARCHAR(255) NOT NULL DEFAULT '', PRIMARY KEY(PrincipalID, Name), KEY(PrincipalID)); | ||
4 | |||
5 | COMMIT; | ||
diff --git a/OpenSim/Data/MySQL/Resources/001_Friends.sql b/OpenSim/Data/MySQL/Resources/001_Friends.sql deleted file mode 100644 index e158a2c..0000000 --- a/OpenSim/Data/MySQL/Resources/001_Friends.sql +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | CREATE TABLE `Friends` ( | ||
4 | `PrincipalID` CHAR(36) NOT NULL, | ||
5 | `FriendID` VARCHAR(255) NOT NULL, | ||
6 | `Flags` CHAR(16) NOT NULL DEFAULT '0' | ||
7 | ) ENGINE=InnoDB; | ||
8 | |||
9 | COMMIT; | ||
diff --git a/OpenSim/Data/MySQL/Resources/001_FriendsStore.sql b/OpenSim/Data/MySQL/Resources/001_FriendsStore.sql deleted file mode 100644 index da2c59c..0000000 --- a/OpenSim/Data/MySQL/Resources/001_FriendsStore.sql +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | CREATE TABLE `Friends` (`PrincipalID` CHAR(36) NOT NULL, `Friend` VARCHAR(255) NOT NULL, `Flags` VARCHAR(16) NOT NULL DEFAULT 0, `Offered` VARCHAR(32) NOT NULL DEFAULT 0, PRIMARY KEY(`PrincipalID`, `Friend`), KEY(`PrincipalID`)); | ||
4 | |||
5 | COMMIT; | ||
diff --git a/OpenSim/Data/MySQL/Resources/001_InventoryStore.sql b/OpenSim/Data/MySQL/Resources/001_InventoryStore.sql deleted file mode 100644 index 40dc91c..0000000 --- a/OpenSim/Data/MySQL/Resources/001_InventoryStore.sql +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | CREATE TABLE `inventoryfolders` ( | ||
4 | `folderID` varchar(36) NOT NULL default '', | ||
5 | `agentID` varchar(36) default NULL, | ||
6 | `parentFolderID` varchar(36) default NULL, | ||
7 | `folderName` varchar(64) default NULL, | ||
8 | `type` smallint NOT NULL default 0, | ||
9 | `version` int NOT NULL default 0, | ||
10 | PRIMARY KEY (`folderID`), | ||
11 | KEY `owner` (`agentID`), | ||
12 | KEY `parent` (`parentFolderID`) | ||
13 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
14 | |||
15 | CREATE TABLE `inventoryitems` ( | ||
16 | `inventoryID` varchar(36) NOT NULL default '', | ||
17 | `assetID` varchar(36) default NULL, | ||
18 | `assetType` int(11) default NULL, | ||
19 | `parentFolderID` varchar(36) default NULL, | ||
20 | `avatarID` varchar(36) default NULL, | ||
21 | `inventoryName` varchar(64) default NULL, | ||
22 | `inventoryDescription` varchar(128) default NULL, | ||
23 | `inventoryNextPermissions` int(10) unsigned default NULL, | ||
24 | `inventoryCurrentPermissions` int(10) unsigned default NULL, | ||
25 | `invType` int(11) default NULL, | ||
26 | `creatorID` varchar(36) default NULL, | ||
27 | `inventoryBasePermissions` int(10) unsigned NOT NULL default 0, | ||
28 | `inventoryEveryOnePermissions` int(10) unsigned NOT NULL default 0, | ||
29 | `salePrice` int(11) NOT NULL default 0, | ||
30 | `saleType` tinyint(4) NOT NULL default 0, | ||
31 | `creationDate` int(11) NOT NULL default 0, | ||
32 | `groupID` varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000', | ||
33 | `groupOwned` tinyint(4) NOT NULL default 0, | ||
34 | `flags` int(11) unsigned NOT NULL default 0, | ||
35 | PRIMARY KEY (`inventoryID`), | ||
36 | KEY `owner` (`avatarID`), | ||
37 | KEY `folder` (`parentFolderID`) | ||
38 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
39 | |||
40 | COMMIT; \ No newline at end of file | ||
diff --git a/OpenSim/Data/MySQL/Resources/001_RegionStore.sql b/OpenSim/Data/MySQL/Resources/001_RegionStore.sql deleted file mode 100644 index 31164b3..0000000 --- a/OpenSim/Data/MySQL/Resources/001_RegionStore.sql +++ /dev/null | |||
@@ -1,154 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | CREATE TABLE `prims` ( | ||
4 | `UUID` varchar(255) NOT NULL, | ||
5 | `RegionUUID` varchar(255) default NULL, | ||
6 | `ParentID` int(11) default NULL, | ||
7 | `CreationDate` int(11) default NULL, | ||
8 | `Name` varchar(255) default NULL, | ||
9 | `SceneGroupID` varchar(255) default NULL, | ||
10 | `Text` varchar(255) default NULL, | ||
11 | `Description` varchar(255) default NULL, | ||
12 | `SitName` varchar(255) default NULL, | ||
13 | `TouchName` varchar(255) default NULL, | ||
14 | `ObjectFlags` int(11) default NULL, | ||
15 | `CreatorID` varchar(255) default NULL, | ||
16 | `OwnerID` varchar(255) default NULL, | ||
17 | `GroupID` varchar(255) default NULL, | ||
18 | `LastOwnerID` varchar(255) default NULL, | ||
19 | `OwnerMask` int(11) default NULL, | ||
20 | `NextOwnerMask` int(11) default NULL, | ||
21 | `GroupMask` int(11) default NULL, | ||
22 | `EveryoneMask` int(11) default NULL, | ||
23 | `BaseMask` int(11) default NULL, | ||
24 | `PositionX` float default NULL, | ||
25 | `PositionY` float default NULL, | ||
26 | `PositionZ` float default NULL, | ||
27 | `GroupPositionX` float default NULL, | ||
28 | `GroupPositionY` float default NULL, | ||
29 | `GroupPositionZ` float default NULL, | ||
30 | `VelocityX` float default NULL, | ||
31 | `VelocityY` float default NULL, | ||
32 | `VelocityZ` float default NULL, | ||
33 | `AngularVelocityX` float default NULL, | ||
34 | `AngularVelocityY` float default NULL, | ||
35 | `AngularVelocityZ` float default NULL, | ||
36 | `AccelerationX` float default NULL, | ||
37 | `AccelerationY` float default NULL, | ||
38 | `AccelerationZ` float default NULL, | ||
39 | `RotationX` float default NULL, | ||
40 | `RotationY` float default NULL, | ||
41 | `RotationZ` float default NULL, | ||
42 | `RotationW` float default NULL, | ||
43 | `SitTargetOffsetX` float default NULL, | ||
44 | `SitTargetOffsetY` float default NULL, | ||
45 | `SitTargetOffsetZ` float default NULL, | ||
46 | `SitTargetOrientW` float default NULL, | ||
47 | `SitTargetOrientX` float default NULL, | ||
48 | `SitTargetOrientY` float default NULL, | ||
49 | `SitTargetOrientZ` float default NULL, | ||
50 | PRIMARY KEY (`UUID`) | ||
51 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1; | ||
52 | |||
53 | CREATE TABLE `primshapes` ( | ||
54 | `UUID` varchar(255) NOT NULL, | ||
55 | `Shape` int(11) default NULL, | ||
56 | `ScaleX` float default NULL, | ||
57 | `ScaleY` float default NULL, | ||
58 | `ScaleZ` float default NULL, | ||
59 | `PCode` int(11) default NULL, | ||
60 | `PathBegin` int(11) default NULL, | ||
61 | `PathEnd` int(11) default NULL, | ||
62 | `PathScaleX` int(11) default NULL, | ||
63 | `PathScaleY` int(11) default NULL, | ||
64 | `PathShearX` int(11) default NULL, | ||
65 | `PathShearY` int(11) default NULL, | ||
66 | `PathSkew` int(11) default NULL, | ||
67 | `PathCurve` int(11) default NULL, | ||
68 | `PathRadiusOffset` int(11) default NULL, | ||
69 | `PathRevolutions` int(11) default NULL, | ||
70 | `PathTaperX` int(11) default NULL, | ||
71 | `PathTaperY` int(11) default NULL, | ||
72 | `PathTwist` int(11) default NULL, | ||
73 | `PathTwistBegin` int(11) default NULL, | ||
74 | `ProfileBegin` int(11) default NULL, | ||
75 | `ProfileEnd` int(11) default NULL, | ||
76 | `ProfileCurve` int(11) default NULL, | ||
77 | `ProfileHollow` int(11) default NULL, | ||
78 | `State` int(11) default NULL, | ||
79 | `Texture` longblob, | ||
80 | `ExtraParams` longblob, | ||
81 | PRIMARY KEY (`UUID`) | ||
82 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1; | ||
83 | |||
84 | CREATE TABLE `primitems` ( | ||
85 | `itemID` varchar(255) NOT NULL, | ||
86 | `primID` varchar(255) default NULL, | ||
87 | `assetID` varchar(255) default NULL, | ||
88 | `parentFolderID` varchar(255) default NULL, | ||
89 | `invType` int(11) default NULL, | ||
90 | `assetType` int(11) default NULL, | ||
91 | `name` varchar(255) default NULL, | ||
92 | `description` varchar(255) default NULL, | ||
93 | `creationDate` bigint(20) default NULL, | ||
94 | `creatorID` varchar(255) default NULL, | ||
95 | `ownerID` varchar(255) default NULL, | ||
96 | `lastOwnerID` varchar(255) default NULL, | ||
97 | `groupID` varchar(255) default NULL, | ||
98 | `nextPermissions` int(11) default NULL, | ||
99 | `currentPermissions` int(11) default NULL, | ||
100 | `basePermissions` int(11) default NULL, | ||
101 | `everyonePermissions` int(11) default NULL, | ||
102 | `groupPermissions` int(11) default NULL, | ||
103 | PRIMARY KEY (`itemID`) | ||
104 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1; | ||
105 | |||
106 | CREATE TABLE `terrain` ( | ||
107 | `RegionUUID` varchar(255) default NULL, | ||
108 | `Revision` int(11) default NULL, | ||
109 | `Heightfield` longblob | ||
110 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1; | ||
111 | |||
112 | CREATE TABLE `land` ( | ||
113 | `UUID` varchar(255) NOT NULL, | ||
114 | `RegionUUID` varchar(255) default NULL, | ||
115 | `LocalLandID` int(11) default NULL, | ||
116 | `Bitmap` longblob, | ||
117 | `Name` varchar(255) default NULL, | ||
118 | `Description` varchar(255) default NULL, | ||
119 | `OwnerUUID` varchar(255) default NULL, | ||
120 | `IsGroupOwned` int(11) default NULL, | ||
121 | `Area` int(11) default NULL, | ||
122 | `AuctionID` int(11) default NULL, | ||
123 | `Category` int(11) default NULL, | ||
124 | `ClaimDate` int(11) default NULL, | ||
125 | `ClaimPrice` int(11) default NULL, | ||
126 | `GroupUUID` varchar(255) default NULL, | ||
127 | `SalePrice` int(11) default NULL, | ||
128 | `LandStatus` int(11) default NULL, | ||
129 | `LandFlags` int(11) default NULL, | ||
130 | `LandingType` int(11) default NULL, | ||
131 | `MediaAutoScale` int(11) default NULL, | ||
132 | `MediaTextureUUID` varchar(255) default NULL, | ||
133 | `MediaURL` varchar(255) default NULL, | ||
134 | `MusicURL` varchar(255) default NULL, | ||
135 | `PassHours` float default NULL, | ||
136 | `PassPrice` int(11) default NULL, | ||
137 | `SnapshotUUID` varchar(255) default NULL, | ||
138 | `UserLocationX` float default NULL, | ||
139 | `UserLocationY` float default NULL, | ||
140 | `UserLocationZ` float default NULL, | ||
141 | `UserLookAtX` float default NULL, | ||
142 | `UserLookAtY` float default NULL, | ||
143 | `UserLookAtZ` float default NULL, | ||
144 | `AuthbuyerID` varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000', | ||
145 | PRIMARY KEY (`UUID`) | ||
146 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
147 | |||
148 | CREATE TABLE `landaccesslist` ( | ||
149 | `LandUUID` varchar(255) default NULL, | ||
150 | `AccessUUID` varchar(255) default NULL, | ||
151 | `Flags` int(11) default NULL | ||
152 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1; | ||
153 | |||
154 | COMMIT; \ No newline at end of file | ||
diff --git a/OpenSim/Data/MySQL/Resources/001_UserAccount.sql b/OpenSim/Data/MySQL/Resources/001_UserAccount.sql deleted file mode 100644 index 07da571..0000000 --- a/OpenSim/Data/MySQL/Resources/001_UserAccount.sql +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | CREATE TABLE `UserAccounts` ( | ||
4 | `PrincipalID` CHAR(36) NOT NULL, | ||
5 | `ScopeID` CHAR(36) NOT NULL, | ||
6 | `FirstName` VARCHAR(64) NOT NULL, | ||
7 | `LastName` VARCHAR(64) NOT NULL, | ||
8 | `Email` VARCHAR(64), | ||
9 | `ServiceURLs` TEXT, | ||
10 | `Created` INT(11) | ||
11 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
12 | |||
13 | COMMIT; | ||
diff --git a/OpenSim/Data/MySQL/Resources/002_AssetStore.sql b/OpenSim/Data/MySQL/Resources/002_AssetStore.sql deleted file mode 100644 index a7d7fca..0000000 --- a/OpenSim/Data/MySQL/Resources/002_AssetStore.sql +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE assets change id oldid binary(16); | ||
4 | ALTER TABLE assets add id varchar(36) not null default ''; | ||
5 | UPDATE assets set id = concat(substr(hex(oldid),1,8),"-",substr(hex(oldid),9,4),"-",substr(hex(oldid),13,4),"-",substr(hex(oldid),17,4),"-",substr(hex(oldid),21,12)); | ||
6 | ALTER TABLE assets drop oldid; | ||
7 | ALTER TABLE assets add constraint primary key(id); | ||
8 | |||
9 | COMMIT; \ No newline at end of file | ||
diff --git a/OpenSim/Data/MySQL/Resources/002_AuthStore.sql b/OpenSim/Data/MySQL/Resources/002_AuthStore.sql deleted file mode 100644 index dc7dfe0..0000000 --- a/OpenSim/Data/MySQL/Resources/002_AuthStore.sql +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | INSERT INTO auth (UUID, passwordHash, passwordSalt, webLoginKey) SELECT `UUID` AS UUID, `passwordHash` AS passwordHash, `passwordSalt` AS passwordSalt, `webLoginKey` AS webLoginKey FROM users; | ||
4 | |||
5 | COMMIT; | ||
diff --git a/OpenSim/Data/MySQL/Resources/002_Friends.sql b/OpenSim/Data/MySQL/Resources/002_Friends.sql deleted file mode 100644 index 5ff6438..0000000 --- a/OpenSim/Data/MySQL/Resources/002_Friends.sql +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | INSERT INTO Friends (PrincipalID, FriendID, Flags) SELECT ownerID, friendID, friendPerms FROM userfriends; | ||
4 | |||
5 | COMMIT; | ||
diff --git a/OpenSim/Data/MySQL/Resources/002_FriendsStore.sql b/OpenSim/Data/MySQL/Resources/002_FriendsStore.sql deleted file mode 100644 index a363867..0000000 --- a/OpenSim/Data/MySQL/Resources/002_FriendsStore.sql +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | INSERT INTO `Friends` SELECT `ownerID`, `friendID`, `friendPerms`, 0 FROM `userfriends`; | ||
4 | |||
5 | COMMIT; | ||
diff --git a/OpenSim/Data/MySQL/Resources/002_GridStore.sql b/OpenSim/Data/MySQL/Resources/002_GridStore.sql deleted file mode 100644 index 35b9be1..0000000 --- a/OpenSim/Data/MySQL/Resources/002_GridStore.sql +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE regions add column access integer unsigned default 1; | ||
4 | |||
5 | COMMIT; | ||
diff --git a/OpenSim/Data/MySQL/Resources/002_InventoryStore.sql b/OpenSim/Data/MySQL/Resources/002_InventoryStore.sql deleted file mode 100644 index c161a68..0000000 --- a/OpenSim/Data/MySQL/Resources/002_InventoryStore.sql +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE inventoryfolders change folderID folderIDold varchar(36); | ||
4 | ALTER TABLE inventoryfolders change agentID agentIDold varchar(36); | ||
5 | ALTER TABLE inventoryfolders change parentFolderID parentFolderIDold varchar(36); | ||
6 | ALTER TABLE inventoryfolders add folderID char(36) not null default '00000000-0000-0000-0000-000000000000'; | ||
7 | ALTER TABLE inventoryfolders add agentID char(36) default NULL; | ||
8 | ALTER TABLE inventoryfolders add parentFolderID char(36) default NULL; | ||
9 | UPDATE inventoryfolders set folderID = folderIDold, agentID = agentIDold, parentFolderID = parentFolderIDold; | ||
10 | ALTER TABLE inventoryfolders drop folderIDold; | ||
11 | ALTER TABLE inventoryfolders drop agentIDold; | ||
12 | ALTER TABLE inventoryfolders drop parentFolderIDold; | ||
13 | ALTER TABLE inventoryfolders add constraint primary key(folderID); | ||
14 | ALTER TABLE inventoryfolders add index inventoryfolders_agentid(agentID); | ||
15 | ALTER TABLE inventoryfolders add index inventoryfolders_parentFolderid(parentFolderID); | ||
16 | |||
17 | ALTER TABLE inventoryitems change inventoryID inventoryIDold varchar(36); | ||
18 | ALTER TABLE inventoryitems change avatarID avatarIDold varchar(36); | ||
19 | ALTER TABLE inventoryitems change parentFolderID parentFolderIDold varchar(36); | ||
20 | ALTER TABLE inventoryitems add inventoryID char(36) not null default '00000000-0000-0000-0000-000000000000'; | ||
21 | ALTER TABLE inventoryitems add avatarID char(36) default NULL; | ||
22 | ALTER TABLE inventoryitems add parentFolderID char(36) default NULL; | ||
23 | UPDATE inventoryitems set inventoryID = inventoryIDold, avatarID = avatarIDold, parentFolderID = parentFolderIDold; | ||
24 | ALTER TABLE inventoryitems drop inventoryIDold; | ||
25 | ALTER TABLE inventoryitems drop avatarIDold; | ||
26 | ALTER TABLE inventoryitems drop parentFolderIDold; | ||
27 | ALTER TABLE inventoryitems add constraint primary key(inventoryID); | ||
28 | ALTER TABLE inventoryitems add index inventoryitems_avatarid(avatarID); | ||
29 | ALTER TABLE inventoryitems add index inventoryitems_parentFolderid(parentFolderID); | ||
30 | |||
31 | COMMIT; \ No newline at end of file | ||
diff --git a/OpenSim/Data/MySQL/Resources/002_RegionStore.sql b/OpenSim/Data/MySQL/Resources/002_RegionStore.sql deleted file mode 100644 index 45bf959..0000000 --- a/OpenSim/Data/MySQL/Resources/002_RegionStore.sql +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | CREATE index prims_regionuuid on prims(RegionUUID); | ||
4 | CREATE index primitems_primid on primitems(primID); | ||
5 | |||
6 | COMMIT; \ No newline at end of file | ||
diff --git a/OpenSim/Data/MySQL/Resources/002_UserAccount.sql b/OpenSim/Data/MySQL/Resources/002_UserAccount.sql deleted file mode 100644 index ad2ddda..0000000 --- a/OpenSim/Data/MySQL/Resources/002_UserAccount.sql +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | INSERT INTO UserAccounts (PrincipalID, ScopeID, FirstName, LastName, Email, ServiceURLs, Created) SELECT `UUID` AS PrincipalID, '00000000-0000-0000-0000-000000000000' AS ScopeID, username AS FirstName, lastname AS LastName, email as Email, CONCAT('AssetServerURI=', userAssetURI, ' InventoryServerURI=', userInventoryURI, ' GatewayURI= HomeURI=') AS ServiceURLs, created as Created FROM users; | ||
4 | |||
5 | COMMIT; | ||
diff --git a/OpenSim/Data/MySQL/Resources/002_UserStore.sql b/OpenSim/Data/MySQL/Resources/002_UserStore.sql deleted file mode 100644 index 393cea0..0000000 --- a/OpenSim/Data/MySQL/Resources/002_UserStore.sql +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE users add homeRegionID char(36) NOT NULL default '00000000-0000-0000-0000-000000000000'; | ||
4 | |||
5 | COMMIT; | ||
diff --git a/OpenSim/Data/MySQL/Resources/003_AssetStore.sql b/OpenSim/Data/MySQL/Resources/003_AssetStore.sql deleted file mode 100644 index d489278..0000000 --- a/OpenSim/Data/MySQL/Resources/003_AssetStore.sql +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE assets change id oldid varchar(36); | ||
4 | ALTER TABLE assets add id char(36) not null default '00000000-0000-0000-0000-000000000000'; | ||
5 | UPDATE assets set id = oldid; | ||
6 | ALTER TABLE assets drop oldid; | ||
7 | ALTER TABLE assets add constraint primary key(id); | ||
8 | |||
9 | COMMIT; \ No newline at end of file | ||
diff --git a/OpenSim/Data/MySQL/Resources/003_AuthStore.sql b/OpenSim/Data/MySQL/Resources/003_AuthStore.sql deleted file mode 100644 index af9ffe6..0000000 --- a/OpenSim/Data/MySQL/Resources/003_AuthStore.sql +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE `auth` ADD COLUMN `accountType` VARCHAR(32) NOT NULL DEFAULT 'UserAccount'; | ||
4 | |||
5 | COMMIT; | ||
diff --git a/OpenSim/Data/MySQL/Resources/003_GridStore.sql b/OpenSim/Data/MySQL/Resources/003_GridStore.sql deleted file mode 100644 index bc3fe7d..0000000 --- a/OpenSim/Data/MySQL/Resources/003_GridStore.sql +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE regions add column ScopeID char(36) not null default '00000000-0000-0000-0000-000000000000'; | ||
4 | |||
5 | create index ScopeID on regions(ScopeID); | ||
6 | |||
7 | COMMIT; | ||
diff --git a/OpenSim/Data/MySQL/Resources/003_InventoryStore.sql b/OpenSim/Data/MySQL/Resources/003_InventoryStore.sql deleted file mode 100644 index 4c6da91..0000000 --- a/OpenSim/Data/MySQL/Resources/003_InventoryStore.sql +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | alter table inventoryitems add column inventoryGroupPermissions integer unsigned not null default 0; | ||
4 | |||
5 | COMMIT; | ||
diff --git a/OpenSim/Data/MySQL/Resources/003_RegionStore.sql b/OpenSim/Data/MySQL/Resources/003_RegionStore.sql deleted file mode 100644 index cb0a614..0000000 --- a/OpenSim/Data/MySQL/Resources/003_RegionStore.sql +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | CREATE TABLE regionban (regionUUID VARCHAR(36) NOT NULL, bannedUUID VARCHAR(36) NOT NULL, bannedIp VARCHAR(16) NOT NULL, bannedIpHostMask VARCHAR(16) NOT NULL) ENGINE=INNODB DEFAULT CHARSET=utf8 COMMENT='Rev. 1'; | ||
4 | |||
5 | COMMIT; \ No newline at end of file | ||
diff --git a/OpenSim/Data/MySQL/Resources/003_UserAccount.sql b/OpenSim/Data/MySQL/Resources/003_UserAccount.sql deleted file mode 100644 index e42d93b..0000000 --- a/OpenSim/Data/MySQL/Resources/003_UserAccount.sql +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | CREATE UNIQUE INDEX PrincipalID ON UserAccounts(PrincipalID); | ||
4 | CREATE INDEX Email ON UserAccounts(Email); | ||
5 | CREATE INDEX FirstName ON UserAccounts(FirstName); | ||
6 | CREATE INDEX LastName ON UserAccounts(LastName); | ||
7 | CREATE INDEX Name ON UserAccounts(FirstName,LastName); | ||
8 | |||
9 | COMMIT; | ||
diff --git a/OpenSim/Data/MySQL/Resources/003_UserStore.sql b/OpenSim/Data/MySQL/Resources/003_UserStore.sql deleted file mode 100644 index 6f890ee..0000000 --- a/OpenSim/Data/MySQL/Resources/003_UserStore.sql +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE users add userFlags integer NOT NULL default 0; | ||
4 | ALTER TABLE users add godLevel integer NOT NULL default 0; | ||
5 | |||
6 | COMMIT; | ||
diff --git a/OpenSim/Data/MySQL/Resources/004_AssetStore.sql b/OpenSim/Data/MySQL/Resources/004_AssetStore.sql deleted file mode 100644 index ae1951d..0000000 --- a/OpenSim/Data/MySQL/Resources/004_AssetStore.sql +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE assets drop InvType; | ||
4 | |||
5 | COMMIT; | ||
diff --git a/OpenSim/Data/MySQL/Resources/004_GridStore.sql b/OpenSim/Data/MySQL/Resources/004_GridStore.sql deleted file mode 100644 index 2238a88..0000000 --- a/OpenSim/Data/MySQL/Resources/004_GridStore.sql +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE regions add column sizeX integer not null default 0; | ||
4 | ALTER TABLE regions add column sizeY integer not null default 0; | ||
5 | |||
6 | COMMIT; | ||
diff --git a/OpenSim/Data/MySQL/Resources/004_InventoryStore.sql b/OpenSim/Data/MySQL/Resources/004_InventoryStore.sql deleted file mode 100644 index c45f773..0000000 --- a/OpenSim/Data/MySQL/Resources/004_InventoryStore.sql +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | update inventoryitems set creatorID = '00000000-0000-0000-0000-000000000000' where creatorID is NULL; | ||
4 | update inventoryitems set creatorID = '00000000-0000-0000-0000-000000000000' where creatorID = ''; | ||
5 | alter table inventoryitems modify column creatorID varchar(36) not NULL default '00000000-0000-0000-0000-000000000000'; | ||
6 | |||
7 | COMMIT; | ||
diff --git a/OpenSim/Data/MySQL/Resources/004_RegionStore.sql b/OpenSim/Data/MySQL/Resources/004_RegionStore.sql deleted file mode 100644 index 4db2f75..0000000 --- a/OpenSim/Data/MySQL/Resources/004_RegionStore.sql +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE primitems add flags integer not null default 0; | ||
4 | |||
5 | COMMIT; \ No newline at end of file | ||
diff --git a/OpenSim/Data/MySQL/Resources/004_UserAccount.sql b/OpenSim/Data/MySQL/Resources/004_UserAccount.sql deleted file mode 100644 index 8abcd53..0000000 --- a/OpenSim/Data/MySQL/Resources/004_UserAccount.sql +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE UserAccounts ADD COLUMN UserLevel integer NOT NULL DEFAULT 0; | ||
4 | ALTER TABLE UserAccounts ADD COLUMN UserFlags integer NOT NULL DEFAULT 0; | ||
5 | ALTER TABLE UserAccounts ADD COLUMN UserTitle varchar(64) NOT NULL DEFAULT ''; | ||
6 | |||
7 | COMMIT; | ||
8 | |||
diff --git a/OpenSim/Data/MySQL/Resources/004_UserStore.sql b/OpenSim/Data/MySQL/Resources/004_UserStore.sql deleted file mode 100644 index 03142af..0000000 --- a/OpenSim/Data/MySQL/Resources/004_UserStore.sql +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE users add customType varchar(32) not null default ''; | ||
4 | ALTER TABLE users add partner char(36) not null default '00000000-0000-0000-0000-000000000000'; | ||
5 | |||
6 | COMMIT; | ||
diff --git a/OpenSim/Data/MySQL/Resources/005_AssetStore.sql b/OpenSim/Data/MySQL/Resources/005_AssetStore.sql deleted file mode 100644 index bfeb652..0000000 --- a/OpenSim/Data/MySQL/Resources/005_AssetStore.sql +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE assets add create_time integer default 0; | ||
4 | ALTER TABLE assets add access_time integer default 0; | ||
5 | |||
6 | COMMIT; | ||
diff --git a/OpenSim/Data/MySQL/Resources/005_GridStore.sql b/OpenSim/Data/MySQL/Resources/005_GridStore.sql deleted file mode 100644 index 835ba89..0000000 --- a/OpenSim/Data/MySQL/Resources/005_GridStore.sql +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE `regions` ADD COLUMN `flags` integer NOT NULL DEFAULT 0; | ||
4 | CREATE INDEX flags ON regions(flags); | ||
5 | |||
6 | COMMIT; | ||
diff --git a/OpenSim/Data/MySQL/Resources/005_RegionStore.sql b/OpenSim/Data/MySQL/Resources/005_RegionStore.sql deleted file mode 100644 index c4a9527..0000000 --- a/OpenSim/Data/MySQL/Resources/005_RegionStore.sql +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | create table regionsettings ( | ||
4 | regionUUID char(36) not null, | ||
5 | block_terraform integer not null, | ||
6 | block_fly integer not null, | ||
7 | allow_damage integer not null, | ||
8 | restrict_pushing integer not null, | ||
9 | allow_land_resell integer not null, | ||
10 | allow_land_join_divide integer not null, | ||
11 | block_show_in_search integer not null, | ||
12 | agent_limit integer not null, | ||
13 | object_bonus float not null, | ||
14 | maturity integer not null, | ||
15 | disable_scripts integer not null, | ||
16 | disable_collisions integer not null, | ||
17 | disable_physics integer not null, | ||
18 | terrain_texture_1 char(36) not null, | ||
19 | terrain_texture_2 char(36) not null, | ||
20 | terrain_texture_3 char(36) not null, | ||
21 | terrain_texture_4 char(36) not null, | ||
22 | elevation_1_nw float not null, | ||
23 | elevation_2_nw float not null, | ||
24 | elevation_1_ne float not null, | ||
25 | elevation_2_ne float not null, | ||
26 | elevation_1_se float not null, | ||
27 | elevation_2_se float not null, | ||
28 | elevation_1_sw float not null, | ||
29 | elevation_2_sw float not null, | ||
30 | water_height float not null, | ||
31 | terrain_raise_limit float not null, | ||
32 | terrain_lower_limit float not null, | ||
33 | use_estate_sun integer not null, | ||
34 | fixed_sun integer not null, | ||
35 | sun_position float not null, | ||
36 | covenant char(36), | ||
37 | primary key(regionUUID) | ||
38 | ); | ||
39 | |||
40 | COMMIT; | ||
diff --git a/OpenSim/Data/MySQL/Resources/005_UserStore.sql b/OpenSim/Data/MySQL/Resources/005_UserStore.sql deleted file mode 100644 index 55896bc..0000000 --- a/OpenSim/Data/MySQL/Resources/005_UserStore.sql +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | CREATE TABLE `avatarattachments` (`UUID` char(36) NOT NULL, `attachpoint` int(11) NOT NULL, `item` char(36) NOT NULL, `asset` char(36) NOT NULL) ENGINE=InnoDB; | ||
4 | |||
5 | COMMIT; | ||
diff --git a/OpenSim/Data/MySQL/Resources/006_AssetStore.sql b/OpenSim/Data/MySQL/Resources/006_AssetStore.sql deleted file mode 100644 index 3104353..0000000 --- a/OpenSim/Data/MySQL/Resources/006_AssetStore.sql +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | DELETE FROM assets WHERE id = 'dc4b9f0b-d008-45c6-96a4-01dd947ac621' | ||
diff --git a/OpenSim/Data/MySQL/Resources/006_GridStore.sql b/OpenSim/Data/MySQL/Resources/006_GridStore.sql deleted file mode 100644 index 91322d6..0000000 --- a/OpenSim/Data/MySQL/Resources/006_GridStore.sql +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE `regions` ADD COLUMN `last_seen` integer NOT NULL DEFAULT 0; | ||
4 | |||
5 | COMMIT; | ||
diff --git a/OpenSim/Data/MySQL/Resources/006_RegionStore.sql b/OpenSim/Data/MySQL/Resources/006_RegionStore.sql deleted file mode 100644 index c1ba5b8..0000000 --- a/OpenSim/Data/MySQL/Resources/006_RegionStore.sql +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | alter table landaccesslist ENGINE = InnoDB; | ||
4 | alter table migrations ENGINE = InnoDB; | ||
5 | alter table primitems ENGINE = InnoDB; | ||
6 | alter table prims ENGINE = InnoDB; | ||
7 | alter table primshapes ENGINE = InnoDB; | ||
8 | alter table regionsettings ENGINE = InnoDB; | ||
9 | alter table terrain ENGINE = InnoDB; | ||
10 | |||
11 | COMMIT; | ||
12 | |||
diff --git a/OpenSim/Data/MySQL/Resources/006_UserStore.sql b/OpenSim/Data/MySQL/Resources/006_UserStore.sql deleted file mode 100644 index 10b321e..0000000 --- a/OpenSim/Data/MySQL/Resources/006_UserStore.sql +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE agents add currentLookAt varchar(36) not null default ''; | ||
4 | |||
5 | COMMIT; | ||
diff --git a/OpenSim/Data/MySQL/Resources/007_AssetStore.sql b/OpenSim/Data/MySQL/Resources/007_AssetStore.sql deleted file mode 100644 index f06121a..0000000 --- a/OpenSim/Data/MySQL/Resources/007_AssetStore.sql +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE assets ADD COLUMN asset_flags INTEGER NOT NULL DEFAULT 0; | ||
4 | |||
5 | COMMIT; | ||
diff --git a/OpenSim/Data/MySQL/Resources/007_GridStore.sql b/OpenSim/Data/MySQL/Resources/007_GridStore.sql deleted file mode 100644 index dbec584..0000000 --- a/OpenSim/Data/MySQL/Resources/007_GridStore.sql +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE `regions` ADD COLUMN `PrincipalID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000'; | ||
4 | ALTER TABLE `regions` ADD COLUMN `Token` varchar(255) NOT NULL; | ||
5 | |||
6 | COMMIT; | ||
7 | |||
diff --git a/OpenSim/Data/MySQL/Resources/007_RegionStore.sql b/OpenSim/Data/MySQL/Resources/007_RegionStore.sql deleted file mode 100644 index 404d248..0000000 --- a/OpenSim/Data/MySQL/Resources/007_RegionStore.sql +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE prims change UUID UUIDold varchar(255); | ||
4 | ALTER TABLE prims change RegionUUID RegionUUIDold varchar(255); | ||
5 | ALTER TABLE prims change CreatorID CreatorIDold varchar(255); | ||
6 | ALTER TABLE prims change OwnerID OwnerIDold varchar(255); | ||
7 | ALTER TABLE prims change GroupID GroupIDold varchar(255); | ||
8 | ALTER TABLE prims change LastOwnerID LastOwnerIDold varchar(255); | ||
9 | ALTER TABLE prims add UUID char(36); | ||
10 | ALTER TABLE prims add RegionUUID char(36); | ||
11 | ALTER TABLE prims add CreatorID char(36); | ||
12 | ALTER TABLE prims add OwnerID char(36); | ||
13 | ALTER TABLE prims add GroupID char(36); | ||
14 | ALTER TABLE prims add LastOwnerID char(36); | ||
15 | UPDATE prims set UUID = UUIDold, RegionUUID = RegionUUIDold, CreatorID = CreatorIDold, OwnerID = OwnerIDold, GroupID = GroupIDold, LastOwnerID = LastOwnerIDold; | ||
16 | ALTER TABLE prims drop UUIDold; | ||
17 | ALTER TABLE prims drop RegionUUIDold; | ||
18 | ALTER TABLE prims drop CreatorIDold; | ||
19 | ALTER TABLE prims drop OwnerIDold; | ||
20 | ALTER TABLE prims drop GroupIDold; | ||
21 | ALTER TABLE prims drop LastOwnerIDold; | ||
22 | ALTER TABLE prims add constraint primary key(UUID); | ||
23 | ALTER TABLE prims add index prims_regionuuid(RegionUUID); | ||
24 | |||
25 | COMMIT; \ No newline at end of file | ||
diff --git a/OpenSim/Data/MySQL/Resources/007_UserStore.sql b/OpenSim/Data/MySQL/Resources/007_UserStore.sql deleted file mode 100644 index 3ab5261..0000000 --- a/OpenSim/Data/MySQL/Resources/007_UserStore.sql +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE users add email varchar(250); | ||
4 | |||
5 | COMMIT; | ||
diff --git a/OpenSim/Data/MySQL/Resources/008_RegionStore.sql b/OpenSim/Data/MySQL/Resources/008_RegionStore.sql deleted file mode 100644 index 7bc61c0..0000000 --- a/OpenSim/Data/MySQL/Resources/008_RegionStore.sql +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE primshapes change UUID UUIDold varchar(255); | ||
4 | ALTER TABLE primshapes add UUID char(36); | ||
5 | UPDATE primshapes set UUID = UUIDold; | ||
6 | ALTER TABLE primshapes drop UUIDold; | ||
7 | ALTER TABLE primshapes add constraint primary key(UUID); | ||
8 | |||
9 | COMMIT; \ No newline at end of file | ||
diff --git a/OpenSim/Data/MySQL/Resources/008_UserStore.sql b/OpenSim/Data/MySQL/Resources/008_UserStore.sql deleted file mode 100644 index 4500bd5..0000000 --- a/OpenSim/Data/MySQL/Resources/008_UserStore.sql +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE users add scopeID char(36) not null default '00000000-0000-0000-0000-000000000000'; | ||
4 | |||
5 | COMMIT; | ||
diff --git a/OpenSim/Data/MySQL/Resources/009_RegionStore.sql b/OpenSim/Data/MySQL/Resources/009_RegionStore.sql deleted file mode 100644 index 284732a..0000000 --- a/OpenSim/Data/MySQL/Resources/009_RegionStore.sql +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE primitems change itemID itemIDold varchar(255); | ||
4 | ALTER TABLE primitems change primID primIDold varchar(255); | ||
5 | ALTER TABLE primitems change assetID assetIDold varchar(255); | ||
6 | ALTER TABLE primitems change parentFolderID parentFolderIDold varchar(255); | ||
7 | ALTER TABLE primitems change creatorID creatorIDold varchar(255); | ||
8 | ALTER TABLE primitems change ownerID ownerIDold varchar(255); | ||
9 | ALTER TABLE primitems change groupID groupIDold varchar(255); | ||
10 | ALTER TABLE primitems change lastOwnerID lastOwnerIDold varchar(255); | ||
11 | ALTER TABLE primitems add itemID char(36); | ||
12 | ALTER TABLE primitems add primID char(36); | ||
13 | ALTER TABLE primitems add assetID char(36); | ||
14 | ALTER TABLE primitems add parentFolderID char(36); | ||
15 | ALTER TABLE primitems add creatorID char(36); | ||
16 | ALTER TABLE primitems add ownerID char(36); | ||
17 | ALTER TABLE primitems add groupID char(36); | ||
18 | ALTER TABLE primitems add lastOwnerID char(36); | ||
19 | UPDATE primitems set itemID = itemIDold, primID = primIDold, assetID = assetIDold, parentFolderID = parentFolderIDold, creatorID = creatorIDold, ownerID = ownerIDold, groupID = groupIDold, lastOwnerID = lastOwnerIDold; | ||
20 | ALTER TABLE primitems drop itemIDold; | ||
21 | ALTER TABLE primitems drop primIDold; | ||
22 | ALTER TABLE primitems drop assetIDold; | ||
23 | ALTER TABLE primitems drop parentFolderIDold; | ||
24 | ALTER TABLE primitems drop creatorIDold; | ||
25 | ALTER TABLE primitems drop ownerIDold; | ||
26 | ALTER TABLE primitems drop groupIDold; | ||
27 | ALTER TABLE primitems drop lastOwnerIDold; | ||
28 | ALTER TABLE primitems add constraint primary key(itemID); | ||
29 | ALTER TABLE primitems add index primitems_primid(primID); | ||
30 | |||
31 | COMMIT; \ No newline at end of file | ||
diff --git a/OpenSim/Data/MySQL/Resources/010_RegionStore.sql b/OpenSim/Data/MySQL/Resources/010_RegionStore.sql deleted file mode 100644 index 031a746..0000000 --- a/OpenSim/Data/MySQL/Resources/010_RegionStore.sql +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | # 1 "010_RegionStore.sql" | ||
2 | # 1 "<built-in>" | ||
3 | # 1 "<command line>" | ||
4 | # 1 "010_RegionStore.sql" | ||
5 | BEGIN; | ||
6 | |||
7 | DELETE FROM regionsettings; | ||
8 | |||
9 | COMMIT; | ||
diff --git a/OpenSim/Data/MySQL/Resources/011_RegionStore.sql b/OpenSim/Data/MySQL/Resources/011_RegionStore.sql deleted file mode 100644 index ab01969..0000000 --- a/OpenSim/Data/MySQL/Resources/011_RegionStore.sql +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE prims change SceneGroupID SceneGroupIDold varchar(255); | ||
4 | ALTER TABLE prims add SceneGroupID char(36); | ||
5 | UPDATE prims set SceneGroupID = SceneGroupIDold; | ||
6 | ALTER TABLE prims drop SceneGroupIDold; | ||
7 | ALTER TABLE prims add index prims_scenegroupid(SceneGroupID); | ||
8 | |||
9 | COMMIT; \ No newline at end of file | ||
diff --git a/OpenSim/Data/MySQL/Resources/012_RegionStore.sql b/OpenSim/Data/MySQL/Resources/012_RegionStore.sql deleted file mode 100644 index 95c2757..0000000 --- a/OpenSim/Data/MySQL/Resources/012_RegionStore.sql +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE prims add index prims_parentid(ParentID); | ||
4 | |||
5 | COMMIT; \ No newline at end of file | ||
diff --git a/OpenSim/Data/MySQL/Resources/013_RegionStore.sql b/OpenSim/Data/MySQL/Resources/013_RegionStore.sql deleted file mode 100644 index a6bd30d..0000000 --- a/OpenSim/Data/MySQL/Resources/013_RegionStore.sql +++ /dev/null | |||
@@ -1,103 +0,0 @@ | |||
1 | begin; | ||
2 | |||
3 | drop table regionsettings; | ||
4 | |||
5 | CREATE TABLE `regionsettings` ( | ||
6 | `regionUUID` char(36) NOT NULL, | ||
7 | `block_terraform` int(11) NOT NULL, | ||
8 | `block_fly` int(11) NOT NULL, | ||
9 | `allow_damage` int(11) NOT NULL, | ||
10 | `restrict_pushing` int(11) NOT NULL, | ||
11 | `allow_land_resell` int(11) NOT NULL, | ||
12 | `allow_land_join_divide` int(11) NOT NULL, | ||
13 | `block_show_in_search` int(11) NOT NULL, | ||
14 | `agent_limit` int(11) NOT NULL, | ||
15 | `object_bonus` float NOT NULL, | ||
16 | `maturity` int(11) NOT NULL, | ||
17 | `disable_scripts` int(11) NOT NULL, | ||
18 | `disable_collisions` int(11) NOT NULL, | ||
19 | `disable_physics` int(11) NOT NULL, | ||
20 | `terrain_texture_1` char(36) NOT NULL, | ||
21 | `terrain_texture_2` char(36) NOT NULL, | ||
22 | `terrain_texture_3` char(36) NOT NULL, | ||
23 | `terrain_texture_4` char(36) NOT NULL, | ||
24 | `elevation_1_nw` float NOT NULL, | ||
25 | `elevation_2_nw` float NOT NULL, | ||
26 | `elevation_1_ne` float NOT NULL, | ||
27 | `elevation_2_ne` float NOT NULL, | ||
28 | `elevation_1_se` float NOT NULL, | ||
29 | `elevation_2_se` float NOT NULL, | ||
30 | `elevation_1_sw` float NOT NULL, | ||
31 | `elevation_2_sw` float NOT NULL, | ||
32 | `water_height` float NOT NULL, | ||
33 | `terrain_raise_limit` float NOT NULL, | ||
34 | `terrain_lower_limit` float NOT NULL, | ||
35 | `use_estate_sun` int(11) NOT NULL, | ||
36 | `fixed_sun` int(11) NOT NULL, | ||
37 | `sun_position` float NOT NULL, | ||
38 | `covenant` char(36) default NULL, | ||
39 | `Sandbox` tinyint(4) NOT NULL, | ||
40 | PRIMARY KEY (`regionUUID`) | ||
41 | ) ENGINE=InnoDB; | ||
42 | |||
43 | CREATE TABLE `estate_managers` ( | ||
44 | `EstateID` int(10) unsigned NOT NULL, | ||
45 | `uuid` char(36) NOT NULL, | ||
46 | KEY `EstateID` (`EstateID`) | ||
47 | ) ENGINE=InnoDB; | ||
48 | |||
49 | CREATE TABLE `estate_groups` ( | ||
50 | `EstateID` int(10) unsigned NOT NULL, | ||
51 | `uuid` char(36) NOT NULL, | ||
52 | KEY `EstateID` (`EstateID`) | ||
53 | ) ENGINE=InnoDB; | ||
54 | |||
55 | CREATE TABLE `estate_users` ( | ||
56 | `EstateID` int(10) unsigned NOT NULL, | ||
57 | `uuid` char(36) NOT NULL, | ||
58 | KEY `EstateID` (`EstateID`) | ||
59 | ) ENGINE=InnoDB; | ||
60 | |||
61 | CREATE TABLE `estateban` ( | ||
62 | `EstateID` int(10) unsigned NOT NULL, | ||
63 | `bannedUUID` varchar(36) NOT NULL, | ||
64 | `bannedIp` varchar(16) NOT NULL, | ||
65 | `bannedIpHostMask` varchar(16) NOT NULL, | ||
66 | `bannedNameMask` varchar(64) default NULL, | ||
67 | KEY `estateban_EstateID` (`EstateID`) | ||
68 | ) ENGINE=InnoDB; | ||
69 | |||
70 | CREATE TABLE `estate_settings` ( | ||
71 | `EstateID` int(10) unsigned NOT NULL auto_increment, | ||
72 | `EstateName` varchar(64) default NULL, | ||
73 | `AbuseEmailToEstateOwner` tinyint(4) NOT NULL, | ||
74 | `DenyAnonymous` tinyint(4) NOT NULL, | ||
75 | `ResetHomeOnTeleport` tinyint(4) NOT NULL, | ||
76 | `FixedSun` tinyint(4) NOT NULL, | ||
77 | `DenyTransacted` tinyint(4) NOT NULL, | ||
78 | `BlockDwell` tinyint(4) NOT NULL, | ||
79 | `DenyIdentified` tinyint(4) NOT NULL, | ||
80 | `AllowVoice` tinyint(4) NOT NULL, | ||
81 | `UseGlobalTime` tinyint(4) NOT NULL, | ||
82 | `PricePerMeter` int(11) NOT NULL, | ||
83 | `TaxFree` tinyint(4) NOT NULL, | ||
84 | `AllowDirectTeleport` tinyint(4) NOT NULL, | ||
85 | `RedirectGridX` int(11) NOT NULL, | ||
86 | `RedirectGridY` int(11) NOT NULL, | ||
87 | `ParentEstateID` int(10) unsigned NOT NULL, | ||
88 | `SunPosition` double NOT NULL, | ||
89 | `EstateSkipScripts` tinyint(4) NOT NULL, | ||
90 | `BillableFactor` float NOT NULL, | ||
91 | `PublicAccess` tinyint(4) NOT NULL, | ||
92 | PRIMARY KEY (`EstateID`) | ||
93 | ) ENGINE=InnoDB AUTO_INCREMENT=100; | ||
94 | |||
95 | CREATE TABLE `estate_map` ( | ||
96 | `RegionID` char(36) NOT NULL default '00000000-0000-0000-0000-000000000000', | ||
97 | `EstateID` int(11) NOT NULL, | ||
98 | PRIMARY KEY (`RegionID`), | ||
99 | KEY `EstateID` (`EstateID`) | ||
100 | ) ENGINE=InnoDB; | ||
101 | |||
102 | commit; | ||
103 | |||
diff --git a/OpenSim/Data/MySQL/Resources/014_RegionStore.sql b/OpenSim/Data/MySQL/Resources/014_RegionStore.sql deleted file mode 100644 index 788fd63..0000000 --- a/OpenSim/Data/MySQL/Resources/014_RegionStore.sql +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | begin; | ||
2 | |||
3 | alter table estate_settings add column AbuseEmail varchar(255) not null; | ||
4 | |||
5 | alter table estate_settings add column EstateOwner varchar(36) not null; | ||
6 | |||
7 | commit; | ||
8 | |||
diff --git a/OpenSim/Data/MySQL/Resources/015_RegionStore.sql b/OpenSim/Data/MySQL/Resources/015_RegionStore.sql deleted file mode 100644 index 6d4f9f3..0000000 --- a/OpenSim/Data/MySQL/Resources/015_RegionStore.sql +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | begin; | ||
2 | |||
3 | alter table estate_settings add column DenyMinors tinyint not null; | ||
4 | |||
5 | commit; | ||
6 | |||
diff --git a/OpenSim/Data/MySQL/Resources/016_RegionStore.sql b/OpenSim/Data/MySQL/Resources/016_RegionStore.sql deleted file mode 100644 index 9bc265e..0000000 --- a/OpenSim/Data/MySQL/Resources/016_RegionStore.sql +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE prims ADD COLUMN PayPrice integer not null default 0; | ||
4 | ALTER TABLE prims ADD COLUMN PayButton1 integer not null default 0; | ||
5 | ALTER TABLE prims ADD COLUMN PayButton2 integer not null default 0; | ||
6 | ALTER TABLE prims ADD COLUMN PayButton3 integer not null default 0; | ||
7 | ALTER TABLE prims ADD COLUMN PayButton4 integer not null default 0; | ||
8 | ALTER TABLE prims ADD COLUMN LoopedSound char(36) not null default '00000000-0000-0000-0000-000000000000'; | ||
9 | ALTER TABLE prims ADD COLUMN LoopedSoundGain float not null default 0.0; | ||
10 | ALTER TABLE prims ADD COLUMN TextureAnimation blob; | ||
11 | ALTER TABLE prims ADD COLUMN OmegaX float not null default 0.0; | ||
12 | ALTER TABLE prims ADD COLUMN OmegaY float not null default 0.0; | ||
13 | ALTER TABLE prims ADD COLUMN OmegaZ float not null default 0.0; | ||
14 | ALTER TABLE prims ADD COLUMN CameraEyeOffsetX float not null default 0.0; | ||
15 | ALTER TABLE prims ADD COLUMN CameraEyeOffsetY float not null default 0.0; | ||
16 | ALTER TABLE prims ADD COLUMN CameraEyeOffsetZ float not null default 0.0; | ||
17 | ALTER TABLE prims ADD COLUMN CameraAtOffsetX float not null default 0.0; | ||
18 | ALTER TABLE prims ADD COLUMN CameraAtOffsetY float not null default 0.0; | ||
19 | ALTER TABLE prims ADD COLUMN CameraAtOffsetZ float not null default 0.0; | ||
20 | ALTER TABLE prims ADD COLUMN ForceMouselook tinyint not null default 0; | ||
21 | ALTER TABLE prims ADD COLUMN ScriptAccessPin integer not null default 0; | ||
22 | ALTER TABLE prims ADD COLUMN AllowedDrop tinyint not null default 0; | ||
23 | ALTER TABLE prims ADD COLUMN DieAtEdge tinyint not null default 0; | ||
24 | ALTER TABLE prims ADD COLUMN SalePrice integer not null default 10; | ||
25 | ALTER TABLE prims ADD COLUMN SaleType tinyint not null default 0; | ||
26 | |||
27 | COMMIT; | ||
diff --git a/OpenSim/Data/MySQL/Resources/017_RegionStore.sql b/OpenSim/Data/MySQL/Resources/017_RegionStore.sql deleted file mode 100644 index 0304f30..0000000 --- a/OpenSim/Data/MySQL/Resources/017_RegionStore.sql +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE prims ADD COLUMN ColorR integer not null default 0; | ||
4 | ALTER TABLE prims ADD COLUMN ColorG integer not null default 0; | ||
5 | ALTER TABLE prims ADD COLUMN ColorB integer not null default 0; | ||
6 | ALTER TABLE prims ADD COLUMN ColorA integer not null default 0; | ||
7 | ALTER TABLE prims ADD COLUMN ParticleSystem blob; | ||
8 | |||
9 | COMMIT; | ||
diff --git a/OpenSim/Data/MySQL/Resources/018_RegionStore.sql b/OpenSim/Data/MySQL/Resources/018_RegionStore.sql deleted file mode 100644 index 68c489c..0000000 --- a/OpenSim/Data/MySQL/Resources/018_RegionStore.sql +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | begin; | ||
2 | |||
3 | ALTER TABLE prims ADD COLUMN ClickAction tinyint NOT NULL default 0; | ||
4 | |||
5 | commit; | ||
6 | |||
diff --git a/OpenSim/Data/MySQL/Resources/019_RegionStore.sql b/OpenSim/Data/MySQL/Resources/019_RegionStore.sql deleted file mode 100644 index 4c14f2a..0000000 --- a/OpenSim/Data/MySQL/Resources/019_RegionStore.sql +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | begin; | ||
2 | |||
3 | ALTER TABLE prims ADD COLUMN Material tinyint NOT NULL default 3; | ||
4 | |||
5 | commit; | ||
6 | |||
diff --git a/OpenSim/Data/MySQL/Resources/020_RegionStore.sql b/OpenSim/Data/MySQL/Resources/020_RegionStore.sql deleted file mode 100644 index 814ef48..0000000 --- a/OpenSim/Data/MySQL/Resources/020_RegionStore.sql +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | begin; | ||
2 | |||
3 | ALTER TABLE land ADD COLUMN OtherCleanTime integer NOT NULL default 0; | ||
4 | ALTER TABLE land ADD COLUMN Dwell integer NOT NULL default 0; | ||
5 | |||
6 | commit; | ||
7 | |||
diff --git a/OpenSim/Data/MySQL/Resources/021_RegionStore.sql b/OpenSim/Data/MySQL/Resources/021_RegionStore.sql deleted file mode 100644 index c59b27e..0000000 --- a/OpenSim/Data/MySQL/Resources/021_RegionStore.sql +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | begin; | ||
2 | |||
3 | ALTER TABLE regionsettings ADD COLUMN sunvectorx double NOT NULL default 0; | ||
4 | ALTER TABLE regionsettings ADD COLUMN sunvectory double NOT NULL default 0; | ||
5 | ALTER TABLE regionsettings ADD COLUMN sunvectorz double NOT NULL default 0; | ||
6 | |||
7 | commit; | ||
8 | |||
diff --git a/OpenSim/Data/MySQL/Resources/022_RegionStore.sql b/OpenSim/Data/MySQL/Resources/022_RegionStore.sql deleted file mode 100644 index df0bb7d..0000000 --- a/OpenSim/Data/MySQL/Resources/022_RegionStore.sql +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE prims ADD COLUMN CollisionSound char(36) not null default '00000000-0000-0000-0000-000000000000'; | ||
4 | ALTER TABLE prims ADD COLUMN CollisionSoundVolume float not null default 0.0; | ||
5 | |||
6 | COMMIT; | ||
diff --git a/OpenSim/Data/MySQL/Resources/023_RegionStore.sql b/OpenSim/Data/MySQL/Resources/023_RegionStore.sql deleted file mode 100644 index 559591f..0000000 --- a/OpenSim/Data/MySQL/Resources/023_RegionStore.sql +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE prims ADD COLUMN LinkNumber integer not null default 0; | ||
4 | |||
5 | COMMIT; | ||
6 | |||
diff --git a/OpenSim/Data/MySQL/Resources/024_RegionStore.sql b/OpenSim/Data/MySQL/Resources/024_RegionStore.sql deleted file mode 100644 index defbf5c..0000000 --- a/OpenSim/Data/MySQL/Resources/024_RegionStore.sql +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | alter table regionsettings change column `object_bonus` `object_bonus` double NOT NULL; | ||
4 | alter table regionsettings change column `elevation_1_nw` `elevation_1_nw` double NOT NULL; | ||
5 | alter table regionsettings change column `elevation_2_nw` `elevation_2_nw` double NOT NULL; | ||
6 | alter table regionsettings change column `elevation_1_ne` `elevation_1_ne` double NOT NULL; | ||
7 | alter table regionsettings change column `elevation_2_ne` `elevation_2_ne` double NOT NULL; | ||
8 | alter table regionsettings change column `elevation_1_se` `elevation_1_se` double NOT NULL; | ||
9 | alter table regionsettings change column `elevation_2_se` `elevation_2_se` double NOT NULL; | ||
10 | alter table regionsettings change column `elevation_1_sw` `elevation_1_sw` double NOT NULL; | ||
11 | alter table regionsettings change column `elevation_2_sw` `elevation_2_sw` double NOT NULL; | ||
12 | alter table regionsettings change column `water_height` `water_height` double NOT NULL; | ||
13 | alter table regionsettings change column `terrain_raise_limit` `terrain_raise_limit` double NOT NULL; | ||
14 | alter table regionsettings change column `terrain_lower_limit` `terrain_lower_limit` double NOT NULL; | ||
15 | alter table regionsettings change column `sun_position` `sun_position` double NOT NULL; | ||
16 | |||
17 | COMMIT; | ||
18 | |||
diff --git a/OpenSim/Data/MySQL/Resources/025_RegionStore.sql b/OpenSim/Data/MySQL/Resources/025_RegionStore.sql deleted file mode 100644 index e8f5d70..0000000 --- a/OpenSim/Data/MySQL/Resources/025_RegionStore.sql +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | alter table prims change column `PositionX` `PositionX` double default NULL; | ||
4 | alter table prims change column `PositionY` `PositionY` double default NULL; | ||
5 | alter table prims change column `PositionZ` `PositionZ` double default NULL; | ||
6 | alter table prims change column `GroupPositionX` `GroupPositionX` double default NULL; | ||
7 | alter table prims change column `GroupPositionY` `GroupPositionY` double default NULL; | ||
8 | alter table prims change column `GroupPositionZ` `GroupPositionZ` double default NULL; | ||
9 | alter table prims change column `VelocityX` `VelocityX` double default NULL; | ||
10 | alter table prims change column `VelocityY` `VelocityY` double default NULL; | ||
11 | alter table prims change column `VelocityZ` `VelocityZ` double default NULL; | ||
12 | alter table prims change column `AngularVelocityX` `AngularVelocityX` double default NULL; | ||
13 | alter table prims change column `AngularVelocityY` `AngularVelocityY` double default NULL; | ||
14 | alter table prims change column `AngularVelocityZ` `AngularVelocityZ` double default NULL; | ||
15 | alter table prims change column `AccelerationX` `AccelerationX` double default NULL; | ||
16 | alter table prims change column `AccelerationY` `AccelerationY` double default NULL; | ||
17 | alter table prims change column `AccelerationZ` `AccelerationZ` double default NULL; | ||
18 | alter table prims change column `RotationX` `RotationX` double default NULL; | ||
19 | alter table prims change column `RotationY` `RotationY` double default NULL; | ||
20 | alter table prims change column `RotationZ` `RotationZ` double default NULL; | ||
21 | alter table prims change column `RotationW` `RotationW` double default NULL; | ||
22 | alter table prims change column `SitTargetOffsetX` `SitTargetOffsetX` double default NULL; | ||
23 | alter table prims change column `SitTargetOffsetY` `SitTargetOffsetY` double default NULL; | ||
24 | alter table prims change column `SitTargetOffsetZ` `SitTargetOffsetZ` double default NULL; | ||
25 | alter table prims change column `SitTargetOrientW` `SitTargetOrientW` double default NULL; | ||
26 | alter table prims change column `SitTargetOrientX` `SitTargetOrientX` double default NULL; | ||
27 | alter table prims change column `SitTargetOrientY` `SitTargetOrientY` double default NULL; | ||
28 | alter table prims change column `SitTargetOrientZ` `SitTargetOrientZ` double default NULL; | ||
29 | alter table prims change column `LoopedSoundGain` `LoopedSoundGain` double NOT NULL default '0'; | ||
30 | alter table prims change column `OmegaX` `OmegaX` double NOT NULL default '0'; | ||
31 | alter table prims change column `OmegaY` `OmegaY` double NOT NULL default '0'; | ||
32 | alter table prims change column `OmegaZ` `OmegaZ` double NOT NULL default '0'; | ||
33 | alter table prims change column `CameraEyeOffsetX` `CameraEyeOffsetX` double NOT NULL default '0'; | ||
34 | alter table prims change column `CameraEyeOffsetY` `CameraEyeOffsetY` double NOT NULL default '0'; | ||
35 | alter table prims change column `CameraEyeOffsetZ` `CameraEyeOffsetZ` double NOT NULL default '0'; | ||
36 | alter table prims change column `CameraAtOffsetX` `CameraAtOffsetX` double NOT NULL default '0'; | ||
37 | alter table prims change column `CameraAtOffsetY` `CameraAtOffsetY` double NOT NULL default '0'; | ||
38 | alter table prims change column `CameraAtOffsetZ` `CameraAtOffsetZ` double NOT NULL default '0'; | ||
39 | alter table prims change column `CollisionSoundVolume` `CollisionSoundVolume` double NOT NULL default '0'; | ||
40 | |||
41 | alter table primshapes change column `ScaleX` `ScaleX` double NOT NULL default '0'; | ||
42 | alter table primshapes change column `ScaleY` `ScaleY` double NOT NULL default '0'; | ||
43 | alter table primshapes change column `ScaleZ` `ScaleZ` double NOT NULL default '0'; | ||
44 | |||
45 | COMMIT; | ||
46 | |||
diff --git a/OpenSim/Data/MySQL/Resources/026_RegionStore.sql b/OpenSim/Data/MySQL/Resources/026_RegionStore.sql deleted file mode 100644 index 91af8a8..0000000 --- a/OpenSim/Data/MySQL/Resources/026_RegionStore.sql +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | begin; | ||
2 | |||
3 | alter table prims change column `PositionX` `PositionX` double default NULL; | ||
4 | alter table prims change column `PositionY` `PositionY` double default NULL; | ||
5 | alter table prims change column `PositionZ` `PositionZ` double default NULL; | ||
6 | alter table prims change column `GroupPositionX` `GroupPositionX` double default NULL; | ||
7 | alter table prims change column `GroupPositionY` `GroupPositionY` double default NULL; | ||
8 | alter table prims change column `GroupPositionZ` `GroupPositionZ` double default NULL; | ||
9 | alter table prims change column `VelocityX` `VelocityX` double default NULL; | ||
10 | alter table prims change column `VelocityY` `VelocityY` double default NULL; | ||
11 | alter table prims change column `VelocityZ` `VelocityZ` double default NULL; | ||
12 | alter table prims change column `AngularVelocityX` `AngularVelocityX` double default NULL; | ||
13 | alter table prims change column `AngularVelocityY` `AngularVelocityY` double default NULL; | ||
14 | alter table prims change column `AngularVelocityZ` `AngularVelocityZ` double default NULL; | ||
15 | alter table prims change column `AccelerationX` `AccelerationX` double default NULL; | ||
16 | alter table prims change column `AccelerationY` `AccelerationY` double default NULL; | ||
17 | alter table prims change column `AccelerationZ` `AccelerationZ` double default NULL; | ||
18 | alter table prims change column `RotationX` `RotationX` double default NULL; | ||
19 | alter table prims change column `RotationY` `RotationY` double default NULL; | ||
20 | alter table prims change column `RotationZ` `RotationZ` double default NULL; | ||
21 | alter table prims change column `RotationW` `RotationW` double default NULL; | ||
22 | alter table prims change column `SitTargetOffsetX` `SitTargetOffsetX` double default NULL; | ||
23 | alter table prims change column `SitTargetOffsetY` `SitTargetOffsetY` double default NULL; | ||
24 | alter table prims change column `SitTargetOffsetZ` `SitTargetOffsetZ` double default NULL; | ||
25 | alter table prims change column `SitTargetOrientW` `SitTargetOrientW` double default NULL; | ||
26 | alter table prims change column `SitTargetOrientX` `SitTargetOrientX` double default NULL; | ||
27 | alter table prims change column `SitTargetOrientY` `SitTargetOrientY` double default NULL; | ||
28 | alter table prims change column `SitTargetOrientZ` `SitTargetOrientZ` double default NULL; | ||
29 | alter table prims change column `LoopedSoundGain` `LoopedSoundGain` double NOT NULL default '0'; | ||
30 | alter table prims change column `OmegaX` `OmegaX` double NOT NULL default '0'; | ||
31 | alter table prims change column `OmegaY` `OmegaY` double NOT NULL default '0'; | ||
32 | alter table prims change column `OmegaZ` `OmegaZ` double NOT NULL default '0'; | ||
33 | alter table prims change column `CameraEyeOffsetX` `CameraEyeOffsetX` double NOT NULL default '0'; | ||
34 | alter table prims change column `CameraEyeOffsetY` `CameraEyeOffsetY` double NOT NULL default '0'; | ||
35 | alter table prims change column `CameraEyeOffsetZ` `CameraEyeOffsetZ` double NOT NULL default '0'; | ||
36 | alter table prims change column `CameraAtOffsetX` `CameraAtOffsetX` double NOT NULL default '0'; | ||
37 | alter table prims change column `CameraAtOffsetY` `CameraAtOffsetY` double NOT NULL default '0'; | ||
38 | alter table prims change column `CameraAtOffsetZ` `CameraAtOffsetZ` double NOT NULL default '0'; | ||
39 | alter table prims change column `CollisionSoundVolume` `CollisionSoundVolume` double NOT NULL default '0'; | ||
40 | |||
41 | commit; | ||
diff --git a/OpenSim/Data/MySQL/Resources/027_RegionStore.sql b/OpenSim/Data/MySQL/Resources/027_RegionStore.sql deleted file mode 100644 index e1efab3..0000000 --- a/OpenSim/Data/MySQL/Resources/027_RegionStore.sql +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE prims DROP COLUMN ParentID; | ||
4 | |||
5 | COMMIT; \ No newline at end of file | ||
diff --git a/OpenSim/Data/MySQL/Resources/028_RegionStore.sql b/OpenSim/Data/MySQL/Resources/028_RegionStore.sql deleted file mode 100644 index 078394f..0000000 --- a/OpenSim/Data/MySQL/Resources/028_RegionStore.sql +++ /dev/null | |||
@@ -1,79 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | update terrain | ||
4 | set RegionUUID = concat(substr(RegionUUID, 1, 8), "-", substr(RegionUUID, 9, 4), "-", substr(RegionUUID, 13, 4), "-", substr(RegionUUID, 17, 4), "-", substr(RegionUUID, 21, 12)) | ||
5 | where RegionUUID not like '%-%'; | ||
6 | |||
7 | |||
8 | update landaccesslist | ||
9 | set LandUUID = concat(substr(LandUUID, 1, 8), "-", substr(LandUUID, 9, 4), "-", substr(LandUUID, 13, 4), "-", substr(LandUUID, 17, 4), "-", substr(LandUUID, 21, 12)) | ||
10 | where LandUUID not like '%-%'; | ||
11 | |||
12 | update landaccesslist | ||
13 | set AccessUUID = concat(substr(AccessUUID, 1, 8), "-", substr(AccessUUID, 9, 4), "-", substr(AccessUUID, 13, 4), "-", substr(AccessUUID, 17, 4), "-", substr(AccessUUID, 21, 12)) | ||
14 | where AccessUUID not like '%-%'; | ||
15 | |||
16 | |||
17 | update prims | ||
18 | set UUID = concat(substr(UUID, 1, 8), "-", substr(UUID, 9, 4), "-", substr(UUID, 13, 4), "-", substr(UUID, 17, 4), "-", substr(UUID, 21, 12)) | ||
19 | where UUID not like '%-%'; | ||
20 | |||
21 | update prims | ||
22 | set RegionUUID = concat(substr(RegionUUID, 1, 8), "-", substr(RegionUUID, 9, 4), "-", substr(RegionUUID, 13, 4), "-", substr(RegionUUID, 17, 4), "-", substr(RegionUUID, 21, 12)) | ||
23 | where RegionUUID not like '%-%'; | ||
24 | |||
25 | update prims | ||
26 | set SceneGroupID = concat(substr(SceneGroupID, 1, 8), "-", substr(SceneGroupID, 9, 4), "-", substr(SceneGroupID, 13, 4), "-", substr(SceneGroupID, 17, 4), "-", substr(SceneGroupID, 21, 12)) | ||
27 | where SceneGroupID not like '%-%'; | ||
28 | |||
29 | update prims | ||
30 | set CreatorID = concat(substr(CreatorID, 1, 8), "-", substr(CreatorID, 9, 4), "-", substr(CreatorID, 13, 4), "-", substr(CreatorID, 17, 4), "-", substr(CreatorID, 21, 12)) | ||
31 | where CreatorID not like '%-%'; | ||
32 | |||
33 | update prims | ||
34 | set OwnerID = concat(substr(OwnerID, 1, 8), "-", substr(OwnerID, 9, 4), "-", substr(OwnerID, 13, 4), "-", substr(OwnerID, 17, 4), "-", substr(OwnerID, 21, 12)) | ||
35 | where OwnerID not like '%-%'; | ||
36 | |||
37 | update prims | ||
38 | set GroupID = concat(substr(GroupID, 1, 8), "-", substr(GroupID, 9, 4), "-", substr(GroupID, 13, 4), "-", substr(GroupID, 17, 4), "-", substr(GroupID, 21, 12)) | ||
39 | where GroupID not like '%-%'; | ||
40 | |||
41 | update prims | ||
42 | set LastOwnerID = concat(substr(LastOwnerID, 1, 8), "-", substr(LastOwnerID, 9, 4), "-", substr(LastOwnerID, 13, 4), "-", substr(LastOwnerID, 17, 4), "-", substr(LastOwnerID, 21, 12)) | ||
43 | where LastOwnerID not like '%-%'; | ||
44 | |||
45 | |||
46 | update primshapes | ||
47 | set UUID = concat(substr(UUID, 1, 8), "-", substr(UUID, 9, 4), "-", substr(UUID, 13, 4), "-", substr(UUID, 17, 4), "-", substr(UUID, 21, 12)) | ||
48 | where UUID not like '%-%'; | ||
49 | |||
50 | |||
51 | update land | ||
52 | set UUID = concat(substr(UUID, 1, 8), "-", substr(UUID, 9, 4), "-", substr(UUID, 13, 4), "-", substr(UUID, 17, 4), "-", substr(UUID, 21, 12)) | ||
53 | where UUID not like '%-%'; | ||
54 | |||
55 | update land | ||
56 | set RegionUUID = concat(substr(RegionUUID, 1, 8), "-", substr(RegionUUID, 9, 4), "-", substr(RegionUUID, 13, 4), "-", substr(RegionUUID, 17, 4), "-", substr(RegionUUID, 21, 12)) | ||
57 | where RegionUUID not like '%-%'; | ||
58 | |||
59 | update land | ||
60 | set OwnerUUID = concat(substr(OwnerUUID, 1, 8), "-", substr(OwnerUUID, 9, 4), "-", substr(OwnerUUID, 13, 4), "-", substr(OwnerUUID, 17, 4), "-", substr(OwnerUUID, 21, 12)) | ||
61 | where OwnerUUID not like '%-%'; | ||
62 | |||
63 | update land | ||
64 | set GroupUUID = concat(substr(GroupUUID, 1, 8), "-", substr(GroupUUID, 9, 4), "-", substr(GroupUUID, 13, 4), "-", substr(GroupUUID, 17, 4), "-", substr(GroupUUID, 21, 12)) | ||
65 | where GroupUUID not like '%-%'; | ||
66 | |||
67 | update land | ||
68 | set MediaTextureUUID = concat(substr(MediaTextureUUID, 1, 8), "-", substr(MediaTextureUUID, 9, 4), "-", substr(MediaTextureUUID, 13, 4), "-", substr(MediaTextureUUID, 17, 4), "-", substr(MediaTextureUUID, 21, 12)) | ||
69 | where MediaTextureUUID not like '%-%'; | ||
70 | |||
71 | update land | ||
72 | set SnapshotUUID = concat(substr(SnapshotUUID, 1, 8), "-", substr(SnapshotUUID, 9, 4), "-", substr(SnapshotUUID, 13, 4), "-", substr(SnapshotUUID, 17, 4), "-", substr(SnapshotUUID, 21, 12)) | ||
73 | where SnapshotUUID not like '%-%'; | ||
74 | |||
75 | update land | ||
76 | set AuthbuyerID = concat(substr(AuthbuyerID, 1, 8), "-", substr(AuthbuyerID, 9, 4), "-", substr(AuthbuyerID, 13, 4), "-", substr(AuthbuyerID, 17, 4), "-", substr(AuthbuyerID, 21, 12)) | ||
77 | where AuthbuyerID not like '%-%'; | ||
78 | |||
79 | COMMIT; \ No newline at end of file | ||
diff --git a/OpenSim/Data/MySQL/Resources/029_RegionStore.sql b/OpenSim/Data/MySQL/Resources/029_RegionStore.sql deleted file mode 100644 index b5962a2..0000000 --- a/OpenSim/Data/MySQL/Resources/029_RegionStore.sql +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE prims ADD COLUMN PassTouches tinyint not null default 0; | ||
4 | |||
5 | COMMIT; | ||
diff --git a/OpenSim/Data/MySQL/Resources/030_RegionStore.sql b/OpenSim/Data/MySQL/Resources/030_RegionStore.sql deleted file mode 100644 index dfdcf6d..0000000 --- a/OpenSim/Data/MySQL/Resources/030_RegionStore.sql +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE regionsettings ADD COLUMN loaded_creation_date varchar(20) default NULL; | ||
4 | ALTER TABLE regionsettings ADD COLUMN loaded_creation_time varchar(20) default NULL; | ||
5 | ALTER TABLE regionsettings ADD COLUMN loaded_creation_id varchar(64) default NULL; | ||
6 | |||
7 | COMMIT; | ||
diff --git a/OpenSim/Data/MySQL/Resources/031_RegionStore.sql b/OpenSim/Data/MySQL/Resources/031_RegionStore.sql deleted file mode 100644 index d069296..0000000 --- a/OpenSim/Data/MySQL/Resources/031_RegionStore.sql +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE regionsettings DROP COLUMN loaded_creation_date; | ||
4 | ALTER TABLE regionsettings DROP COLUMN loaded_creation_time; | ||
5 | ALTER TABLE regionsettings ADD COLUMN loaded_creation_datetime int unsigned NOT NULL default 0; | ||
6 | |||
7 | COMMIT; | ||
diff --git a/OpenSim/Data/MySQL/Resources/032_RegionStore.sql b/OpenSim/Data/MySQL/Resources/032_RegionStore.sql deleted file mode 100644 index 02ac1f5..0000000 --- a/OpenSim/Data/MySQL/Resources/032_RegionStore.sql +++ /dev/null | |||
@@ -1,71 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | CREATE TABLE `regionwindlight` ( | ||
4 | `region_id` varchar(36) NOT NULL DEFAULT '000000-0000-0000-0000-000000000000', | ||
5 | `water_color_r` float(9,6) unsigned NOT NULL DEFAULT '4.000000', | ||
6 | `water_color_g` float(9,6) unsigned NOT NULL DEFAULT '38.000000', | ||
7 | `water_color_b` float(9,6) unsigned NOT NULL DEFAULT '64.000000', | ||
8 | `water_fog_density_exponent` float(3,1) unsigned NOT NULL DEFAULT '4.0', | ||
9 | `underwater_fog_modifier` float(3,2) unsigned NOT NULL DEFAULT '0.25', | ||
10 | `reflection_wavelet_scale_1` float(3,1) unsigned NOT NULL DEFAULT '2.0', | ||
11 | `reflection_wavelet_scale_2` float(3,1) unsigned NOT NULL DEFAULT '2.0', | ||
12 | `reflection_wavelet_scale_3` float(3,1) unsigned NOT NULL DEFAULT '2.0', | ||
13 | `fresnel_scale` float(3,2) unsigned NOT NULL DEFAULT '0.40', | ||
14 | `fresnel_offset` float(3,2) unsigned NOT NULL DEFAULT '0.50', | ||
15 | `refract_scale_above` float(3,2) unsigned NOT NULL DEFAULT '0.03', | ||
16 | `refract_scale_below` float(3,2) unsigned NOT NULL DEFAULT '0.20', | ||
17 | `blur_multiplier` float(4,3) unsigned NOT NULL DEFAULT '0.040', | ||
18 | `big_wave_direction_x` float(3,2) NOT NULL DEFAULT '1.05', | ||
19 | `big_wave_direction_y` float(3,2) NOT NULL DEFAULT '-0.42', | ||
20 | `little_wave_direction_x` float(3,2) NOT NULL DEFAULT '1.11', | ||
21 | `little_wave_direction_y` float(3,2) NOT NULL DEFAULT '-1.16', | ||
22 | `normal_map_texture` varchar(36) NOT NULL DEFAULT '822ded49-9a6c-f61c-cb89-6df54f42cdf4', | ||
23 | `horizon_r` float(3,2) unsigned NOT NULL DEFAULT '0.25', | ||
24 | `horizon_g` float(3,2) unsigned NOT NULL DEFAULT '0.25', | ||
25 | `horizon_b` float(3,2) unsigned NOT NULL DEFAULT '0.32', | ||
26 | `horizon_i` float(3,2) unsigned NOT NULL DEFAULT '0.32', | ||
27 | `haze_horizon` float(3,2) unsigned NOT NULL DEFAULT '0.19', | ||
28 | `blue_density_r` float(3,2) unsigned NOT NULL DEFAULT '0.12', | ||
29 | `blue_density_g` float(3,2) unsigned NOT NULL DEFAULT '0.22', | ||
30 | `blue_density_b` float(3,2) unsigned NOT NULL DEFAULT '0.38', | ||
31 | `blue_density_i` float(3,2) unsigned NOT NULL DEFAULT '0.38', | ||
32 | `haze_density` float(3,2) unsigned NOT NULL DEFAULT '0.70', | ||
33 | `density_multiplier` float(3,2) unsigned NOT NULL DEFAULT '0.18', | ||
34 | `distance_multiplier` float(4,1) unsigned NOT NULL DEFAULT '0.8', | ||
35 | `max_altitude` int(4) unsigned NOT NULL DEFAULT '1605', | ||
36 | `sun_moon_color_r` float(3,2) unsigned NOT NULL DEFAULT '0.24', | ||
37 | `sun_moon_color_g` float(3,2) unsigned NOT NULL DEFAULT '0.26', | ||
38 | `sun_moon_color_b` float(3,2) unsigned NOT NULL DEFAULT '0.30', | ||
39 | `sun_moon_color_i` float(3,2) unsigned NOT NULL DEFAULT '0.30', | ||
40 | `sun_moon_position` float(4,3) unsigned NOT NULL DEFAULT '0.317', | ||
41 | `ambient_r` float(3,2) unsigned NOT NULL DEFAULT '0.35', | ||
42 | `ambient_g` float(3,2) unsigned NOT NULL DEFAULT '0.35', | ||
43 | `ambient_b` float(3,2) unsigned NOT NULL DEFAULT '0.35', | ||
44 | `ambient_i` float(3,2) unsigned NOT NULL DEFAULT '0.35', | ||
45 | `east_angle` float(3,2) unsigned NOT NULL DEFAULT '0.00', | ||
46 | `sun_glow_focus` float(3,2) unsigned NOT NULL DEFAULT '0.10', | ||
47 | `sun_glow_size` float(3,2) unsigned NOT NULL DEFAULT '1.75', | ||
48 | `scene_gamma` float(4,2) unsigned NOT NULL DEFAULT '1.00', | ||
49 | `star_brightness` float(3,2) unsigned NOT NULL DEFAULT '0.00', | ||
50 | `cloud_color_r` float(3,2) unsigned NOT NULL DEFAULT '0.41', | ||
51 | `cloud_color_g` float(3,2) unsigned NOT NULL DEFAULT '0.41', | ||
52 | `cloud_color_b` float(3,2) unsigned NOT NULL DEFAULT '0.41', | ||
53 | `cloud_color_i` float(3,2) unsigned NOT NULL DEFAULT '0.41', | ||
54 | `cloud_x` float(3,2) unsigned NOT NULL DEFAULT '1.00', | ||
55 | `cloud_y` float(3,2) unsigned NOT NULL DEFAULT '0.53', | ||
56 | `cloud_density` float(3,2) unsigned NOT NULL DEFAULT '1.00', | ||
57 | `cloud_coverage` float(3,2) unsigned NOT NULL DEFAULT '0.27', | ||
58 | `cloud_scale` float(3,2) unsigned NOT NULL DEFAULT '0.42', | ||
59 | `cloud_detail_x` float(3,2) unsigned NOT NULL DEFAULT '1.00', | ||
60 | `cloud_detail_y` float(3,2) unsigned NOT NULL DEFAULT '0.53', | ||
61 | `cloud_detail_density` float(3,2) unsigned NOT NULL DEFAULT '0.12', | ||
62 | `cloud_scroll_x` float(3,2) unsigned NOT NULL DEFAULT '0.20', | ||
63 | `cloud_scroll_x_lock` tinyint(1) unsigned NOT NULL DEFAULT '0', | ||
64 | `cloud_scroll_y` float(3,2) unsigned NOT NULL DEFAULT '0.01', | ||
65 | `cloud_scroll_y_lock` tinyint(1) unsigned NOT NULL DEFAULT '0', | ||
66 | `draw_classic_clouds` tinyint(1) unsigned NOT NULL DEFAULT '1', | ||
67 | PRIMARY KEY (`region_id`) | ||
68 | ); | ||
69 | |||
70 | ALTER TABLE estate_settings AUTO_INCREMENT = 100; | ||
71 | COMMIT; | ||
diff --git a/OpenSim/Data/MySQL/Resources/033_RegionStore.sql b/OpenSim/Data/MySQL/Resources/033_RegionStore.sql deleted file mode 100644 index 2832b41..0000000 --- a/OpenSim/Data/MySQL/Resources/033_RegionStore.sql +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | BEGIN; | ||
2 | ALTER TABLE regionsettings ADD map_tile_ID CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000'; | ||
3 | COMMIT; | ||
diff --git a/OpenSim/Data/MySQL/Resources/AssetStore.migrations b/OpenSim/Data/MySQL/Resources/AssetStore.migrations new file mode 100644 index 0000000..3fd58b7 --- /dev/null +++ b/OpenSim/Data/MySQL/Resources/AssetStore.migrations | |||
@@ -0,0 +1,77 @@ | |||
1 | # ----------------- | ||
2 | :VERSION 1 | ||
3 | |||
4 | BEGIN; | ||
5 | |||
6 | CREATE TABLE `assets` ( | ||
7 | `id` binary(16) NOT NULL, | ||
8 | `name` varchar(64) NOT NULL, | ||
9 | `description` varchar(64) NOT NULL, | ||
10 | `assetType` tinyint(4) NOT NULL, | ||
11 | `invType` tinyint(4) NOT NULL, | ||
12 | `local` tinyint(1) NOT NULL, | ||
13 | `temporary` tinyint(1) NOT NULL, | ||
14 | `data` longblob NOT NULL, | ||
15 | PRIMARY KEY (`id`) | ||
16 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1'; | ||
17 | |||
18 | COMMIT; | ||
19 | |||
20 | # ----------------- | ||
21 | :VERSION 2 | ||
22 | |||
23 | BEGIN; | ||
24 | |||
25 | ALTER TABLE assets change id oldid binary(16); | ||
26 | ALTER TABLE assets add id varchar(36) not null default ''; | ||
27 | UPDATE assets set id = concat(substr(hex(oldid),1,8),"-",substr(hex(oldid),9,4),"-",substr(hex(oldid),13,4),"-",substr(hex(oldid),17,4),"-",substr(hex(oldid),21,12)); | ||
28 | ALTER TABLE assets drop oldid; | ||
29 | ALTER TABLE assets add constraint primary key(id); | ||
30 | |||
31 | COMMIT; | ||
32 | |||
33 | # ----------------- | ||
34 | :VERSION 3 | ||
35 | |||
36 | BEGIN; | ||
37 | |||
38 | ALTER TABLE assets change id oldid varchar(36); | ||
39 | ALTER TABLE assets add id char(36) not null default '00000000-0000-0000-0000-000000000000'; | ||
40 | UPDATE assets set id = oldid; | ||
41 | ALTER TABLE assets drop oldid; | ||
42 | ALTER TABLE assets add constraint primary key(id); | ||
43 | |||
44 | COMMIT; | ||
45 | |||
46 | # ----------------- | ||
47 | :VERSION 4 | ||
48 | |||
49 | BEGIN; | ||
50 | |||
51 | ALTER TABLE assets drop InvType; | ||
52 | |||
53 | COMMIT; | ||
54 | |||
55 | # ----------------- | ||
56 | :VERSION 5 | ||
57 | |||
58 | BEGIN; | ||
59 | |||
60 | ALTER TABLE assets add create_time integer default 0; | ||
61 | ALTER TABLE assets add access_time integer default 0; | ||
62 | |||
63 | COMMIT; | ||
64 | |||
65 | # ----------------- | ||
66 | :VERSION 6 | ||
67 | |||
68 | DELETE FROM assets WHERE id = 'dc4b9f0b-d008-45c6-96a4-01dd947ac621' | ||
69 | |||
70 | :VERSION 7 | ||
71 | |||
72 | ALTER TABLE assets ADD COLUMN asset_flags INTEGER NOT NULL DEFAULT 0; | ||
73 | |||
74 | :VERSION 8 | ||
75 | |||
76 | alter table assets add CreatorID varchar(36) not null default '' | ||
77 | |||
diff --git a/OpenSim/Data/MySQL/Resources/001_AuthStore.sql b/OpenSim/Data/MySQL/Resources/AuthStore.migrations index c7e16fb..023c786 100644 --- a/OpenSim/Data/MySQL/Resources/001_AuthStore.sql +++ b/OpenSim/Data/MySQL/Resources/AuthStore.migrations | |||
@@ -1,3 +1,5 @@ | |||
1 | :VERSION 1 # ------------------------------- | ||
2 | |||
1 | begin; | 3 | begin; |
2 | 4 | ||
3 | CREATE TABLE `auth` ( | 5 | CREATE TABLE `auth` ( |
@@ -19,3 +21,19 @@ CREATE TABLE `tokens` ( | |||
19 | ) ENGINE=InnoDB; | 21 | ) ENGINE=InnoDB; |
20 | 22 | ||
21 | commit; | 23 | commit; |
24 | |||
25 | :VERSION 2 # ------------------------------- | ||
26 | |||
27 | BEGIN; | ||
28 | |||
29 | INSERT INTO auth (UUID, passwordHash, passwordSalt, webLoginKey) SELECT `UUID` AS UUID, `passwordHash` AS passwordHash, `passwordSalt` AS passwordSalt, `webLoginKey` AS webLoginKey FROM users; | ||
30 | |||
31 | COMMIT; | ||
32 | |||
33 | :VERSION 3 # ------------------------------- | ||
34 | |||
35 | BEGIN; | ||
36 | |||
37 | ALTER TABLE `auth` ADD COLUMN `accountType` VARCHAR(32) NOT NULL DEFAULT 'UserAccount'; | ||
38 | |||
39 | COMMIT; | ||
diff --git a/OpenSim/Data/MySQL/Resources/Avatar.migrations b/OpenSim/Data/MySQL/Resources/Avatar.migrations new file mode 100644 index 0000000..8d0eee6 --- /dev/null +++ b/OpenSim/Data/MySQL/Resources/Avatar.migrations | |||
@@ -0,0 +1,12 @@ | |||
1 | :VERSION 1 | ||
2 | |||
3 | BEGIN; | ||
4 | |||
5 | CREATE TABLE Avatars ( | ||
6 | PrincipalID CHAR(36) NOT NULL, | ||
7 | Name VARCHAR(32) NOT NULL, | ||
8 | Value VARCHAR(255) NOT NULL DEFAULT '', | ||
9 | PRIMARY KEY(PrincipalID, Name), | ||
10 | KEY(PrincipalID)); | ||
11 | |||
12 | COMMIT; | ||
diff --git a/OpenSim/Data/MySQL/Resources/FriendsStore.migrations b/OpenSim/Data/MySQL/Resources/FriendsStore.migrations new file mode 100644 index 0000000..ce713bd --- /dev/null +++ b/OpenSim/Data/MySQL/Resources/FriendsStore.migrations | |||
@@ -0,0 +1,25 @@ | |||
1 | :VERSION 1 # ------------------------- | ||
2 | |||
3 | BEGIN; | ||
4 | |||
5 | CREATE TABLE `Friends` ( | ||
6 | `PrincipalID` CHAR(36) NOT NULL, | ||
7 | `Friend` VARCHAR(255) NOT NULL, | ||
8 | `Flags` VARCHAR(16) NOT NULL DEFAULT 0, | ||
9 | `Offered` VARCHAR(32) NOT NULL DEFAULT 0, | ||
10 | PRIMARY KEY(`PrincipalID`, `Friend`), | ||
11 | KEY(`PrincipalID`) | ||
12 | ); | ||
13 | |||
14 | COMMIT; | ||
15 | |||
16 | :VERSION 2 # ------------------------- | ||
17 | |||
18 | BEGIN; | ||
19 | |||
20 | INSERT INTO `Friends` SELECT `ownerID`, `friendID`, `friendPerms`, 0 FROM `userfriends`; | ||
21 | |||
22 | COMMIT; | ||
23 | |||
24 | |||
25 | |||
diff --git a/OpenSim/Data/MySQL/Resources/001_GridStore.sql b/OpenSim/Data/MySQL/Resources/GridStore.migrations index cb0f9bd..523a8ac 100644 --- a/OpenSim/Data/MySQL/Resources/001_GridStore.sql +++ b/OpenSim/Data/MySQL/Resources/GridStore.migrations | |||
@@ -1,3 +1,5 @@ | |||
1 | :VERSION 1 | ||
2 | |||
1 | CREATE TABLE `regions` ( | 3 | CREATE TABLE `regions` ( |
2 | `uuid` varchar(36) NOT NULL, | 4 | `uuid` varchar(36) NOT NULL, |
3 | `regionHandle` bigint(20) unsigned NOT NULL, | 5 | `regionHandle` bigint(20) unsigned NOT NULL, |
@@ -30,3 +32,58 @@ CREATE TABLE `regions` ( | |||
30 | KEY `regionHandle` (`regionHandle`), | 32 | KEY `regionHandle` (`regionHandle`), |
31 | KEY `overrideHandles` (`eastOverrideHandle`,`westOverrideHandle`,`southOverrideHandle`,`northOverrideHandle`) | 33 | KEY `overrideHandles` (`eastOverrideHandle`,`westOverrideHandle`,`southOverrideHandle`,`northOverrideHandle`) |
32 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Rev. 3'; | 34 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Rev. 3'; |
35 | |||
36 | :VERSION 2 | ||
37 | |||
38 | BEGIN; | ||
39 | |||
40 | ALTER TABLE regions add column access integer unsigned default 1; | ||
41 | |||
42 | COMMIT; | ||
43 | |||
44 | :VERSION 3 | ||
45 | |||
46 | BEGIN; | ||
47 | |||
48 | ALTER TABLE regions add column ScopeID char(36) not null default '00000000-0000-0000-0000-000000000000'; | ||
49 | |||
50 | create index ScopeID on regions(ScopeID); | ||
51 | |||
52 | COMMIT; | ||
53 | |||
54 | :VERSION 4 | ||
55 | |||
56 | BEGIN; | ||
57 | |||
58 | ALTER TABLE regions add column sizeX integer not null default 0; | ||
59 | ALTER TABLE regions add column sizeY integer not null default 0; | ||
60 | |||
61 | COMMIT; | ||
62 | |||
63 | :VERSION 5 | ||
64 | |||
65 | BEGIN; | ||
66 | |||
67 | ALTER TABLE `regions` ADD COLUMN `flags` integer NOT NULL DEFAULT 0; | ||
68 | CREATE INDEX flags ON regions(flags); | ||
69 | |||
70 | COMMIT; | ||
71 | |||
72 | :VERSION 6 | ||
73 | |||
74 | BEGIN; | ||
75 | |||
76 | ALTER TABLE `regions` ADD COLUMN `last_seen` integer NOT NULL DEFAULT 0; | ||
77 | |||
78 | COMMIT; | ||
79 | |||
80 | :VERSION 7 | ||
81 | |||
82 | BEGIN; | ||
83 | |||
84 | ALTER TABLE `regions` ADD COLUMN `PrincipalID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000'; | ||
85 | ALTER TABLE `regions` ADD COLUMN `Token` varchar(255) NOT NULL; | ||
86 | |||
87 | COMMIT; | ||
88 | |||
89 | |||
diff --git a/OpenSim/Data/MySQL/Resources/001_GridUserStore.sql b/OpenSim/Data/MySQL/Resources/GridUserStore.migrations index ce4ab96..32b85ee 100644 --- a/OpenSim/Data/MySQL/Resources/001_GridUserStore.sql +++ b/OpenSim/Data/MySQL/Resources/GridUserStore.migrations | |||
@@ -1,3 +1,5 @@ | |||
1 | :VERSION 1 # -------------------------- | ||
2 | |||
1 | BEGIN; | 3 | BEGIN; |
2 | 4 | ||
3 | CREATE TABLE `GridUser` ( | 5 | CREATE TABLE `GridUser` ( |
diff --git a/OpenSim/Data/MySQL/Resources/InventoryStore.migrations b/OpenSim/Data/MySQL/Resources/InventoryStore.migrations new file mode 100644 index 0000000..8c5864e --- /dev/null +++ b/OpenSim/Data/MySQL/Resources/InventoryStore.migrations | |||
@@ -0,0 +1,93 @@ | |||
1 | :VERSION 1 # ------------ | ||
2 | BEGIN; | ||
3 | |||
4 | CREATE TABLE `inventoryfolders` ( | ||
5 | `folderID` varchar(36) NOT NULL default '', | ||
6 | `agentID` varchar(36) default NULL, | ||
7 | `parentFolderID` varchar(36) default NULL, | ||
8 | `folderName` varchar(64) default NULL, | ||
9 | `type` smallint NOT NULL default 0, | ||
10 | `version` int NOT NULL default 0, | ||
11 | PRIMARY KEY (`folderID`), | ||
12 | KEY `owner` (`agentID`), | ||
13 | KEY `parent` (`parentFolderID`) | ||
14 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
15 | |||
16 | CREATE TABLE `inventoryitems` ( | ||
17 | `inventoryID` varchar(36) NOT NULL default '', | ||
18 | `assetID` varchar(36) default NULL, | ||
19 | `assetType` int(11) default NULL, | ||
20 | `parentFolderID` varchar(36) default NULL, | ||
21 | `avatarID` varchar(36) default NULL, | ||
22 | `inventoryName` varchar(64) default NULL, | ||
23 | `inventoryDescription` varchar(128) default NULL, | ||
24 | `inventoryNextPermissions` int(10) unsigned default NULL, | ||
25 | `inventoryCurrentPermissions` int(10) unsigned default NULL, | ||
26 | `invType` int(11) default NULL, | ||
27 | `creatorID` varchar(36) default NULL, | ||
28 | `inventoryBasePermissions` int(10) unsigned NOT NULL default 0, | ||
29 | `inventoryEveryOnePermissions` int(10) unsigned NOT NULL default 0, | ||
30 | `salePrice` int(11) NOT NULL default 0, | ||
31 | `saleType` tinyint(4) NOT NULL default 0, | ||
32 | `creationDate` int(11) NOT NULL default 0, | ||
33 | `groupID` varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000', | ||
34 | `groupOwned` tinyint(4) NOT NULL default 0, | ||
35 | `flags` int(11) unsigned NOT NULL default 0, | ||
36 | PRIMARY KEY (`inventoryID`), | ||
37 | KEY `owner` (`avatarID`), | ||
38 | KEY `folder` (`parentFolderID`) | ||
39 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
40 | |||
41 | COMMIT; | ||
42 | |||
43 | :VERSION 2 # ------------ | ||
44 | |||
45 | BEGIN; | ||
46 | |||
47 | ALTER TABLE inventoryfolders change folderID folderIDold varchar(36); | ||
48 | ALTER TABLE inventoryfolders change agentID agentIDold varchar(36); | ||
49 | ALTER TABLE inventoryfolders change parentFolderID parentFolderIDold varchar(36); | ||
50 | ALTER TABLE inventoryfolders add folderID char(36) not null default '00000000-0000-0000-0000-000000000000'; | ||
51 | ALTER TABLE inventoryfolders add agentID char(36) default NULL; | ||
52 | ALTER TABLE inventoryfolders add parentFolderID char(36) default NULL; | ||
53 | UPDATE inventoryfolders set folderID = folderIDold, agentID = agentIDold, parentFolderID = parentFolderIDold; | ||
54 | ALTER TABLE inventoryfolders drop folderIDold; | ||
55 | ALTER TABLE inventoryfolders drop agentIDold; | ||
56 | ALTER TABLE inventoryfolders drop parentFolderIDold; | ||
57 | ALTER TABLE inventoryfolders add constraint primary key(folderID); | ||
58 | ALTER TABLE inventoryfolders add index inventoryfolders_agentid(agentID); | ||
59 | ALTER TABLE inventoryfolders add index inventoryfolders_parentFolderid(parentFolderID); | ||
60 | |||
61 | ALTER TABLE inventoryitems change inventoryID inventoryIDold varchar(36); | ||
62 | ALTER TABLE inventoryitems change avatarID avatarIDold varchar(36); | ||
63 | ALTER TABLE inventoryitems change parentFolderID parentFolderIDold varchar(36); | ||
64 | ALTER TABLE inventoryitems add inventoryID char(36) not null default '00000000-0000-0000-0000-000000000000'; | ||
65 | ALTER TABLE inventoryitems add avatarID char(36) default NULL; | ||
66 | ALTER TABLE inventoryitems add parentFolderID char(36) default NULL; | ||
67 | UPDATE inventoryitems set inventoryID = inventoryIDold, avatarID = avatarIDold, parentFolderID = parentFolderIDold; | ||
68 | ALTER TABLE inventoryitems drop inventoryIDold; | ||
69 | ALTER TABLE inventoryitems drop avatarIDold; | ||
70 | ALTER TABLE inventoryitems drop parentFolderIDold; | ||
71 | ALTER TABLE inventoryitems add constraint primary key(inventoryID); | ||
72 | ALTER TABLE inventoryitems add index inventoryitems_avatarid(avatarID); | ||
73 | ALTER TABLE inventoryitems add index inventoryitems_parentFolderid(parentFolderID); | ||
74 | |||
75 | COMMIT; | ||
76 | |||
77 | :VERSION 3 # ------------ | ||
78 | |||
79 | BEGIN; | ||
80 | |||
81 | alter table inventoryitems add column inventoryGroupPermissions integer unsigned not null default 0; | ||
82 | |||
83 | COMMIT; | ||
84 | |||
85 | :VERSION 4 # ------------ | ||
86 | |||
87 | BEGIN; | ||
88 | |||
89 | update inventoryitems set creatorID = '00000000-0000-0000-0000-000000000000' where creatorID is NULL; | ||
90 | update inventoryitems set creatorID = '00000000-0000-0000-0000-000000000000' where creatorID = ''; | ||
91 | alter table inventoryitems modify column creatorID varchar(36) not NULL default '00000000-0000-0000-0000-000000000000'; | ||
92 | |||
93 | COMMIT; | ||
diff --git a/OpenSim/Data/MySQL/Resources/001_LogStore.sql b/OpenSim/Data/MySQL/Resources/LogStore.migrations index b4c29fb..9ac26ac 100644 --- a/OpenSim/Data/MySQL/Resources/001_LogStore.sql +++ b/OpenSim/Data/MySQL/Resources/LogStore.migrations | |||
@@ -1,3 +1,6 @@ | |||
1 |  | ||
2 | :VERSION 1 | ||
3 | |||
1 | CREATE TABLE `logs` ( | 4 | CREATE TABLE `logs` ( |
2 | `logID` int(10) unsigned NOT NULL auto_increment, | 5 | `logID` int(10) unsigned NOT NULL auto_increment, |
3 | `target` varchar(36) default NULL, | 6 | `target` varchar(36) default NULL, |
diff --git a/OpenSim/Data/MySQL/Resources/001_Presence.sql b/OpenSim/Data/MySQL/Resources/Presence.migrations index 84fa057..91f7de5 100644 --- a/OpenSim/Data/MySQL/Resources/001_Presence.sql +++ b/OpenSim/Data/MySQL/Resources/Presence.migrations | |||
@@ -1,8 +1,10 @@ | |||
1 | :VERSION 1 # -------------------------- | ||
2 | |||
1 | BEGIN; | 3 | BEGIN; |
2 | 4 | ||
3 | CREATE TABLE `Presence` ( | 5 | CREATE TABLE `Presence` ( |
4 | `UserID` VARCHAR(255) NOT NULL, | 6 | `UserID` VARCHAR(255) NOT NULL, |
5 | `RegionID` CHAR(36) NOT NULL, | 7 | `RegionID` CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', |
6 | `SessionID` CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', | 8 | `SessionID` CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', |
7 | `SecureSessionID` CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000' | 9 | `SecureSessionID` CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000' |
8 | ) ENGINE=InnoDB; | 10 | ) ENGINE=InnoDB; |
diff --git a/OpenSim/Data/MySQL/Resources/RegionStore.migrations b/OpenSim/Data/MySQL/Resources/RegionStore.migrations new file mode 100644 index 0000000..ba898bb --- /dev/null +++ b/OpenSim/Data/MySQL/Resources/RegionStore.migrations | |||
@@ -0,0 +1,876 @@ | |||
1 |  | ||
2 | :VERSION 1 #--------------------- | ||
3 | |||
4 | BEGIN; | ||
5 | |||
6 | CREATE TABLE `prims` ( | ||
7 | `UUID` varchar(255) NOT NULL, | ||
8 | `RegionUUID` varchar(255) default NULL, | ||
9 | `ParentID` int(11) default NULL, | ||
10 | `CreationDate` int(11) default NULL, | ||
11 | `Name` varchar(255) default NULL, | ||
12 | `SceneGroupID` varchar(255) default NULL, | ||
13 | `Text` varchar(255) default NULL, | ||
14 | `Description` varchar(255) default NULL, | ||
15 | `SitName` varchar(255) default NULL, | ||
16 | `TouchName` varchar(255) default NULL, | ||
17 | `ObjectFlags` int(11) default NULL, | ||
18 | `CreatorID` varchar(255) default NULL, | ||
19 | `OwnerID` varchar(255) default NULL, | ||
20 | `GroupID` varchar(255) default NULL, | ||
21 | `LastOwnerID` varchar(255) default NULL, | ||
22 | `OwnerMask` int(11) default NULL, | ||
23 | `NextOwnerMask` int(11) default NULL, | ||
24 | `GroupMask` int(11) default NULL, | ||
25 | `EveryoneMask` int(11) default NULL, | ||
26 | `BaseMask` int(11) default NULL, | ||
27 | `PositionX` float default NULL, | ||
28 | `PositionY` float default NULL, | ||
29 | `PositionZ` float default NULL, | ||
30 | `GroupPositionX` float default NULL, | ||
31 | `GroupPositionY` float default NULL, | ||
32 | `GroupPositionZ` float default NULL, | ||
33 | `VelocityX` float default NULL, | ||
34 | `VelocityY` float default NULL, | ||
35 | `VelocityZ` float default NULL, | ||
36 | `AngularVelocityX` float default NULL, | ||
37 | `AngularVelocityY` float default NULL, | ||
38 | `AngularVelocityZ` float default NULL, | ||
39 | `AccelerationX` float default NULL, | ||
40 | `AccelerationY` float default NULL, | ||
41 | `AccelerationZ` float default NULL, | ||
42 | `RotationX` float default NULL, | ||
43 | `RotationY` float default NULL, | ||
44 | `RotationZ` float default NULL, | ||
45 | `RotationW` float default NULL, | ||
46 | `SitTargetOffsetX` float default NULL, | ||
47 | `SitTargetOffsetY` float default NULL, | ||
48 | `SitTargetOffsetZ` float default NULL, | ||
49 | `SitTargetOrientW` float default NULL, | ||
50 | `SitTargetOrientX` float default NULL, | ||
51 | `SitTargetOrientY` float default NULL, | ||
52 | `SitTargetOrientZ` float default NULL, | ||
53 | PRIMARY KEY (`UUID`) | ||
54 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1; | ||
55 | |||
56 | CREATE TABLE `primshapes` ( | ||
57 | `UUID` varchar(255) NOT NULL, | ||
58 | `Shape` int(11) default NULL, | ||
59 | `ScaleX` float default NULL, | ||
60 | `ScaleY` float default NULL, | ||
61 | `ScaleZ` float default NULL, | ||
62 | `PCode` int(11) default NULL, | ||
63 | `PathBegin` int(11) default NULL, | ||
64 | `PathEnd` int(11) default NULL, | ||
65 | `PathScaleX` int(11) default NULL, | ||
66 | `PathScaleY` int(11) default NULL, | ||
67 | `PathShearX` int(11) default NULL, | ||
68 | `PathShearY` int(11) default NULL, | ||
69 | `PathSkew` int(11) default NULL, | ||
70 | `PathCurve` int(11) default NULL, | ||
71 | `PathRadiusOffset` int(11) default NULL, | ||
72 | `PathRevolutions` int(11) default NULL, | ||
73 | `PathTaperX` int(11) default NULL, | ||
74 | `PathTaperY` int(11) default NULL, | ||
75 | `PathTwist` int(11) default NULL, | ||
76 | `PathTwistBegin` int(11) default NULL, | ||
77 | `ProfileBegin` int(11) default NULL, | ||
78 | `ProfileEnd` int(11) default NULL, | ||
79 | `ProfileCurve` int(11) default NULL, | ||
80 | `ProfileHollow` int(11) default NULL, | ||
81 | `State` int(11) default NULL, | ||
82 | `Texture` longblob, | ||
83 | `ExtraParams` longblob, | ||
84 | PRIMARY KEY (`UUID`) | ||
85 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1; | ||
86 | |||
87 | CREATE TABLE `primitems` ( | ||
88 | `itemID` varchar(255) NOT NULL, | ||
89 | `primID` varchar(255) default NULL, | ||
90 | `assetID` varchar(255) default NULL, | ||
91 | `parentFolderID` varchar(255) default NULL, | ||
92 | `invType` int(11) default NULL, | ||
93 | `assetType` int(11) default NULL, | ||
94 | `name` varchar(255) default NULL, | ||
95 | `description` varchar(255) default NULL, | ||
96 | `creationDate` bigint(20) default NULL, | ||
97 | `creatorID` varchar(255) default NULL, | ||
98 | `ownerID` varchar(255) default NULL, | ||
99 | `lastOwnerID` varchar(255) default NULL, | ||
100 | `groupID` varchar(255) default NULL, | ||
101 | `nextPermissions` int(11) default NULL, | ||
102 | `currentPermissions` int(11) default NULL, | ||
103 | `basePermissions` int(11) default NULL, | ||
104 | `everyonePermissions` int(11) default NULL, | ||
105 | `groupPermissions` int(11) default NULL, | ||
106 | PRIMARY KEY (`itemID`) | ||
107 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1; | ||
108 | |||
109 | CREATE TABLE `terrain` ( | ||
110 | `RegionUUID` varchar(255) default NULL, | ||
111 | `Revision` int(11) default NULL, | ||
112 | `Heightfield` longblob | ||
113 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1; | ||
114 | |||
115 | CREATE TABLE `land` ( | ||
116 | `UUID` varchar(255) NOT NULL, | ||
117 | `RegionUUID` varchar(255) default NULL, | ||
118 | `LocalLandID` int(11) default NULL, | ||
119 | `Bitmap` longblob, | ||
120 | `Name` varchar(255) default NULL, | ||
121 | `Description` varchar(255) default NULL, | ||
122 | `OwnerUUID` varchar(255) default NULL, | ||
123 | `IsGroupOwned` int(11) default NULL, | ||
124 | `Area` int(11) default NULL, | ||
125 | `AuctionID` int(11) default NULL, | ||
126 | `Category` int(11) default NULL, | ||
127 | `ClaimDate` int(11) default NULL, | ||
128 | `ClaimPrice` int(11) default NULL, | ||
129 | `GroupUUID` varchar(255) default NULL, | ||
130 | `SalePrice` int(11) default NULL, | ||
131 | `LandStatus` int(11) default NULL, | ||
132 | `LandFlags` int(11) default NULL, | ||
133 | `LandingType` int(11) default NULL, | ||
134 | `MediaAutoScale` int(11) default NULL, | ||
135 | `MediaTextureUUID` varchar(255) default NULL, | ||
136 | `MediaURL` varchar(255) default NULL, | ||
137 | `MusicURL` varchar(255) default NULL, | ||
138 | `PassHours` float default NULL, | ||
139 | `PassPrice` int(11) default NULL, | ||
140 | `SnapshotUUID` varchar(255) default NULL, | ||
141 | `UserLocationX` float default NULL, | ||
142 | `UserLocationY` float default NULL, | ||
143 | `UserLocationZ` float default NULL, | ||
144 | `UserLookAtX` float default NULL, | ||
145 | `UserLookAtY` float default NULL, | ||
146 | `UserLookAtZ` float default NULL, | ||
147 | `AuthbuyerID` varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000', | ||
148 | PRIMARY KEY (`UUID`) | ||
149 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
150 | |||
151 | CREATE TABLE `landaccesslist` ( | ||
152 | `LandUUID` varchar(255) default NULL, | ||
153 | `AccessUUID` varchar(255) default NULL, | ||
154 | `Flags` int(11) default NULL | ||
155 | ) ENGINE=MyISAM DEFAULT CHARSET=latin1; | ||
156 | |||
157 | COMMIT; | ||
158 | |||
159 | :VERSION 2 #--------------------- | ||
160 | |||
161 | BEGIN; | ||
162 | |||
163 | CREATE index prims_regionuuid on prims(RegionUUID); | ||
164 | CREATE index primitems_primid on primitems(primID); | ||
165 | |||
166 | COMMIT; | ||
167 | |||
168 | :VERSION 3 #--------------------- | ||
169 | |||
170 | BEGIN; | ||
171 | CREATE TABLE regionban (regionUUID VARCHAR(36) NOT NULL, bannedUUID VARCHAR(36) NOT NULL, bannedIp VARCHAR(16) NOT NULL, bannedIpHostMask VARCHAR(16) NOT NULL) ENGINE=INNODB DEFAULT CHARSET=utf8 COMMENT='Rev. 1'; | ||
172 | COMMIT; | ||
173 | |||
174 | :VERSION 4 #--------------------- | ||
175 | |||
176 | BEGIN; | ||
177 | |||
178 | ALTER TABLE primitems add flags integer not null default 0; | ||
179 | |||
180 | COMMIT; | ||
181 | |||
182 | :VERSION 5 #--------------------- | ||
183 | BEGIN; | ||
184 | |||
185 | create table regionsettings ( | ||
186 | regionUUID char(36) not null, | ||
187 | block_terraform integer not null, | ||
188 | block_fly integer not null, | ||
189 | allow_damage integer not null, | ||
190 | restrict_pushing integer not null, | ||
191 | allow_land_resell integer not null, | ||
192 | allow_land_join_divide integer not null, | ||
193 | block_show_in_search integer not null, | ||
194 | agent_limit integer not null, | ||
195 | object_bonus float not null, | ||
196 | maturity integer not null, | ||
197 | disable_scripts integer not null, | ||
198 | disable_collisions integer not null, | ||
199 | disable_physics integer not null, | ||
200 | terrain_texture_1 char(36) not null, | ||
201 | terrain_texture_2 char(36) not null, | ||
202 | terrain_texture_3 char(36) not null, | ||
203 | terrain_texture_4 char(36) not null, | ||
204 | elevation_1_nw float not null, | ||
205 | elevation_2_nw float not null, | ||
206 | elevation_1_ne float not null, | ||
207 | elevation_2_ne float not null, | ||
208 | elevation_1_se float not null, | ||
209 | elevation_2_se float not null, | ||
210 | elevation_1_sw float not null, | ||
211 | elevation_2_sw float not null, | ||
212 | water_height float not null, | ||
213 | terrain_raise_limit float not null, | ||
214 | terrain_lower_limit float not null, | ||
215 | use_estate_sun integer not null, | ||
216 | fixed_sun integer not null, | ||
217 | sun_position float not null, | ||
218 | covenant char(36), | ||
219 | primary key(regionUUID) | ||
220 | ); | ||
221 | |||
222 | COMMIT; | ||
223 | |||
224 | |||
225 | :VERSION 6 #--------------------- | ||
226 | |||
227 | BEGIN; | ||
228 | |||
229 | alter table landaccesslist ENGINE = InnoDB; | ||
230 | alter table migrations ENGINE = InnoDB; | ||
231 | alter table primitems ENGINE = InnoDB; | ||
232 | alter table prims ENGINE = InnoDB; | ||
233 | alter table primshapes ENGINE = InnoDB; | ||
234 | alter table regionsettings ENGINE = InnoDB; | ||
235 | alter table terrain ENGINE = InnoDB; | ||
236 | |||
237 | COMMIT; | ||
238 | |||
239 | :VERSION 7 #--------------------- | ||
240 | |||
241 | BEGIN; | ||
242 | |||
243 | ALTER TABLE prims change UUID UUIDold varchar(255); | ||
244 | ALTER TABLE prims change RegionUUID RegionUUIDold varchar(255); | ||
245 | ALTER TABLE prims change CreatorID CreatorIDold varchar(255); | ||
246 | ALTER TABLE prims change OwnerID OwnerIDold varchar(255); | ||
247 | ALTER TABLE prims change GroupID GroupIDold varchar(255); | ||
248 | ALTER TABLE prims change LastOwnerID LastOwnerIDold varchar(255); | ||
249 | ALTER TABLE prims add UUID char(36); | ||
250 | ALTER TABLE prims add RegionUUID char(36); | ||
251 | ALTER TABLE prims add CreatorID char(36); | ||
252 | ALTER TABLE prims add OwnerID char(36); | ||
253 | ALTER TABLE prims add GroupID char(36); | ||
254 | ALTER TABLE prims add LastOwnerID char(36); | ||
255 | UPDATE prims set UUID = UUIDold, RegionUUID = RegionUUIDold, CreatorID = CreatorIDold, OwnerID = OwnerIDold, GroupID = GroupIDold, LastOwnerID = LastOwnerIDold; | ||
256 | ALTER TABLE prims drop UUIDold; | ||
257 | ALTER TABLE prims drop RegionUUIDold; | ||
258 | ALTER TABLE prims drop CreatorIDold; | ||
259 | ALTER TABLE prims drop OwnerIDold; | ||
260 | ALTER TABLE prims drop GroupIDold; | ||
261 | ALTER TABLE prims drop LastOwnerIDold; | ||
262 | ALTER TABLE prims add constraint primary key(UUID); | ||
263 | ALTER TABLE prims add index prims_regionuuid(RegionUUID); | ||
264 | |||
265 | COMMIT; | ||
266 | |||
267 | :VERSION 8 #--------------------- | ||
268 | |||
269 | BEGIN; | ||
270 | |||
271 | ALTER TABLE primshapes change UUID UUIDold varchar(255); | ||
272 | ALTER TABLE primshapes add UUID char(36); | ||
273 | UPDATE primshapes set UUID = UUIDold; | ||
274 | ALTER TABLE primshapes drop UUIDold; | ||
275 | ALTER TABLE primshapes add constraint primary key(UUID); | ||
276 | |||
277 | COMMIT; | ||
278 | |||
279 | :VERSION 9 #--------------------- | ||
280 | |||
281 | BEGIN; | ||
282 | |||
283 | ALTER TABLE primitems change itemID itemIDold varchar(255); | ||
284 | ALTER TABLE primitems change primID primIDold varchar(255); | ||
285 | ALTER TABLE primitems change assetID assetIDold varchar(255); | ||
286 | ALTER TABLE primitems change parentFolderID parentFolderIDold varchar(255); | ||
287 | ALTER TABLE primitems change creatorID creatorIDold varchar(255); | ||
288 | ALTER TABLE primitems change ownerID ownerIDold varchar(255); | ||
289 | ALTER TABLE primitems change groupID groupIDold varchar(255); | ||
290 | ALTER TABLE primitems change lastOwnerID lastOwnerIDold varchar(255); | ||
291 | ALTER TABLE primitems add itemID char(36); | ||
292 | ALTER TABLE primitems add primID char(36); | ||
293 | ALTER TABLE primitems add assetID char(36); | ||
294 | ALTER TABLE primitems add parentFolderID char(36); | ||
295 | ALTER TABLE primitems add creatorID char(36); | ||
296 | ALTER TABLE primitems add ownerID char(36); | ||
297 | ALTER TABLE primitems add groupID char(36); | ||
298 | ALTER TABLE primitems add lastOwnerID char(36); | ||
299 | UPDATE primitems set itemID = itemIDold, primID = primIDold, assetID = assetIDold, parentFolderID = parentFolderIDold, creatorID = creatorIDold, ownerID = ownerIDold, groupID = groupIDold, lastOwnerID = lastOwnerIDold; | ||
300 | ALTER TABLE primitems drop itemIDold; | ||
301 | ALTER TABLE primitems drop primIDold; | ||
302 | ALTER TABLE primitems drop assetIDold; | ||
303 | ALTER TABLE primitems drop parentFolderIDold; | ||
304 | ALTER TABLE primitems drop creatorIDold; | ||
305 | ALTER TABLE primitems drop ownerIDold; | ||
306 | ALTER TABLE primitems drop groupIDold; | ||
307 | ALTER TABLE primitems drop lastOwnerIDold; | ||
308 | ALTER TABLE primitems add constraint primary key(itemID); | ||
309 | ALTER TABLE primitems add index primitems_primid(primID); | ||
310 | |||
311 | COMMIT; | ||
312 | |||
313 | :VERSION 10 #--------------------- | ||
314 | |||
315 | # 1 "010_RegionStore.sql" | ||
316 | # 1 "<built-in>" | ||
317 | # 1 "<command line>" | ||
318 | # 1 "010_RegionStore.sql" | ||
319 | BEGIN; | ||
320 | |||
321 | DELETE FROM regionsettings; | ||
322 | |||
323 | COMMIT; | ||
324 | |||
325 | |||
326 | :VERSION 11 #--------------------- | ||
327 | |||
328 | BEGIN; | ||
329 | |||
330 | ALTER TABLE prims change SceneGroupID SceneGroupIDold varchar(255); | ||
331 | ALTER TABLE prims add SceneGroupID char(36); | ||
332 | UPDATE prims set SceneGroupID = SceneGroupIDold; | ||
333 | ALTER TABLE prims drop SceneGroupIDold; | ||
334 | ALTER TABLE prims add index prims_scenegroupid(SceneGroupID); | ||
335 | |||
336 | COMMIT; | ||
337 | |||
338 | :VERSION 12 #--------------------- | ||
339 | |||
340 | BEGIN; | ||
341 | |||
342 | ALTER TABLE prims add index prims_parentid(ParentID); | ||
343 | |||
344 | COMMIT; | ||
345 | |||
346 | :VERSION 13 #--------------------- | ||
347 | begin; | ||
348 | |||
349 | drop table regionsettings; | ||
350 | |||
351 | CREATE TABLE `regionsettings` ( | ||
352 | `regionUUID` char(36) NOT NULL, | ||
353 | `block_terraform` int(11) NOT NULL, | ||
354 | `block_fly` int(11) NOT NULL, | ||
355 | `allow_damage` int(11) NOT NULL, | ||
356 | `restrict_pushing` int(11) NOT NULL, | ||
357 | `allow_land_resell` int(11) NOT NULL, | ||
358 | `allow_land_join_divide` int(11) NOT NULL, | ||
359 | `block_show_in_search` int(11) NOT NULL, | ||
360 | `agent_limit` int(11) NOT NULL, | ||
361 | `object_bonus` float NOT NULL, | ||
362 | `maturity` int(11) NOT NULL, | ||
363 | `disable_scripts` int(11) NOT NULL, | ||
364 | `disable_collisions` int(11) NOT NULL, | ||
365 | `disable_physics` int(11) NOT NULL, | ||
366 | `terrain_texture_1` char(36) NOT NULL, | ||
367 | `terrain_texture_2` char(36) NOT NULL, | ||
368 | `terrain_texture_3` char(36) NOT NULL, | ||
369 | `terrain_texture_4` char(36) NOT NULL, | ||
370 | `elevation_1_nw` float NOT NULL, | ||
371 | `elevation_2_nw` float NOT NULL, | ||
372 | `elevation_1_ne` float NOT NULL, | ||
373 | `elevation_2_ne` float NOT NULL, | ||
374 | `elevation_1_se` float NOT NULL, | ||
375 | `elevation_2_se` float NOT NULL, | ||
376 | `elevation_1_sw` float NOT NULL, | ||
377 | `elevation_2_sw` float NOT NULL, | ||
378 | `water_height` float NOT NULL, | ||
379 | `terrain_raise_limit` float NOT NULL, | ||
380 | `terrain_lower_limit` float NOT NULL, | ||
381 | `use_estate_sun` int(11) NOT NULL, | ||
382 | `fixed_sun` int(11) NOT NULL, | ||
383 | `sun_position` float NOT NULL, | ||
384 | `covenant` char(36) default NULL, | ||
385 | `Sandbox` tinyint(4) NOT NULL, | ||
386 | PRIMARY KEY (`regionUUID`) | ||
387 | ) ENGINE=InnoDB; | ||
388 | |||
389 | CREATE TABLE `estate_managers` ( | ||
390 | `EstateID` int(10) unsigned NOT NULL, | ||
391 | `uuid` char(36) NOT NULL, | ||
392 | KEY `EstateID` (`EstateID`) | ||
393 | ) ENGINE=InnoDB; | ||
394 | |||
395 | CREATE TABLE `estate_groups` ( | ||
396 | `EstateID` int(10) unsigned NOT NULL, | ||
397 | `uuid` char(36) NOT NULL, | ||
398 | KEY `EstateID` (`EstateID`) | ||
399 | ) ENGINE=InnoDB; | ||
400 | |||
401 | CREATE TABLE `estate_users` ( | ||
402 | `EstateID` int(10) unsigned NOT NULL, | ||
403 | `uuid` char(36) NOT NULL, | ||
404 | KEY `EstateID` (`EstateID`) | ||
405 | ) ENGINE=InnoDB; | ||
406 | |||
407 | CREATE TABLE `estateban` ( | ||
408 | `EstateID` int(10) unsigned NOT NULL, | ||
409 | `bannedUUID` varchar(36) NOT NULL, | ||
410 | `bannedIp` varchar(16) NOT NULL, | ||
411 | `bannedIpHostMask` varchar(16) NOT NULL, | ||
412 | `bannedNameMask` varchar(64) default NULL, | ||
413 | KEY `estateban_EstateID` (`EstateID`) | ||
414 | ) ENGINE=InnoDB; | ||
415 | |||
416 | CREATE TABLE `estate_settings` ( | ||
417 | `EstateID` int(10) unsigned NOT NULL auto_increment, | ||
418 | `EstateName` varchar(64) default NULL, | ||
419 | `AbuseEmailToEstateOwner` tinyint(4) NOT NULL, | ||
420 | `DenyAnonymous` tinyint(4) NOT NULL, | ||
421 | `ResetHomeOnTeleport` tinyint(4) NOT NULL, | ||
422 | `FixedSun` tinyint(4) NOT NULL, | ||
423 | `DenyTransacted` tinyint(4) NOT NULL, | ||
424 | `BlockDwell` tinyint(4) NOT NULL, | ||
425 | `DenyIdentified` tinyint(4) NOT NULL, | ||
426 | `AllowVoice` tinyint(4) NOT NULL, | ||
427 | `UseGlobalTime` tinyint(4) NOT NULL, | ||
428 | `PricePerMeter` int(11) NOT NULL, | ||
429 | `TaxFree` tinyint(4) NOT NULL, | ||
430 | `AllowDirectTeleport` tinyint(4) NOT NULL, | ||
431 | `RedirectGridX` int(11) NOT NULL, | ||
432 | `RedirectGridY` int(11) NOT NULL, | ||
433 | `ParentEstateID` int(10) unsigned NOT NULL, | ||
434 | `SunPosition` double NOT NULL, | ||
435 | `EstateSkipScripts` tinyint(4) NOT NULL, | ||
436 | `BillableFactor` float NOT NULL, | ||
437 | `PublicAccess` tinyint(4) NOT NULL, | ||
438 | PRIMARY KEY (`EstateID`) | ||
439 | ) ENGINE=InnoDB AUTO_INCREMENT=100; | ||
440 | |||
441 | CREATE TABLE `estate_map` ( | ||
442 | `RegionID` char(36) NOT NULL default '00000000-0000-0000-0000-000000000000', | ||
443 | `EstateID` int(11) NOT NULL, | ||
444 | PRIMARY KEY (`RegionID`), | ||
445 | KEY `EstateID` (`EstateID`) | ||
446 | ) ENGINE=InnoDB; | ||
447 | |||
448 | commit; | ||
449 | |||
450 | :VERSION 14 #--------------------- | ||
451 | |||
452 | begin; | ||
453 | |||
454 | alter table estate_settings add column AbuseEmail varchar(255) not null; | ||
455 | |||
456 | alter table estate_settings add column EstateOwner varchar(36) not null; | ||
457 | |||
458 | commit; | ||
459 | |||
460 | |||
461 | :VERSION 15 #--------------------- | ||
462 | |||
463 | begin; | ||
464 | |||
465 | alter table estate_settings add column DenyMinors tinyint not null; | ||
466 | |||
467 | commit; | ||
468 | |||
469 | :VERSION 16 #--------------------- | ||
470 | |||
471 | BEGIN; | ||
472 | |||
473 | ALTER TABLE prims ADD COLUMN PayPrice integer not null default 0; | ||
474 | ALTER TABLE prims ADD COLUMN PayButton1 integer not null default 0; | ||
475 | ALTER TABLE prims ADD COLUMN PayButton2 integer not null default 0; | ||
476 | ALTER TABLE prims ADD COLUMN PayButton3 integer not null default 0; | ||
477 | ALTER TABLE prims ADD COLUMN PayButton4 integer not null default 0; | ||
478 | ALTER TABLE prims ADD COLUMN LoopedSound char(36) not null default '00000000-0000-0000-0000-000000000000'; | ||
479 | ALTER TABLE prims ADD COLUMN LoopedSoundGain float not null default 0.0; | ||
480 | ALTER TABLE prims ADD COLUMN TextureAnimation blob; | ||
481 | ALTER TABLE prims ADD COLUMN OmegaX float not null default 0.0; | ||
482 | ALTER TABLE prims ADD COLUMN OmegaY float not null default 0.0; | ||
483 | ALTER TABLE prims ADD COLUMN OmegaZ float not null default 0.0; | ||
484 | ALTER TABLE prims ADD COLUMN CameraEyeOffsetX float not null default 0.0; | ||
485 | ALTER TABLE prims ADD COLUMN CameraEyeOffsetY float not null default 0.0; | ||
486 | ALTER TABLE prims ADD COLUMN CameraEyeOffsetZ float not null default 0.0; | ||
487 | ALTER TABLE prims ADD COLUMN CameraAtOffsetX float not null default 0.0; | ||
488 | ALTER TABLE prims ADD COLUMN CameraAtOffsetY float not null default 0.0; | ||
489 | ALTER TABLE prims ADD COLUMN CameraAtOffsetZ float not null default 0.0; | ||
490 | ALTER TABLE prims ADD COLUMN ForceMouselook tinyint not null default 0; | ||
491 | ALTER TABLE prims ADD COLUMN ScriptAccessPin integer not null default 0; | ||
492 | ALTER TABLE prims ADD COLUMN AllowedDrop tinyint not null default 0; | ||
493 | ALTER TABLE prims ADD COLUMN DieAtEdge tinyint not null default 0; | ||
494 | ALTER TABLE prims ADD COLUMN SalePrice integer not null default 10; | ||
495 | ALTER TABLE prims ADD COLUMN SaleType tinyint not null default 0; | ||
496 | |||
497 | COMMIT; | ||
498 | |||
499 | |||
500 | :VERSION 17 #--------------------- | ||
501 | |||
502 | BEGIN; | ||
503 | |||
504 | ALTER TABLE prims ADD COLUMN ColorR integer not null default 0; | ||
505 | ALTER TABLE prims ADD COLUMN ColorG integer not null default 0; | ||
506 | ALTER TABLE prims ADD COLUMN ColorB integer not null default 0; | ||
507 | ALTER TABLE prims ADD COLUMN ColorA integer not null default 0; | ||
508 | ALTER TABLE prims ADD COLUMN ParticleSystem blob; | ||
509 | |||
510 | COMMIT; | ||
511 | |||
512 | |||
513 | :VERSION 18 #--------------------- | ||
514 | |||
515 | begin; | ||
516 | |||
517 | ALTER TABLE prims ADD COLUMN ClickAction tinyint NOT NULL default 0; | ||
518 | |||
519 | commit; | ||
520 | |||
521 | :VERSION 19 #--------------------- | ||
522 | |||
523 | begin; | ||
524 | |||
525 | ALTER TABLE prims ADD COLUMN Material tinyint NOT NULL default 3; | ||
526 | |||
527 | commit; | ||
528 | |||
529 | |||
530 | :VERSION 20 #--------------------- | ||
531 | |||
532 | begin; | ||
533 | |||
534 | ALTER TABLE land ADD COLUMN OtherCleanTime integer NOT NULL default 0; | ||
535 | ALTER TABLE land ADD COLUMN Dwell integer NOT NULL default 0; | ||
536 | |||
537 | commit; | ||
538 | |||
539 | :VERSION 21 #--------------------- | ||
540 | |||
541 | begin; | ||
542 | |||
543 | ALTER TABLE regionsettings ADD COLUMN sunvectorx double NOT NULL default 0; | ||
544 | ALTER TABLE regionsettings ADD COLUMN sunvectory double NOT NULL default 0; | ||
545 | ALTER TABLE regionsettings ADD COLUMN sunvectorz double NOT NULL default 0; | ||
546 | |||
547 | commit; | ||
548 | |||
549 | |||
550 | :VERSION 22 #--------------------- | ||
551 | |||
552 | BEGIN; | ||
553 | |||
554 | ALTER TABLE prims ADD COLUMN CollisionSound char(36) not null default '00000000-0000-0000-0000-000000000000'; | ||
555 | ALTER TABLE prims ADD COLUMN CollisionSoundVolume float not null default 0.0; | ||
556 | |||
557 | COMMIT; | ||
558 | |||
559 | :VERSION 23 #--------------------- | ||
560 | |||
561 | BEGIN; | ||
562 | |||
563 | ALTER TABLE prims ADD COLUMN LinkNumber integer not null default 0; | ||
564 | |||
565 | COMMIT; | ||
566 | |||
567 | :VERSION 24 #--------------------- | ||
568 | |||
569 | BEGIN; | ||
570 | |||
571 | alter table regionsettings change column `object_bonus` `object_bonus` double NOT NULL; | ||
572 | alter table regionsettings change column `elevation_1_nw` `elevation_1_nw` double NOT NULL; | ||
573 | alter table regionsettings change column `elevation_2_nw` `elevation_2_nw` double NOT NULL; | ||
574 | alter table regionsettings change column `elevation_1_ne` `elevation_1_ne` double NOT NULL; | ||
575 | alter table regionsettings change column `elevation_2_ne` `elevation_2_ne` double NOT NULL; | ||
576 | alter table regionsettings change column `elevation_1_se` `elevation_1_se` double NOT NULL; | ||
577 | alter table regionsettings change column `elevation_2_se` `elevation_2_se` double NOT NULL; | ||
578 | alter table regionsettings change column `elevation_1_sw` `elevation_1_sw` double NOT NULL; | ||
579 | alter table regionsettings change column `elevation_2_sw` `elevation_2_sw` double NOT NULL; | ||
580 | alter table regionsettings change column `water_height` `water_height` double NOT NULL; | ||
581 | alter table regionsettings change column `terrain_raise_limit` `terrain_raise_limit` double NOT NULL; | ||
582 | alter table regionsettings change column `terrain_lower_limit` `terrain_lower_limit` double NOT NULL; | ||
583 | alter table regionsettings change column `sun_position` `sun_position` double NOT NULL; | ||
584 | |||
585 | COMMIT; | ||
586 | |||
587 | |||
588 | :VERSION 25 #--------------------- | ||
589 | |||
590 | BEGIN; | ||
591 | |||
592 | alter table prims change column `PositionX` `PositionX` double default NULL; | ||
593 | alter table prims change column `PositionY` `PositionY` double default NULL; | ||
594 | alter table prims change column `PositionZ` `PositionZ` double default NULL; | ||
595 | alter table prims change column `GroupPositionX` `GroupPositionX` double default NULL; | ||
596 | alter table prims change column `GroupPositionY` `GroupPositionY` double default NULL; | ||
597 | alter table prims change column `GroupPositionZ` `GroupPositionZ` double default NULL; | ||
598 | alter table prims change column `VelocityX` `VelocityX` double default NULL; | ||
599 | alter table prims change column `VelocityY` `VelocityY` double default NULL; | ||
600 | alter table prims change column `VelocityZ` `VelocityZ` double default NULL; | ||
601 | alter table prims change column `AngularVelocityX` `AngularVelocityX` double default NULL; | ||
602 | alter table prims change column `AngularVelocityY` `AngularVelocityY` double default NULL; | ||
603 | alter table prims change column `AngularVelocityZ` `AngularVelocityZ` double default NULL; | ||
604 | alter table prims change column `AccelerationX` `AccelerationX` double default NULL; | ||
605 | alter table prims change column `AccelerationY` `AccelerationY` double default NULL; | ||
606 | alter table prims change column `AccelerationZ` `AccelerationZ` double default NULL; | ||
607 | alter table prims change column `RotationX` `RotationX` double default NULL; | ||
608 | alter table prims change column `RotationY` `RotationY` double default NULL; | ||
609 | alter table prims change column `RotationZ` `RotationZ` double default NULL; | ||
610 | alter table prims change column `RotationW` `RotationW` double default NULL; | ||
611 | alter table prims change column `SitTargetOffsetX` `SitTargetOffsetX` double default NULL; | ||
612 | alter table prims change column `SitTargetOffsetY` `SitTargetOffsetY` double default NULL; | ||
613 | alter table prims change column `SitTargetOffsetZ` `SitTargetOffsetZ` double default NULL; | ||
614 | alter table prims change column `SitTargetOrientW` `SitTargetOrientW` double default NULL; | ||
615 | alter table prims change column `SitTargetOrientX` `SitTargetOrientX` double default NULL; | ||
616 | alter table prims change column `SitTargetOrientY` `SitTargetOrientY` double default NULL; | ||
617 | alter table prims change column `SitTargetOrientZ` `SitTargetOrientZ` double default NULL; | ||
618 | alter table prims change column `LoopedSoundGain` `LoopedSoundGain` double NOT NULL default '0'; | ||
619 | alter table prims change column `OmegaX` `OmegaX` double NOT NULL default '0'; | ||
620 | alter table prims change column `OmegaY` `OmegaY` double NOT NULL default '0'; | ||
621 | alter table prims change column `OmegaZ` `OmegaZ` double NOT NULL default '0'; | ||
622 | alter table prims change column `CameraEyeOffsetX` `CameraEyeOffsetX` double NOT NULL default '0'; | ||
623 | alter table prims change column `CameraEyeOffsetY` `CameraEyeOffsetY` double NOT NULL default '0'; | ||
624 | alter table prims change column `CameraEyeOffsetZ` `CameraEyeOffsetZ` double NOT NULL default '0'; | ||
625 | alter table prims change column `CameraAtOffsetX` `CameraAtOffsetX` double NOT NULL default '0'; | ||
626 | alter table prims change column `CameraAtOffsetY` `CameraAtOffsetY` double NOT NULL default '0'; | ||
627 | alter table prims change column `CameraAtOffsetZ` `CameraAtOffsetZ` double NOT NULL default '0'; | ||
628 | alter table prims change column `CollisionSoundVolume` `CollisionSoundVolume` double NOT NULL default '0'; | ||
629 | |||
630 | alter table primshapes change column `ScaleX` `ScaleX` double NOT NULL default '0'; | ||
631 | alter table primshapes change column `ScaleY` `ScaleY` double NOT NULL default '0'; | ||
632 | alter table primshapes change column `ScaleZ` `ScaleZ` double NOT NULL default '0'; | ||
633 | |||
634 | COMMIT; | ||
635 | |||
636 | :VERSION 26 #--------------------- | ||
637 | |||
638 | begin; | ||
639 | |||
640 | alter table prims change column `PositionX` `PositionX` double default NULL; | ||
641 | alter table prims change column `PositionY` `PositionY` double default NULL; | ||
642 | alter table prims change column `PositionZ` `PositionZ` double default NULL; | ||
643 | alter table prims change column `GroupPositionX` `GroupPositionX` double default NULL; | ||
644 | alter table prims change column `GroupPositionY` `GroupPositionY` double default NULL; | ||
645 | alter table prims change column `GroupPositionZ` `GroupPositionZ` double default NULL; | ||
646 | alter table prims change column `VelocityX` `VelocityX` double default NULL; | ||
647 | alter table prims change column `VelocityY` `VelocityY` double default NULL; | ||
648 | alter table prims change column `VelocityZ` `VelocityZ` double default NULL; | ||
649 | alter table prims change column `AngularVelocityX` `AngularVelocityX` double default NULL; | ||
650 | alter table prims change column `AngularVelocityY` `AngularVelocityY` double default NULL; | ||
651 | alter table prims change column `AngularVelocityZ` `AngularVelocityZ` double default NULL; | ||
652 | alter table prims change column `AccelerationX` `AccelerationX` double default NULL; | ||
653 | alter table prims change column `AccelerationY` `AccelerationY` double default NULL; | ||
654 | alter table prims change column `AccelerationZ` `AccelerationZ` double default NULL; | ||
655 | alter table prims change column `RotationX` `RotationX` double default NULL; | ||
656 | alter table prims change column `RotationY` `RotationY` double default NULL; | ||
657 | alter table prims change column `RotationZ` `RotationZ` double default NULL; | ||
658 | alter table prims change column `RotationW` `RotationW` double default NULL; | ||
659 | alter table prims change column `SitTargetOffsetX` `SitTargetOffsetX` double default NULL; | ||
660 | alter table prims change column `SitTargetOffsetY` `SitTargetOffsetY` double default NULL; | ||
661 | alter table prims change column `SitTargetOffsetZ` `SitTargetOffsetZ` double default NULL; | ||
662 | alter table prims change column `SitTargetOrientW` `SitTargetOrientW` double default NULL; | ||
663 | alter table prims change column `SitTargetOrientX` `SitTargetOrientX` double default NULL; | ||
664 | alter table prims change column `SitTargetOrientY` `SitTargetOrientY` double default NULL; | ||
665 | alter table prims change column `SitTargetOrientZ` `SitTargetOrientZ` double default NULL; | ||
666 | alter table prims change column `LoopedSoundGain` `LoopedSoundGain` double NOT NULL default '0'; | ||
667 | alter table prims change column `OmegaX` `OmegaX` double NOT NULL default '0'; | ||
668 | alter table prims change column `OmegaY` `OmegaY` double NOT NULL default '0'; | ||
669 | alter table prims change column `OmegaZ` `OmegaZ` double NOT NULL default '0'; | ||
670 | alter table prims change column `CameraEyeOffsetX` `CameraEyeOffsetX` double NOT NULL default '0'; | ||
671 | alter table prims change column `CameraEyeOffsetY` `CameraEyeOffsetY` double NOT NULL default '0'; | ||
672 | alter table prims change column `CameraEyeOffsetZ` `CameraEyeOffsetZ` double NOT NULL default '0'; | ||
673 | alter table prims change column `CameraAtOffsetX` `CameraAtOffsetX` double NOT NULL default '0'; | ||
674 | alter table prims change column `CameraAtOffsetY` `CameraAtOffsetY` double NOT NULL default '0'; | ||
675 | alter table prims change column `CameraAtOffsetZ` `CameraAtOffsetZ` double NOT NULL default '0'; | ||
676 | alter table prims change column `CollisionSoundVolume` `CollisionSoundVolume` double NOT NULL default '0'; | ||
677 | |||
678 | commit; | ||
679 | |||
680 | :VERSION 27 #--------------------- | ||
681 | |||
682 | BEGIN; | ||
683 | |||
684 | ALTER TABLE prims DROP COLUMN ParentID; | ||
685 | |||
686 | COMMIT; | ||
687 | |||
688 | :VERSION 28 #--------------------- | ||
689 | |||
690 | BEGIN; | ||
691 | |||
692 | update terrain | ||
693 | set RegionUUID = concat(substr(RegionUUID, 1, 8), "-", substr(RegionUUID, 9, 4), "-", substr(RegionUUID, 13, 4), "-", substr(RegionUUID, 17, 4), "-", substr(RegionUUID, 21, 12)) | ||
694 | where RegionUUID not like '%-%'; | ||
695 | |||
696 | |||
697 | update landaccesslist | ||
698 | set LandUUID = concat(substr(LandUUID, 1, 8), "-", substr(LandUUID, 9, 4), "-", substr(LandUUID, 13, 4), "-", substr(LandUUID, 17, 4), "-", substr(LandUUID, 21, 12)) | ||
699 | where LandUUID not like '%-%'; | ||
700 | |||
701 | update landaccesslist | ||
702 | set AccessUUID = concat(substr(AccessUUID, 1, 8), "-", substr(AccessUUID, 9, 4), "-", substr(AccessUUID, 13, 4), "-", substr(AccessUUID, 17, 4), "-", substr(AccessUUID, 21, 12)) | ||
703 | where AccessUUID not like '%-%'; | ||
704 | |||
705 | |||
706 | update prims | ||
707 | set UUID = concat(substr(UUID, 1, 8), "-", substr(UUID, 9, 4), "-", substr(UUID, 13, 4), "-", substr(UUID, 17, 4), "-", substr(UUID, 21, 12)) | ||
708 | where UUID not like '%-%'; | ||
709 | |||
710 | update prims | ||
711 | set RegionUUID = concat(substr(RegionUUID, 1, 8), "-", substr(RegionUUID, 9, 4), "-", substr(RegionUUID, 13, 4), "-", substr(RegionUUID, 17, 4), "-", substr(RegionUUID, 21, 12)) | ||
712 | where RegionUUID not like '%-%'; | ||
713 | |||
714 | update prims | ||
715 | set SceneGroupID = concat(substr(SceneGroupID, 1, 8), "-", substr(SceneGroupID, 9, 4), "-", substr(SceneGroupID, 13, 4), "-", substr(SceneGroupID, 17, 4), "-", substr(SceneGroupID, 21, 12)) | ||
716 | where SceneGroupID not like '%-%'; | ||
717 | |||
718 | update prims | ||
719 | set CreatorID = concat(substr(CreatorID, 1, 8), "-", substr(CreatorID, 9, 4), "-", substr(CreatorID, 13, 4), "-", substr(CreatorID, 17, 4), "-", substr(CreatorID, 21, 12)) | ||
720 | where CreatorID not like '%-%'; | ||
721 | |||
722 | update prims | ||
723 | set OwnerID = concat(substr(OwnerID, 1, 8), "-", substr(OwnerID, 9, 4), "-", substr(OwnerID, 13, 4), "-", substr(OwnerID, 17, 4), "-", substr(OwnerID, 21, 12)) | ||
724 | where OwnerID not like '%-%'; | ||
725 | |||
726 | update prims | ||
727 | set GroupID = concat(substr(GroupID, 1, 8), "-", substr(GroupID, 9, 4), "-", substr(GroupID, 13, 4), "-", substr(GroupID, 17, 4), "-", substr(GroupID, 21, 12)) | ||
728 | where GroupID not like '%-%'; | ||
729 | |||
730 | update prims | ||
731 | set LastOwnerID = concat(substr(LastOwnerID, 1, 8), "-", substr(LastOwnerID, 9, 4), "-", substr(LastOwnerID, 13, 4), "-", substr(LastOwnerID, 17, 4), "-", substr(LastOwnerID, 21, 12)) | ||
732 | where LastOwnerID not like '%-%'; | ||
733 | |||
734 | |||
735 | update primshapes | ||
736 | set UUID = concat(substr(UUID, 1, 8), "-", substr(UUID, 9, 4), "-", substr(UUID, 13, 4), "-", substr(UUID, 17, 4), "-", substr(UUID, 21, 12)) | ||
737 | where UUID not like '%-%'; | ||
738 | |||
739 | |||
740 | update land | ||
741 | set UUID = concat(substr(UUID, 1, 8), "-", substr(UUID, 9, 4), "-", substr(UUID, 13, 4), "-", substr(UUID, 17, 4), "-", substr(UUID, 21, 12)) | ||
742 | where UUID not like '%-%'; | ||
743 | |||
744 | update land | ||
745 | set RegionUUID = concat(substr(RegionUUID, 1, 8), "-", substr(RegionUUID, 9, 4), "-", substr(RegionUUID, 13, 4), "-", substr(RegionUUID, 17, 4), "-", substr(RegionUUID, 21, 12)) | ||
746 | where RegionUUID not like '%-%'; | ||
747 | |||
748 | update land | ||
749 | set OwnerUUID = concat(substr(OwnerUUID, 1, 8), "-", substr(OwnerUUID, 9, 4), "-", substr(OwnerUUID, 13, 4), "-", substr(OwnerUUID, 17, 4), "-", substr(OwnerUUID, 21, 12)) | ||
750 | where OwnerUUID not like '%-%'; | ||
751 | |||
752 | update land | ||
753 | set GroupUUID = concat(substr(GroupUUID, 1, 8), "-", substr(GroupUUID, 9, 4), "-", substr(GroupUUID, 13, 4), "-", substr(GroupUUID, 17, 4), "-", substr(GroupUUID, 21, 12)) | ||
754 | where GroupUUID not like '%-%'; | ||
755 | |||
756 | update land | ||
757 | set MediaTextureUUID = concat(substr(MediaTextureUUID, 1, 8), "-", substr(MediaTextureUUID, 9, 4), "-", substr(MediaTextureUUID, 13, 4), "-", substr(MediaTextureUUID, 17, 4), "-", substr(MediaTextureUUID, 21, 12)) | ||
758 | where MediaTextureUUID not like '%-%'; | ||
759 | |||
760 | update land | ||
761 | set SnapshotUUID = concat(substr(SnapshotUUID, 1, 8), "-", substr(SnapshotUUID, 9, 4), "-", substr(SnapshotUUID, 13, 4), "-", substr(SnapshotUUID, 17, 4), "-", substr(SnapshotUUID, 21, 12)) | ||
762 | where SnapshotUUID not like '%-%'; | ||
763 | |||
764 | update land | ||
765 | set AuthbuyerID = concat(substr(AuthbuyerID, 1, 8), "-", substr(AuthbuyerID, 9, 4), "-", substr(AuthbuyerID, 13, 4), "-", substr(AuthbuyerID, 17, 4), "-", substr(AuthbuyerID, 21, 12)) | ||
766 | where AuthbuyerID not like '%-%'; | ||
767 | |||
768 | COMMIT; | ||
769 | |||
770 | :VERSION 29 #--------------------- | ||
771 | |||
772 | BEGIN; | ||
773 | |||
774 | ALTER TABLE prims ADD COLUMN PassTouches tinyint not null default 0; | ||
775 | |||
776 | COMMIT; | ||
777 | |||
778 | :VERSION 30 #--------------------- | ||
779 | |||
780 | BEGIN; | ||
781 | |||
782 | ALTER TABLE regionsettings ADD COLUMN loaded_creation_date varchar(20) default NULL; | ||
783 | ALTER TABLE regionsettings ADD COLUMN loaded_creation_time varchar(20) default NULL; | ||
784 | ALTER TABLE regionsettings ADD COLUMN loaded_creation_id varchar(64) default NULL; | ||
785 | |||
786 | COMMIT; | ||
787 | |||
788 | :VERSION 31 #--------------------- | ||
789 | |||
790 | BEGIN; | ||
791 | |||
792 | ALTER TABLE regionsettings DROP COLUMN loaded_creation_date; | ||
793 | ALTER TABLE regionsettings DROP COLUMN loaded_creation_time; | ||
794 | ALTER TABLE regionsettings ADD COLUMN loaded_creation_datetime int unsigned NOT NULL default 0; | ||
795 | |||
796 | COMMIT; | ||
797 | |||
798 | :VERSION 32 #--------------------- | ||
799 | |||
800 | BEGIN; | ||
801 | CREATE TABLE `regionwindlight` ( | ||
802 | `region_id` varchar(36) NOT NULL DEFAULT '000000-0000-0000-0000-000000000000', | ||
803 | `water_color_r` float(9,6) unsigned NOT NULL DEFAULT '4.000000', | ||
804 | `water_color_g` float(9,6) unsigned NOT NULL DEFAULT '38.000000', | ||
805 | `water_color_b` float(9,6) unsigned NOT NULL DEFAULT '64.000000', | ||
806 | `water_fog_density_exponent` float(3,1) unsigned NOT NULL DEFAULT '4.0', | ||
807 | `underwater_fog_modifier` float(3,2) unsigned NOT NULL DEFAULT '0.25', | ||
808 | `reflection_wavelet_scale_1` float(3,1) unsigned NOT NULL DEFAULT '2.0', | ||
809 | `reflection_wavelet_scale_2` float(3,1) unsigned NOT NULL DEFAULT '2.0', | ||
810 | `reflection_wavelet_scale_3` float(3,1) unsigned NOT NULL DEFAULT '2.0', | ||
811 | `fresnel_scale` float(3,2) unsigned NOT NULL DEFAULT '0.40', | ||
812 | `fresnel_offset` float(3,2) unsigned NOT NULL DEFAULT '0.50', | ||
813 | `refract_scale_above` float(3,2) unsigned NOT NULL DEFAULT '0.03', | ||
814 | `refract_scale_below` float(3,2) unsigned NOT NULL DEFAULT '0.20', | ||
815 | `blur_multiplier` float(4,3) unsigned NOT NULL DEFAULT '0.040', | ||
816 | `big_wave_direction_x` float(3,2) NOT NULL DEFAULT '1.05', | ||
817 | `big_wave_direction_y` float(3,2) NOT NULL DEFAULT '-0.42', | ||
818 | `little_wave_direction_x` float(3,2) NOT NULL DEFAULT '1.11', | ||
819 | `little_wave_direction_y` float(3,2) NOT NULL DEFAULT '-1.16', | ||
820 | `normal_map_texture` varchar(36) NOT NULL DEFAULT '822ded49-9a6c-f61c-cb89-6df54f42cdf4', | ||
821 | `horizon_r` float(3,2) unsigned NOT NULL DEFAULT '0.25', | ||
822 | `horizon_g` float(3,2) unsigned NOT NULL DEFAULT '0.25', | ||
823 | `horizon_b` float(3,2) unsigned NOT NULL DEFAULT '0.32', | ||
824 | `horizon_i` float(3,2) unsigned NOT NULL DEFAULT '0.32', | ||
825 | `haze_horizon` float(3,2) unsigned NOT NULL DEFAULT '0.19', | ||
826 | `blue_density_r` float(3,2) unsigned NOT NULL DEFAULT '0.12', | ||
827 | `blue_density_g` float(3,2) unsigned NOT NULL DEFAULT '0.22', | ||
828 | `blue_density_b` float(3,2) unsigned NOT NULL DEFAULT '0.38', | ||
829 | `blue_density_i` float(3,2) unsigned NOT NULL DEFAULT '0.38', | ||
830 | `haze_density` float(3,2) unsigned NOT NULL DEFAULT '0.70', | ||
831 | `density_multiplier` float(3,2) unsigned NOT NULL DEFAULT '0.18', | ||
832 | `distance_multiplier` float(4,1) unsigned NOT NULL DEFAULT '0.8', | ||
833 | `max_altitude` int(4) unsigned NOT NULL DEFAULT '1605', | ||
834 | `sun_moon_color_r` float(3,2) unsigned NOT NULL DEFAULT '0.24', | ||
835 | `sun_moon_color_g` float(3,2) unsigned NOT NULL DEFAULT '0.26', | ||
836 | `sun_moon_color_b` float(3,2) unsigned NOT NULL DEFAULT '0.30', | ||
837 | `sun_moon_color_i` float(3,2) unsigned NOT NULL DEFAULT '0.30', | ||
838 | `sun_moon_position` float(4,3) unsigned NOT NULL DEFAULT '0.317', | ||
839 | `ambient_r` float(3,2) unsigned NOT NULL DEFAULT '0.35', | ||
840 | `ambient_g` float(3,2) unsigned NOT NULL DEFAULT '0.35', | ||
841 | `ambient_b` float(3,2) unsigned NOT NULL DEFAULT '0.35', | ||
842 | `ambient_i` float(3,2) unsigned NOT NULL DEFAULT '0.35', | ||
843 | `east_angle` float(3,2) unsigned NOT NULL DEFAULT '0.00', | ||
844 | `sun_glow_focus` float(3,2) unsigned NOT NULL DEFAULT '0.10', | ||
845 | `sun_glow_size` float(3,2) unsigned NOT NULL DEFAULT '1.75', | ||
846 | `scene_gamma` float(4,2) unsigned NOT NULL DEFAULT '1.00', | ||
847 | `star_brightness` float(3,2) unsigned NOT NULL DEFAULT '0.00', | ||
848 | `cloud_color_r` float(3,2) unsigned NOT NULL DEFAULT '0.41', | ||
849 | `cloud_color_g` float(3,2) unsigned NOT NULL DEFAULT '0.41', | ||
850 | `cloud_color_b` float(3,2) unsigned NOT NULL DEFAULT '0.41', | ||
851 | `cloud_color_i` float(3,2) unsigned NOT NULL DEFAULT '0.41', | ||
852 | `cloud_x` float(3,2) unsigned NOT NULL DEFAULT '1.00', | ||
853 | `cloud_y` float(3,2) unsigned NOT NULL DEFAULT '0.53', | ||
854 | `cloud_density` float(3,2) unsigned NOT NULL DEFAULT '1.00', | ||
855 | `cloud_coverage` float(3,2) unsigned NOT NULL DEFAULT '0.27', | ||
856 | `cloud_scale` float(3,2) unsigned NOT NULL DEFAULT '0.42', | ||
857 | `cloud_detail_x` float(3,2) unsigned NOT NULL DEFAULT '1.00', | ||
858 | `cloud_detail_y` float(3,2) unsigned NOT NULL DEFAULT '0.53', | ||
859 | `cloud_detail_density` float(3,2) unsigned NOT NULL DEFAULT '0.12', | ||
860 | `cloud_scroll_x` float(3,2) unsigned NOT NULL DEFAULT '0.20', | ||
861 | `cloud_scroll_x_lock` tinyint(1) unsigned NOT NULL DEFAULT '0', | ||
862 | `cloud_scroll_y` float(3,2) unsigned NOT NULL DEFAULT '0.01', | ||
863 | `cloud_scroll_y_lock` tinyint(1) unsigned NOT NULL DEFAULT '0', | ||
864 | `draw_classic_clouds` tinyint(1) unsigned NOT NULL DEFAULT '1', | ||
865 | PRIMARY KEY (`region_id`) | ||
866 | ); | ||
867 | |||
868 | ALTER TABLE estate_settings AUTO_INCREMENT = 100; | ||
869 | COMMIT; | ||
870 | |||
871 | :VERSION 33 #--------------------- | ||
872 | |||
873 | BEGIN; | ||
874 | ALTER TABLE regionsettings ADD map_tile_ID CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000'; | ||
875 | COMMIT; | ||
876 | |||
diff --git a/OpenSim/Data/MySQL/Resources/UserAccount.migrations b/OpenSim/Data/MySQL/Resources/UserAccount.migrations new file mode 100644 index 0000000..84011e6 --- /dev/null +++ b/OpenSim/Data/MySQL/Resources/UserAccount.migrations | |||
@@ -0,0 +1,47 @@ | |||
1 | :VERSION 1 # ------------------------- | ||
2 | |||
3 | BEGIN; | ||
4 | |||
5 | CREATE TABLE `UserAccounts` ( | ||
6 | `PrincipalID` CHAR(36) NOT NULL, | ||
7 | `ScopeID` CHAR(36) NOT NULL, | ||
8 | `FirstName` VARCHAR(64) NOT NULL, | ||
9 | `LastName` VARCHAR(64) NOT NULL, | ||
10 | `Email` VARCHAR(64), | ||
11 | `ServiceURLs` TEXT, | ||
12 | `Created` INT(11) | ||
13 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
14 | |||
15 | COMMIT; | ||
16 | |||
17 | :VERSION 2 # ------------------------- | ||
18 | |||
19 | BEGIN; | ||
20 | |||
21 | INSERT INTO UserAccounts (PrincipalID, ScopeID, FirstName, LastName, Email, ServiceURLs, Created) SELECT `UUID` AS PrincipalID, '00000000-0000-0000-0000-000000000000' AS ScopeID, username AS FirstName, lastname AS LastName, email as Email, CONCAT('AssetServerURI=', userAssetURI, ' InventoryServerURI=', userInventoryURI, ' GatewayURI= HomeURI=') AS ServiceURLs, created as Created FROM users; | ||
22 | |||
23 | COMMIT; | ||
24 | |||
25 | :VERSION 3 # ------------------------- | ||
26 | |||
27 | BEGIN; | ||
28 | |||
29 | CREATE UNIQUE INDEX PrincipalID ON UserAccounts(PrincipalID); | ||
30 | CREATE INDEX Email ON UserAccounts(Email); | ||
31 | CREATE INDEX FirstName ON UserAccounts(FirstName); | ||
32 | CREATE INDEX LastName ON UserAccounts(LastName); | ||
33 | CREATE INDEX Name ON UserAccounts(FirstName,LastName); | ||
34 | |||
35 | COMMIT; | ||
36 | |||
37 | :VERSION 4 # ------------------------- | ||
38 | |||
39 | BEGIN; | ||
40 | |||
41 | ALTER TABLE UserAccounts ADD COLUMN UserLevel integer NOT NULL DEFAULT 0; | ||
42 | ALTER TABLE UserAccounts ADD COLUMN UserFlags integer NOT NULL DEFAULT 0; | ||
43 | ALTER TABLE UserAccounts ADD COLUMN UserTitle varchar(64) NOT NULL DEFAULT ''; | ||
44 | |||
45 | COMMIT; | ||
46 | |||
47 | |||
diff --git a/OpenSim/Data/MySQL/Resources/001_UserStore.sql b/OpenSim/Data/MySQL/Resources/UserStore.migrations index 29ebc7d..f054611 100644 --- a/OpenSim/Data/MySQL/Resources/001_UserStore.sql +++ b/OpenSim/Data/MySQL/Resources/UserStore.migrations | |||
@@ -1,3 +1,5 @@ | |||
1 | :VERSION 1 # ----------------------------- | ||
2 | |||
1 | BEGIN; | 3 | BEGIN; |
2 | 4 | ||
3 | SET FOREIGN_KEY_CHECKS=0; | 5 | SET FOREIGN_KEY_CHECKS=0; |
@@ -104,4 +106,63 @@ CREATE TABLE `users` ( | |||
104 | -- ---------------------------- | 106 | -- ---------------------------- |
105 | -- Records | 107 | -- Records |
106 | -- ---------------------------- | 108 | -- ---------------------------- |
107 | COMMIT; \ No newline at end of file | 109 | COMMIT; |
110 | |||
111 | :VERSION 2 # ----------------------------- | ||
112 | |||
113 | BEGIN; | ||
114 | |||
115 | ALTER TABLE users add homeRegionID char(36) NOT NULL default '00000000-0000-0000-0000-000000000000'; | ||
116 | |||
117 | COMMIT; | ||
118 | |||
119 | :VERSION 3 # ----------------------------- | ||
120 | |||
121 | BEGIN; | ||
122 | |||
123 | ALTER TABLE users add userFlags integer NOT NULL default 0; | ||
124 | ALTER TABLE users add godLevel integer NOT NULL default 0; | ||
125 | |||
126 | COMMIT; | ||
127 | |||
128 | :VERSION 4 # ----------------------------- | ||
129 | |||
130 | BEGIN; | ||
131 | |||
132 | ALTER TABLE users add customType varchar(32) not null default ''; | ||
133 | ALTER TABLE users add partner char(36) not null default '00000000-0000-0000-0000-000000000000'; | ||
134 | |||
135 | COMMIT; | ||
136 | |||
137 | :VERSION 5 # ----------------------------- | ||
138 | |||
139 | BEGIN; | ||
140 | |||
141 | CREATE TABLE `avatarattachments` (`UUID` char(36) NOT NULL, `attachpoint` int(11) NOT NULL, `item` char(36) NOT NULL, `asset` char(36) NOT NULL) ENGINE=InnoDB; | ||
142 | |||
143 | COMMIT; | ||
144 | |||
145 | :VERSION 6 # ----------------------------- | ||
146 | |||
147 | BEGIN; | ||
148 | |||
149 | ALTER TABLE agents add currentLookAt varchar(36) not null default ''; | ||
150 | |||
151 | COMMIT; | ||
152 | |||
153 | :VERSION 7 # ----------------------------- | ||
154 | |||
155 | BEGIN; | ||
156 | |||
157 | ALTER TABLE users add email varchar(250); | ||
158 | |||
159 | COMMIT; | ||
160 | |||
161 | :VERSION 8 # ----------------------------- | ||
162 | |||
163 | BEGIN; | ||
164 | |||
165 | ALTER TABLE users add scopeID char(36) not null default '00000000-0000-0000-0000-000000000000'; | ||
166 | |||
167 | COMMIT; | ||
168 | |||
diff --git a/OpenSim/Data/SQLite/Resources/001_AssetStore.sql b/OpenSim/Data/SQLite/Resources/001_AssetStore.sql deleted file mode 100644 index 2e026ca..0000000 --- a/OpenSim/Data/SQLite/Resources/001_AssetStore.sql +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | BEGIN TRANSACTION; | ||
2 | CREATE TABLE assets( | ||
3 | UUID varchar(255) primary key, | ||
4 | Name varchar(255), | ||
5 | Description varchar(255), | ||
6 | Type integer, | ||
7 | InvType integer, | ||
8 | Local integer, | ||
9 | Temporary integer, | ||
10 | Data blob); | ||
11 | |||
12 | COMMIT; | ||
diff --git a/OpenSim/Data/SQLite/Resources/001_InventoryStore.sql b/OpenSim/Data/SQLite/Resources/001_InventoryStore.sql deleted file mode 100644 index 554d5c2..0000000 --- a/OpenSim/Data/SQLite/Resources/001_InventoryStore.sql +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | BEGIN TRANSACTION; | ||
2 | |||
3 | CREATE TABLE inventoryfolders( | ||
4 | UUID varchar(255) primary key, | ||
5 | name varchar(255), | ||
6 | agentID varchar(255), | ||
7 | parentID varchar(255), | ||
8 | type integer, | ||
9 | version integer); | ||
10 | |||
11 | CREATE TABLE inventoryitems( | ||
12 | UUID varchar(255) primary key, | ||
13 | assetID varchar(255), | ||
14 | assetType integer, | ||
15 | invType integer, | ||
16 | parentFolderID varchar(255), | ||
17 | avatarID varchar(255), | ||
18 | creatorsID varchar(255), | ||
19 | inventoryName varchar(255), | ||
20 | inventoryDescription varchar(255), | ||
21 | inventoryNextPermissions integer, | ||
22 | inventoryCurrentPermissions integer, | ||
23 | inventoryBasePermissions integer, | ||
24 | inventoryEveryOnePermissions integer, | ||
25 | salePrice integer default 99, | ||
26 | saleType integer default 0, | ||
27 | creationDate integer default 2000, | ||
28 | groupID varchar(255) default '00000000-0000-0000-0000-000000000000', | ||
29 | groupOwned integer default 0, | ||
30 | flags integer default 0); | ||
31 | |||
32 | COMMIT; | ||
diff --git a/OpenSim/Data/SQLite/Resources/001_RegionStore.sql b/OpenSim/Data/SQLite/Resources/001_RegionStore.sql deleted file mode 100644 index 39e8180..0000000 --- a/OpenSim/Data/SQLite/Resources/001_RegionStore.sql +++ /dev/null | |||
@@ -1,144 +0,0 @@ | |||
1 | BEGIN TRANSACTION; | ||
2 | |||
3 | CREATE TABLE prims( | ||
4 | UUID varchar(255) primary key, | ||
5 | RegionUUID varchar(255), | ||
6 | ParentID integer, | ||
7 | CreationDate integer, | ||
8 | Name varchar(255), | ||
9 | SceneGroupID varchar(255), | ||
10 | Text varchar(255), | ||
11 | Description varchar(255), | ||
12 | SitName varchar(255), | ||
13 | TouchName varchar(255), | ||
14 | CreatorID varchar(255), | ||
15 | OwnerID varchar(255), | ||
16 | GroupID varchar(255), | ||
17 | LastOwnerID varchar(255), | ||
18 | OwnerMask integer, | ||
19 | NextOwnerMask integer, | ||
20 | GroupMask integer, | ||
21 | EveryoneMask integer, | ||
22 | BaseMask integer, | ||
23 | PositionX float, | ||
24 | PositionY float, | ||
25 | PositionZ float, | ||
26 | GroupPositionX float, | ||
27 | GroupPositionY float, | ||
28 | GroupPositionZ float, | ||
29 | VelocityX float, | ||
30 | VelocityY float, | ||
31 | VelocityZ float, | ||
32 | AngularVelocityX float, | ||
33 | AngularVelocityY float, | ||
34 | AngularVelocityZ float, | ||
35 | AccelerationX float, | ||
36 | AccelerationY float, | ||
37 | AccelerationZ float, | ||
38 | RotationX float, | ||
39 | RotationY float, | ||
40 | RotationZ float, | ||
41 | RotationW float, | ||
42 | ObjectFlags integer, | ||
43 | SitTargetOffsetX float NOT NULL default 0, | ||
44 | SitTargetOffsetY float NOT NULL default 0, | ||
45 | SitTargetOffsetZ float NOT NULL default 0, | ||
46 | SitTargetOrientW float NOT NULL default 0, | ||
47 | SitTargetOrientX float NOT NULL default 0, | ||
48 | SitTargetOrientY float NOT NULL default 0, | ||
49 | SitTargetOrientZ float NOT NULL default 0); | ||
50 | |||
51 | CREATE TABLE primshapes( | ||
52 | UUID varchar(255) primary key, | ||
53 | Shape integer, | ||
54 | ScaleX float, | ||
55 | ScaleY float, | ||
56 | ScaleZ float, | ||
57 | PCode integer, | ||
58 | PathBegin integer, | ||
59 | PathEnd integer, | ||
60 | PathScaleX integer, | ||
61 | PathScaleY integer, | ||
62 | PathShearX integer, | ||
63 | PathShearY integer, | ||
64 | PathSkew integer, | ||
65 | PathCurve integer, | ||
66 | PathRadiusOffset integer, | ||
67 | PathRevolutions integer, | ||
68 | PathTaperX integer, | ||
69 | PathTaperY integer, | ||
70 | PathTwist integer, | ||
71 | PathTwistBegin integer, | ||
72 | ProfileBegin integer, | ||
73 | ProfileEnd integer, | ||
74 | ProfileCurve integer, | ||
75 | ProfileHollow integer, | ||
76 | Texture blob, | ||
77 | ExtraParams blob, | ||
78 | State Integer NOT NULL default 0); | ||
79 | |||
80 | CREATE TABLE primitems( | ||
81 | itemID varchar(255) primary key, | ||
82 | primID varchar(255), | ||
83 | assetID varchar(255), | ||
84 | parentFolderID varchar(255), | ||
85 | invType integer, | ||
86 | assetType integer, | ||
87 | name varchar(255), | ||
88 | description varchar(255), | ||
89 | creationDate integer, | ||
90 | creatorID varchar(255), | ||
91 | ownerID varchar(255), | ||
92 | lastOwnerID varchar(255), | ||
93 | groupID varchar(255), | ||
94 | nextPermissions string, | ||
95 | currentPermissions string, | ||
96 | basePermissions string, | ||
97 | everyonePermissions string, | ||
98 | groupPermissions string); | ||
99 | |||
100 | CREATE TABLE terrain( | ||
101 | RegionUUID varchar(255), | ||
102 | Revision integer, | ||
103 | Heightfield blob); | ||
104 | |||
105 | CREATE TABLE land( | ||
106 | UUID varchar(255) primary key, | ||
107 | RegionUUID varchar(255), | ||
108 | LocalLandID string, | ||
109 | Bitmap blob, | ||
110 | Name varchar(255), | ||
111 | Desc varchar(255), | ||
112 | OwnerUUID varchar(255), | ||
113 | IsGroupOwned string, | ||
114 | Area integer, | ||
115 | AuctionID integer, | ||
116 | Category integer, | ||
117 | ClaimDate integer, | ||
118 | ClaimPrice integer, | ||
119 | GroupUUID varchar(255), | ||
120 | SalePrice integer, | ||
121 | LandStatus integer, | ||
122 | LandFlags string, | ||
123 | LandingType string, | ||
124 | MediaAutoScale string, | ||
125 | MediaTextureUUID varchar(255), | ||
126 | MediaURL varchar(255), | ||
127 | MusicURL varchar(255), | ||
128 | PassHours float, | ||
129 | PassPrice string, | ||
130 | SnapshotUUID varchar(255), | ||
131 | UserLocationX float, | ||
132 | UserLocationY float, | ||
133 | UserLocationZ float, | ||
134 | UserLookAtX float, | ||
135 | UserLookAtY float, | ||
136 | UserLookAtZ float, | ||
137 | AuthbuyerID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000'); | ||
138 | |||
139 | CREATE TABLE landaccesslist( | ||
140 | LandUUID varchar(255), | ||
141 | AccessUUID varchar(255), | ||
142 | Flags string); | ||
143 | |||
144 | COMMIT; | ||
diff --git a/OpenSim/Data/SQLite/Resources/001_UserStore.sql b/OpenSim/Data/SQLite/Resources/001_UserStore.sql deleted file mode 100644 index b584594..0000000 --- a/OpenSim/Data/SQLite/Resources/001_UserStore.sql +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | BEGIN TRANSACTION; | ||
2 | |||
3 | -- users table | ||
4 | CREATE TABLE users( | ||
5 | UUID varchar(255) primary key, | ||
6 | username varchar(255), | ||
7 | surname varchar(255), | ||
8 | passwordHash varchar(255), | ||
9 | passwordSalt varchar(255), | ||
10 | homeRegionX integer, | ||
11 | homeRegionY integer, | ||
12 | homeLocationX float, | ||
13 | homeLocationY float, | ||
14 | homeLocationZ float, | ||
15 | homeLookAtX float, | ||
16 | homeLookAtY float, | ||
17 | homeLookAtZ float, | ||
18 | created integer, | ||
19 | lastLogin integer, | ||
20 | rootInventoryFolderID varchar(255), | ||
21 | userInventoryURI varchar(255), | ||
22 | userAssetURI varchar(255), | ||
23 | profileCanDoMask integer, | ||
24 | profileWantDoMask integer, | ||
25 | profileAboutText varchar(255), | ||
26 | profileFirstText varchar(255), | ||
27 | profileImage varchar(255), | ||
28 | profileFirstImage varchar(255), | ||
29 | webLoginKey text default '00000000-0000-0000-0000-000000000000'); | ||
30 | -- friends table | ||
31 | CREATE TABLE userfriends( | ||
32 | ownerID varchar(255), | ||
33 | friendID varchar(255), | ||
34 | friendPerms integer, | ||
35 | ownerPerms integer, | ||
36 | datetimestamp integer); | ||
37 | |||
38 | COMMIT; | ||
39 | |||
diff --git a/OpenSim/Data/SQLite/Resources/002_AssetStore.sql b/OpenSim/Data/SQLite/Resources/002_AssetStore.sql deleted file mode 100644 index 5339b84..0000000 --- a/OpenSim/Data/SQLite/Resources/002_AssetStore.sql +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | BEGIN TRANSACTION; | ||
2 | |||
3 | CREATE TEMPORARY TABLE assets_backup(UUID,Name,Description,Type,Local,Temporary,Data); | ||
4 | INSERT INTO assets_backup SELECT UUID,Name,Description,Type,Local,Temporary,Data FROM assets; | ||
5 | DROP TABLE assets; | ||
6 | CREATE TABLE assets(UUID,Name,Description,Type,Local,Temporary,Data); | ||
7 | INSERT INTO assets SELECT UUID,Name,Description,Type,Local,Temporary,Data FROM assets_backup; | ||
8 | DROP TABLE assets_backup; | ||
9 | |||
10 | COMMIT; | ||
diff --git a/OpenSim/Data/SQLite/Resources/002_AuthStore.sql b/OpenSim/Data/SQLite/Resources/002_AuthStore.sql deleted file mode 100644 index 3237b68..0000000 --- a/OpenSim/Data/SQLite/Resources/002_AuthStore.sql +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | BEGIN TRANSACTION; | ||
2 | |||
3 | INSERT INTO auth (UUID, passwordHash, passwordSalt, webLoginKey) SELECT `UUID` AS UUID, `passwordHash` AS passwordHash, `passwordSalt` AS passwordSalt, `webLoginKey` AS webLoginKey FROM users; | ||
4 | |||
5 | COMMIT; | ||
diff --git a/OpenSim/Data/SQLite/Resources/002_FriendsStore.sql b/OpenSim/Data/SQLite/Resources/002_FriendsStore.sql deleted file mode 100644 index 6733502..0000000 --- a/OpenSim/Data/SQLite/Resources/002_FriendsStore.sql +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | BEGIN TRANSACTION; | ||
2 | |||
3 | INSERT INTO `Friends` SELECT `ownerID`, `friendID`, `friendPerms`, 0 FROM `userfriends`; | ||
4 | |||
5 | COMMIT; | ||
diff --git a/OpenSim/Data/SQLite/Resources/002_InventoryStore.sql b/OpenSim/Data/SQLite/Resources/002_InventoryStore.sql deleted file mode 100644 index 01951d6..0000000 --- a/OpenSim/Data/SQLite/Resources/002_InventoryStore.sql +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | BEGIN TRANSACTION; | ||
2 | |||
3 | create index inventoryfolders_agentid on inventoryfolders(agentid); | ||
4 | create index inventoryfolders_parentid on inventoryfolders(parentid); | ||
5 | create index inventoryitems_parentfolderid on inventoryitems(parentfolderid); | ||
6 | create index inventoryitems_avatarid on inventoryitems(avatarid); | ||
7 | |||
8 | COMMIT; \ No newline at end of file | ||
diff --git a/OpenSim/Data/SQLite/Resources/002_RegionStore.sql b/OpenSim/Data/SQLite/Resources/002_RegionStore.sql deleted file mode 100644 index c5c7c99..0000000 --- a/OpenSim/Data/SQLite/Resources/002_RegionStore.sql +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | BEGIN TRANSACTION; | ||
2 | |||
3 | CREATE TABLE regionban( | ||
4 | regionUUID varchar (255), | ||
5 | bannedUUID varchar (255), | ||
6 | bannedIp varchar (255), | ||
7 | bannedIpHostMask varchar (255) | ||
8 | ); | ||
9 | |||
10 | COMMIT; \ No newline at end of file | ||
diff --git a/OpenSim/Data/SQLite/Resources/002_UserAccount.sql b/OpenSim/Data/SQLite/Resources/002_UserAccount.sql deleted file mode 100644 index c7a6293..0000000 --- a/OpenSim/Data/SQLite/Resources/002_UserAccount.sql +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | BEGIN TRANSACTION; | ||
2 | |||
3 | INSERT INTO UserAccounts (PrincipalID, ScopeID, FirstName, LastName, Email, ServiceURLs, Created) SELECT `UUID` AS PrincipalID, '00000000-0000-0000-0000-000000000000' AS ScopeID, username AS FirstName, surname AS LastName, '' as Email, '' AS ServiceURLs, created as Created FROM users; | ||
4 | |||
5 | COMMIT; | ||
diff --git a/OpenSim/Data/SQLite/Resources/002_UserStore.sql b/OpenSim/Data/SQLite/Resources/002_UserStore.sql deleted file mode 100644 index 48fc680..0000000 --- a/OpenSim/Data/SQLite/Resources/002_UserStore.sql +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE users add homeRegionID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000'; | ||
4 | |||
5 | COMMIT; | ||
diff --git a/OpenSim/Data/SQLite/Resources/003_AssetStore.sql b/OpenSim/Data/SQLite/Resources/003_AssetStore.sql deleted file mode 100644 index f54f8d9..0000000 --- a/OpenSim/Data/SQLite/Resources/003_AssetStore.sql +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | DELETE FROM assets WHERE UUID = 'dc4b9f0bd00845c696a401dd947ac621' | ||
diff --git a/OpenSim/Data/SQLite/Resources/003_InventoryStore.sql b/OpenSim/Data/SQLite/Resources/003_InventoryStore.sql deleted file mode 100644 index 4c6da91..0000000 --- a/OpenSim/Data/SQLite/Resources/003_InventoryStore.sql +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | alter table inventoryitems add column inventoryGroupPermissions integer unsigned not null default 0; | ||
4 | |||
5 | COMMIT; | ||
diff --git a/OpenSim/Data/SQLite/Resources/003_RegionStore.sql b/OpenSim/Data/SQLite/Resources/003_RegionStore.sql deleted file mode 100644 index 4db2f75..0000000 --- a/OpenSim/Data/SQLite/Resources/003_RegionStore.sql +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE primitems add flags integer not null default 0; | ||
4 | |||
5 | COMMIT; \ No newline at end of file | ||
diff --git a/OpenSim/Data/SQLite/Resources/003_UserStore.sql b/OpenSim/Data/SQLite/Resources/003_UserStore.sql deleted file mode 100644 index 6f890ee..0000000 --- a/OpenSim/Data/SQLite/Resources/003_UserStore.sql +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE users add userFlags integer NOT NULL default 0; | ||
4 | ALTER TABLE users add godLevel integer NOT NULL default 0; | ||
5 | |||
6 | COMMIT; | ||
diff --git a/OpenSim/Data/SQLite/Resources/004_AssetStore.sql b/OpenSim/Data/SQLite/Resources/004_AssetStore.sql deleted file mode 100644 index 39421c4..0000000 --- a/OpenSim/Data/SQLite/Resources/004_AssetStore.sql +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | update assets | ||
4 | set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12) | ||
5 | where UUID not like '%-%'; | ||
6 | |||
7 | COMMIT; | ||
diff --git a/OpenSim/Data/SQLite/Resources/004_RegionStore.sql b/OpenSim/Data/SQLite/Resources/004_RegionStore.sql deleted file mode 100644 index de328cb..0000000 --- a/OpenSim/Data/SQLite/Resources/004_RegionStore.sql +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | create table regionsettings ( | ||
4 | regionUUID char(36) not null, | ||
5 | block_terraform integer not null, | ||
6 | block_fly integer not null, | ||
7 | allow_damage integer not null, | ||
8 | restrict_pushing integer not null, | ||
9 | allow_land_resell integer not null, | ||
10 | allow_land_join_divide integer not null, | ||
11 | block_show_in_search integer not null, | ||
12 | agent_limit integer not null, | ||
13 | object_bonus float not null, | ||
14 | maturity integer not null, | ||
15 | disable_scripts integer not null, | ||
16 | disable_collisions integer not null, | ||
17 | disable_physics integer not null, | ||
18 | terrain_texture_1 char(36) not null, | ||
19 | terrain_texture_2 char(36) not null, | ||
20 | terrain_texture_3 char(36) not null, | ||
21 | terrain_texture_4 char(36) not null, | ||
22 | elevation_1_nw float not null, | ||
23 | elevation_2_nw float not null, | ||
24 | elevation_1_ne float not null, | ||
25 | elevation_2_ne float not null, | ||
26 | elevation_1_se float not null, | ||
27 | elevation_2_se float not null, | ||
28 | elevation_1_sw float not null, | ||
29 | elevation_2_sw float not null, | ||
30 | water_height float not null, | ||
31 | terrain_raise_limit float not null, | ||
32 | terrain_lower_limit float not null, | ||
33 | use_estate_sun integer not null, | ||
34 | fixed_sun integer not null, | ||
35 | sun_position float not null, | ||
36 | covenant char(36)); | ||
37 | |||
38 | COMMIT; | ||
diff --git a/OpenSim/Data/SQLite/Resources/004_UserStore.sql b/OpenSim/Data/SQLite/Resources/004_UserStore.sql deleted file mode 100644 index 03142af..0000000 --- a/OpenSim/Data/SQLite/Resources/004_UserStore.sql +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE users add customType varchar(32) not null default ''; | ||
4 | ALTER TABLE users add partner char(36) not null default '00000000-0000-0000-0000-000000000000'; | ||
5 | |||
6 | COMMIT; | ||
diff --git a/OpenSim/Data/SQLite/Resources/005_RegionStore.sql b/OpenSim/Data/SQLite/Resources/005_RegionStore.sql deleted file mode 100644 index 1f6d1bd..0000000 --- a/OpenSim/Data/SQLite/Resources/005_RegionStore.sql +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | delete from regionsettings; | ||
4 | |||
5 | COMMIT; | ||
diff --git a/OpenSim/Data/SQLite/Resources/005_UserStore.sql b/OpenSim/Data/SQLite/Resources/005_UserStore.sql deleted file mode 100644 index e45c09a..0000000 --- a/OpenSim/Data/SQLite/Resources/005_UserStore.sql +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | CREATE TABLE `avatarattachments` (`UUID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', `attachpoint` int(11) NOT NULL DEFAULT 0, `item` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', `asset` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000'); | ||
4 | |||
5 | COMMIT; | ||
diff --git a/OpenSim/Data/SQLite/Resources/006_RegionStore.sql b/OpenSim/Data/SQLite/Resources/006_RegionStore.sql deleted file mode 100644 index 94ed818..0000000 --- a/OpenSim/Data/SQLite/Resources/006_RegionStore.sql +++ /dev/null | |||
@@ -1,102 +0,0 @@ | |||
1 | BEGIN TRANSACTION; | ||
2 | |||
3 | CREATE TABLE estate_groups ( | ||
4 | EstateID int(10) NOT NULL, | ||
5 | uuid char(36) NOT NULL | ||
6 | ); | ||
7 | |||
8 | CREATE TABLE estate_managers ( | ||
9 | EstateID int(10) NOT NULL, | ||
10 | uuid char(36) NOT NULL | ||
11 | ); | ||
12 | |||
13 | CREATE TABLE estate_map ( | ||
14 | RegionID char(36) NOT NULL default '00000000-0000-0000-0000-000000000000', | ||
15 | EstateID int(11) NOT NULL | ||
16 | ); | ||
17 | |||
18 | CREATE TABLE estate_settings ( | ||
19 | EstateID INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, | ||
20 | EstateName varchar(64) default NULL, | ||
21 | AbuseEmailToEstateOwner tinyint(4) NOT NULL, | ||
22 | DenyAnonymous tinyint(4) NOT NULL, | ||
23 | ResetHomeOnTeleport tinyint(4) NOT NULL, | ||
24 | FixedSun tinyint(4) NOT NULL, | ||
25 | DenyTransacted tinyint(4) NOT NULL, | ||
26 | BlockDwell tinyint(4) NOT NULL, | ||
27 | DenyIdentified tinyint(4) NOT NULL, | ||
28 | AllowVoice tinyint(4) NOT NULL, | ||
29 | UseGlobalTime tinyint(4) NOT NULL, | ||
30 | PricePerMeter int(11) NOT NULL, | ||
31 | TaxFree tinyint(4) NOT NULL, | ||
32 | AllowDirectTeleport tinyint(4) NOT NULL, | ||
33 | RedirectGridX int(11) NOT NULL, | ||
34 | RedirectGridY int(11) NOT NULL, | ||
35 | ParentEstateID int(10) NOT NULL, | ||
36 | SunPosition double NOT NULL, | ||
37 | EstateSkipScripts tinyint(4) NOT NULL, | ||
38 | BillableFactor float NOT NULL, | ||
39 | PublicAccess tinyint(4) NOT NULL | ||
40 | ); | ||
41 | insert into estate_settings (EstateID,EstateName,AbuseEmailToEstateOwner,DenyAnonymous,ResetHomeOnTeleport,FixedSun,DenyTransacted,BlockDwell,DenyIdentified,AllowVoice,UseGlobalTime,PricePerMeter,TaxFree,AllowDirectTeleport,RedirectGridX,RedirectGridY,ParentEstateID,SunPosition,PublicAccess,EstateSkipScripts,BillableFactor) values ( 99, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''); | ||
42 | delete from estate_settings; | ||
43 | CREATE TABLE estate_users ( | ||
44 | EstateID int(10) NOT NULL, | ||
45 | uuid char(36) NOT NULL | ||
46 | ); | ||
47 | |||
48 | CREATE TABLE estateban ( | ||
49 | EstateID int(10) NOT NULL, | ||
50 | bannedUUID varchar(36) NOT NULL, | ||
51 | bannedIp varchar(16) NOT NULL, | ||
52 | bannedIpHostMask varchar(16) NOT NULL, | ||
53 | bannedNameMask varchar(64) default NULL | ||
54 | ); | ||
55 | |||
56 | drop table regionsettings; | ||
57 | CREATE TABLE regionsettings ( | ||
58 | regionUUID char(36) NOT NULL, | ||
59 | block_terraform int(11) NOT NULL, | ||
60 | block_fly int(11) NOT NULL, | ||
61 | allow_damage int(11) NOT NULL, | ||
62 | restrict_pushing int(11) NOT NULL, | ||
63 | allow_land_resell int(11) NOT NULL, | ||
64 | allow_land_join_divide int(11) NOT NULL, | ||
65 | block_show_in_search int(11) NOT NULL, | ||
66 | agent_limit int(11) NOT NULL, | ||
67 | object_bonus float NOT NULL, | ||
68 | maturity int(11) NOT NULL, | ||
69 | disable_scripts int(11) NOT NULL, | ||
70 | disable_collisions int(11) NOT NULL, | ||
71 | disable_physics int(11) NOT NULL, | ||
72 | terrain_texture_1 char(36) NOT NULL, | ||
73 | terrain_texture_2 char(36) NOT NULL, | ||
74 | terrain_texture_3 char(36) NOT NULL, | ||
75 | terrain_texture_4 char(36) NOT NULL, | ||
76 | elevation_1_nw float NOT NULL, | ||
77 | elevation_2_nw float NOT NULL, | ||
78 | elevation_1_ne float NOT NULL, | ||
79 | elevation_2_ne float NOT NULL, | ||
80 | elevation_1_se float NOT NULL, | ||
81 | elevation_2_se float NOT NULL, | ||
82 | elevation_1_sw float NOT NULL, | ||
83 | elevation_2_sw float NOT NULL, | ||
84 | water_height float NOT NULL, | ||
85 | terrain_raise_limit float NOT NULL, | ||
86 | terrain_lower_limit float NOT NULL, | ||
87 | use_estate_sun int(11) NOT NULL, | ||
88 | fixed_sun int(11) NOT NULL, | ||
89 | sun_position float NOT NULL, | ||
90 | covenant char(36) default NULL, | ||
91 | Sandbox tinyint(4) NOT NULL, | ||
92 | PRIMARY KEY (regionUUID) | ||
93 | ); | ||
94 | |||
95 | CREATE INDEX estate_ban_estate_id on estateban(EstateID); | ||
96 | CREATE INDEX estate_groups_estate_id on estate_groups(EstateID); | ||
97 | CREATE INDEX estate_managers_estate_id on estate_managers(EstateID); | ||
98 | CREATE INDEX estate_map_estate_id on estate_map(EstateID); | ||
99 | CREATE UNIQUE INDEX estate_map_region_id on estate_map(RegionID); | ||
100 | CREATE INDEX estate_users_estate_id on estate_users(EstateID); | ||
101 | |||
102 | COMMIT; \ No newline at end of file | ||
diff --git a/OpenSim/Data/SQLite/Resources/006_UserStore.sql b/OpenSim/Data/SQLite/Resources/006_UserStore.sql deleted file mode 100644 index f9454c5..0000000 --- a/OpenSim/Data/SQLite/Resources/006_UserStore.sql +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | BEGIN TRANSACTION; | ||
2 | |||
3 | -- usersagents table | ||
4 | CREATE TABLE IF NOT EXISTS useragents( | ||
5 | UUID varchar(255) primary key, | ||
6 | agentIP varchar(255), | ||
7 | agentPort integer, | ||
8 | agentOnline boolean, | ||
9 | sessionID varchar(255), | ||
10 | secureSessionID varchar(255), | ||
11 | regionID varchar(255), | ||
12 | loginTime integer, | ||
13 | logoutTime integer, | ||
14 | currentRegion varchar(255), | ||
15 | currentHandle varchar(255), | ||
16 | currentPosX float, | ||
17 | currentPosY float, | ||
18 | currentPosZ float); | ||
19 | |||
20 | COMMIT; | ||
diff --git a/OpenSim/Data/SQLite/Resources/007_RegionStore.sql b/OpenSim/Data/SQLite/Resources/007_RegionStore.sql deleted file mode 100644 index 1c813a0..0000000 --- a/OpenSim/Data/SQLite/Resources/007_RegionStore.sql +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | begin; | ||
2 | |||
3 | alter table estate_settings add column AbuseEmail varchar(255) not null default ''; | ||
4 | |||
5 | alter table estate_settings add column EstateOwner varchar(36) not null default ''; | ||
6 | |||
7 | commit; | ||
8 | |||
diff --git a/OpenSim/Data/SQLite/Resources/007_UserStore.sql b/OpenSim/Data/SQLite/Resources/007_UserStore.sql deleted file mode 100644 index 8b0cd28..0000000 --- a/OpenSim/Data/SQLite/Resources/007_UserStore.sql +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | BEGIN TRANSACTION; | ||
2 | |||
3 | ALTER TABLE useragents add currentLookAtX float not null default 128; | ||
4 | ALTER TABLE useragents add currentLookAtY float not null default 128; | ||
5 | ALTER TABLE useragents add currentLookAtZ float not null default 70; | ||
6 | |||
7 | COMMIT; | ||
diff --git a/OpenSim/Data/SQLite/Resources/008_RegionStore.sql b/OpenSim/Data/SQLite/Resources/008_RegionStore.sql deleted file mode 100644 index 28bfbf5..0000000 --- a/OpenSim/Data/SQLite/Resources/008_RegionStore.sql +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | begin; | ||
2 | |||
3 | alter table estate_settings add column DenyMinors tinyint not null default 0; | ||
4 | |||
5 | commit; | ||
6 | |||
diff --git a/OpenSim/Data/SQLite/Resources/008_UserStore.sql b/OpenSim/Data/SQLite/Resources/008_UserStore.sql deleted file mode 100644 index 97da818..0000000 --- a/OpenSim/Data/SQLite/Resources/008_UserStore.sql +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | BEGIN TRANSACTION; | ||
2 | |||
3 | ALTER TABLE users add email varchar(250); | ||
4 | |||
5 | COMMIT; | ||
diff --git a/OpenSim/Data/SQLite/Resources/009_RegionStore.sql b/OpenSim/Data/SQLite/Resources/009_RegionStore.sql deleted file mode 100644 index 1f40548..0000000 --- a/OpenSim/Data/SQLite/Resources/009_RegionStore.sql +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE prims ADD COLUMN ColorR integer not null default 0; | ||
4 | ALTER TABLE prims ADD COLUMN ColorG integer not null default 0; | ||
5 | ALTER TABLE prims ADD COLUMN ColorB integer not null default 0; | ||
6 | ALTER TABLE prims ADD COLUMN ColorA integer not null default 0; | ||
7 | |||
8 | COMMIT; | ||
diff --git a/OpenSim/Data/SQLite/Resources/009_UserStore.sql b/OpenSim/Data/SQLite/Resources/009_UserStore.sql deleted file mode 100644 index 8ab03ef..0000000 --- a/OpenSim/Data/SQLite/Resources/009_UserStore.sql +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | update users | ||
4 | set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12) | ||
5 | where UUID not like '%-%'; | ||
6 | |||
7 | update useragents | ||
8 | set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12) | ||
9 | where UUID not like '%-%'; | ||
10 | |||
11 | COMMIT; | ||
diff --git a/OpenSim/Data/SQLite/Resources/010_RegionStore.sql b/OpenSim/Data/SQLite/Resources/010_RegionStore.sql deleted file mode 100644 index b91ccf0..0000000 --- a/OpenSim/Data/SQLite/Resources/010_RegionStore.sql +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE prims ADD COLUMN ClickAction INTEGER NOT NULL default 0; | ||
4 | |||
5 | COMMIT; | ||
diff --git a/OpenSim/Data/SQLite/Resources/010_UserStore.sql b/OpenSim/Data/SQLite/Resources/010_UserStore.sql deleted file mode 100644 index 5f956da..0000000 --- a/OpenSim/Data/SQLite/Resources/010_UserStore.sql +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | BEGIN TRANSACTION; | ||
2 | |||
3 | CREATE TABLE IF NOT EXISTS avatarappearance( | ||
4 | Owner varchar(36) NOT NULL primary key, | ||
5 | BodyItem varchar(36) DEFAULT NULL, | ||
6 | BodyAsset varchar(36) DEFAULT NULL, | ||
7 | SkinItem varchar(36) DEFAULT NULL, | ||
8 | SkinAsset varchar(36) DEFAULT NULL, | ||
9 | HairItem varchar(36) DEFAULT NULL, | ||
10 | HairAsset varchar(36) DEFAULT NULL, | ||
11 | EyesItem varchar(36) DEFAULT NULL, | ||
12 | EyesAsset varchar(36) DEFAULT NULL, | ||
13 | ShirtItem varchar(36) DEFAULT NULL, | ||
14 | ShirtAsset varchar(36) DEFAULT NULL, | ||
15 | PantsItem varchar(36) DEFAULT NULL, | ||
16 | PantsAsset varchar(36) DEFAULT NULL, | ||
17 | ShoesItem varchar(36) DEFAULT NULL, | ||
18 | ShoesAsset varchar(36) DEFAULT NULL, | ||
19 | SocksItem varchar(36) DEFAULT NULL, | ||
20 | SocksAsset varchar(36) DEFAULT NULL, | ||
21 | JacketItem varchar(36) DEFAULT NULL, | ||
22 | JacketAsset varchar(36) DEFAULT NULL, | ||
23 | GlovesItem varchar(36) DEFAULT NULL, | ||
24 | GlovesAsset varchar(36) DEFAULT NULL, | ||
25 | UnderShirtItem varchar(36) DEFAULT NULL, | ||
26 | UnderShirtAsset varchar(36) DEFAULT NULL, | ||
27 | UnderPantsItem varchar(36) DEFAULT NULL, | ||
28 | UnderPantsAsset varchar(36) DEFAULT NULL, | ||
29 | SkirtItem varchar(36) DEFAULT NULL, | ||
30 | SkirtAsset varchar(36) DEFAULT NULL, | ||
31 | Texture blob, | ||
32 | VisualParams blob, | ||
33 | Serial int DEFAULT NULL, | ||
34 | AvatarHeight float DEFAULT NULL | ||
35 | ); | ||
36 | |||
37 | COMMIT; | ||
diff --git a/OpenSim/Data/SQLite/Resources/011_RegionStore.sql b/OpenSim/Data/SQLite/Resources/011_RegionStore.sql deleted file mode 100644 index 42bef89..0000000 --- a/OpenSim/Data/SQLite/Resources/011_RegionStore.sql +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE prims ADD COLUMN PayPrice INTEGER NOT NULL default 0; | ||
4 | ALTER TABLE prims ADD COLUMN PayButton1 INTEGER NOT NULL default 0; | ||
5 | ALTER TABLE prims ADD COLUMN PayButton2 INTEGER NOT NULL default 0; | ||
6 | ALTER TABLE prims ADD COLUMN PayButton3 INTEGER NOT NULL default 0; | ||
7 | ALTER TABLE prims ADD COLUMN PayButton4 INTEGER NOT NULL default 0; | ||
8 | ALTER TABLE prims ADD COLUMN LoopedSound varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000'; | ||
9 | ALTER TABLE prims ADD COLUMN LoopedSoundGain float NOT NULL default 0; | ||
10 | ALTER TABLE prims ADD COLUMN TextureAnimation string; | ||
11 | ALTER TABLE prims ADD COLUMN ParticleSystem string; | ||
12 | ALTER TABLE prims ADD COLUMN OmegaX float NOT NULL default 0; | ||
13 | ALTER TABLE prims ADD COLUMN OmegaY float NOT NULL default 0; | ||
14 | ALTER TABLE prims ADD COLUMN OmegaZ float NOT NULL default 0; | ||
15 | ALTER TABLE prims ADD COLUMN CameraEyeOffsetX float NOT NULL default 0; | ||
16 | ALTER TABLE prims ADD COLUMN CameraEyeOffsetY float NOT NULL default 0; | ||
17 | ALTER TABLE prims ADD COLUMN CameraEyeOffsetZ float NOT NULL default 0; | ||
18 | ALTER TABLE prims ADD COLUMN CameraAtOffsetX float NOT NULL default 0; | ||
19 | ALTER TABLE prims ADD COLUMN CameraAtOffsetY float NOT NULL default 0; | ||
20 | ALTER TABLE prims ADD COLUMN CameraAtOffsetZ float NOT NULL default 0; | ||
21 | ALTER TABLE prims ADD COLUMN ForceMouselook string NOT NULL default 0; | ||
22 | ALTER TABLE prims ADD COLUMN ScriptAccessPin INTEGER NOT NULL default 0; | ||
23 | ALTER TABLE prims ADD COLUMN AllowedDrop INTEGER NOT NULL default 0; | ||
24 | ALTER TABLE prims ADD COLUMN DieAtEdge string NOT NULL default 0; | ||
25 | ALTER TABLE prims ADD COLUMN SalePrice INTEGER NOT NULL default 0; | ||
26 | ALTER TABLE prims ADD COLUMN SaleType string NOT NULL default 0; | ||
27 | |||
28 | COMMIT; \ No newline at end of file | ||
diff --git a/OpenSim/Data/SQLite/Resources/012_RegionStore.sql b/OpenSim/Data/SQLite/Resources/012_RegionStore.sql deleted file mode 100644 index d952b78..0000000 --- a/OpenSim/Data/SQLite/Resources/012_RegionStore.sql +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE prims ADD COLUMN Material INTEGER NOT NULL default 3; | ||
4 | |||
5 | COMMIT; | ||
diff --git a/OpenSim/Data/SQLite/Resources/013_RegionStore.sql b/OpenSim/Data/SQLite/Resources/013_RegionStore.sql deleted file mode 100644 index 11529cd..0000000 --- a/OpenSim/Data/SQLite/Resources/013_RegionStore.sql +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE land ADD COLUMN OtherCleanTime INTEGER NOT NULL default 0; | ||
4 | ALTER TABLE land ADD COLUMN Dwell INTEGER NOT NULL default 0; | ||
5 | |||
6 | COMMIT; | ||
diff --git a/OpenSim/Data/SQLite/Resources/014_RegionStore.sql b/OpenSim/Data/SQLite/Resources/014_RegionStore.sql deleted file mode 100644 index c59b27e..0000000 --- a/OpenSim/Data/SQLite/Resources/014_RegionStore.sql +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | begin; | ||
2 | |||
3 | ALTER TABLE regionsettings ADD COLUMN sunvectorx double NOT NULL default 0; | ||
4 | ALTER TABLE regionsettings ADD COLUMN sunvectory double NOT NULL default 0; | ||
5 | ALTER TABLE regionsettings ADD COLUMN sunvectorz double NOT NULL default 0; | ||
6 | |||
7 | commit; | ||
8 | |||
diff --git a/OpenSim/Data/SQLite/Resources/015_RegionStore.sql b/OpenSim/Data/SQLite/Resources/015_RegionStore.sql deleted file mode 100644 index c43f356..0000000 --- a/OpenSim/Data/SQLite/Resources/015_RegionStore.sql +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE prims ADD COLUMN CollisionSound varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000'; | ||
4 | ALTER TABLE prims ADD COLUMN CollisionSoundVolume float NOT NULL default 0; | ||
5 | |||
6 | COMMIT; | ||
diff --git a/OpenSim/Data/SQLite/Resources/016_RegionStore.sql b/OpenSim/Data/SQLite/Resources/016_RegionStore.sql deleted file mode 100644 index 52f160c..0000000 --- a/OpenSim/Data/SQLite/Resources/016_RegionStore.sql +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE prims ADD COLUMN VolumeDetect INTEGER NOT NULL DEFAULT 0; | ||
4 | |||
5 | COMMIT; | ||
diff --git a/OpenSim/Data/SQLite/Resources/017_RegionStore.sql b/OpenSim/Data/SQLite/Resources/017_RegionStore.sql deleted file mode 100644 index 6c6b7b5..0000000 --- a/OpenSim/Data/SQLite/Resources/017_RegionStore.sql +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | BEGIN; | ||
2 | CREATE TEMPORARY TABLE prims_backup(UUID,RegionUUID,CreationDate,Name,SceneGroupID,Text,Description,SitName,TouchName,CreatorID,OwnerID,GroupID,LastOwnerID,OwnerMask,NextOwnerMask,GroupMask,EveryoneMask,BaseMask,PositionX,PositionY,PositionZ,GroupPositionX,GroupPositionY,GroupPositionZ,VelocityX,VelocityY,VelocityZ,AngularVelocityX,AngularVelocityY,AngularVelocityZ,AccelerationX,AccelerationY,AccelerationZ,RotationX,RotationY,RotationZ,RotationW,ObjectFlags,SitTargetOffsetX,SitTargetOffsetY,SitTargetOffsetZ,SitTargetOrientW,SitTargetOrientX,SitTargetOrientY,SitTargetOrientZ,ColorR,ColorG,ColorB,ColorA,ClickAction,PayPrice,PayButton1,PayButton2,PayButton3,PayButton4,LoopedSound,LoopedSoundGain,TextureAnimation,ParticleSystem,OmegaX,OmegaY,OmegaZ,CameraEyeOffsetX,CameraEyeOffsetY,CameraEyeOffsetZ,CameraAtOffsetX,CameraAtOffsetY,CameraAtOffsetZ,ForceMouselook,ScriptAccessPin,AllowedDrop,DieAtEdge,SalePrice,SaleType,Material,CollisionSound,CollisionSoundVolume,VolumeDetect); | ||
3 | INSERT INTO prims_backup SELECT UUID,RegionUUID,CreationDate,Name,SceneGroupID,Text,Description,SitName,TouchName,CreatorID,OwnerID,GroupID,LastOwnerID,OwnerMask,NextOwnerMask,GroupMask,EveryoneMask,BaseMask,PositionX,PositionY,PositionZ,GroupPositionX,GroupPositionY,GroupPositionZ,VelocityX,VelocityY,VelocityZ,AngularVelocityX,AngularVelocityY,AngularVelocityZ,AccelerationX,AccelerationY,AccelerationZ,RotationX,RotationY,RotationZ,RotationW,ObjectFlags,SitTargetOffsetX,SitTargetOffsetY,SitTargetOffsetZ,SitTargetOrientW,SitTargetOrientX,SitTargetOrientY,SitTargetOrientZ,ColorR,ColorG,ColorB,ColorA,ClickAction,PayPrice,PayButton1,PayButton2,PayButton3,PayButton4,LoopedSound,LoopedSoundGain,TextureAnimation,ParticleSystem,OmegaX,OmegaY,OmegaZ,CameraEyeOffsetX,CameraEyeOffsetY,CameraEyeOffsetZ,CameraAtOffsetX,CameraAtOffsetY,CameraAtOffsetZ,ForceMouselook,ScriptAccessPin,AllowedDrop,DieAtEdge,SalePrice,SaleType,Material,CollisionSound,CollisionSoundVolume,VolumeDetect FROM prims; | ||
4 | DROP TABLE prims; | ||
5 | CREATE TABLE prims(UUID,RegionUUID,CreationDate,Name,SceneGroupID,Text,Description,SitName,TouchName,CreatorID,OwnerID,GroupID,LastOwnerID,OwnerMask,NextOwnerMask,GroupMask,EveryoneMask,BaseMask,PositionX,PositionY,PositionZ,GroupPositionX,GroupPositionY,GroupPositionZ,VelocityX,VelocityY,VelocityZ,AngularVelocityX,AngularVelocityY,AngularVelocityZ,AccelerationX,AccelerationY,AccelerationZ,RotationX,RotationY,RotationZ,RotationW,ObjectFlags,SitTargetOffsetX,SitTargetOffsetY,SitTargetOffsetZ,SitTargetOrientW,SitTargetOrientX,SitTargetOrientY,SitTargetOrientZ,ColorR,ColorG,ColorB,ColorA,ClickAction,PayPrice,PayButton1,PayButton2,PayButton3,PayButton4,LoopedSound,LoopedSoundGain,TextureAnimation,ParticleSystem,OmegaX,OmegaY,OmegaZ,CameraEyeOffsetX,CameraEyeOffsetY,CameraEyeOffsetZ,CameraAtOffsetX,CameraAtOffsetY,CameraAtOffsetZ,ForceMouselook,ScriptAccessPin,AllowedDrop,DieAtEdge,SalePrice,SaleType,Material,CollisionSound,CollisionSoundVolume,VolumeDetect); | ||
6 | INSERT INTO prims SELECT UUID,RegionUUID,CreationDate,Name,SceneGroupID,Text,Description,SitName,TouchName,CreatorID,OwnerID,GroupID,LastOwnerID,OwnerMask,NextOwnerMask,GroupMask,EveryoneMask,BaseMask,PositionX,PositionY,PositionZ,GroupPositionX,GroupPositionY,GroupPositionZ,VelocityX,VelocityY,VelocityZ,AngularVelocityX,AngularVelocityY,AngularVelocityZ,AccelerationX,AccelerationY,AccelerationZ,RotationX,RotationY,RotationZ,RotationW,ObjectFlags,SitTargetOffsetX,SitTargetOffsetY,SitTargetOffsetZ,SitTargetOrientW,SitTargetOrientX,SitTargetOrientY,SitTargetOrientZ,ColorR,ColorG,ColorB,ColorA,ClickAction,PayPrice,PayButton1,PayButton2,PayButton3,PayButton4,LoopedSound,LoopedSoundGain,TextureAnimation,ParticleSystem,OmegaX,OmegaY,OmegaZ,CameraEyeOffsetX,CameraEyeOffsetY,CameraEyeOffsetZ,CameraAtOffsetX,CameraAtOffsetY,CameraAtOffsetZ,ForceMouselook,ScriptAccessPin,AllowedDrop,DieAtEdge,SalePrice,SaleType,Material,CollisionSound,CollisionSoundVolume,VolumeDetect FROM prims_backup; | ||
7 | DROP TABLE prims_backup; | ||
8 | COMMIT; \ No newline at end of file | ||
diff --git a/OpenSim/Data/SQLite/Resources/018_RegionStore.sql b/OpenSim/Data/SQLite/Resources/018_RegionStore.sql deleted file mode 100644 index 6a390c2..0000000 --- a/OpenSim/Data/SQLite/Resources/018_RegionStore.sql +++ /dev/null | |||
@@ -1,79 +0,0 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | update terrain | ||
4 | set RegionUUID = substr(RegionUUID, 1, 8) || "-" || substr(RegionUUID, 9, 4) || "-" || substr(RegionUUID, 13, 4) || "-" || substr(RegionUUID, 17, 4) || "-" || substr(RegionUUID, 21, 12) | ||
5 | where RegionUUID not like '%-%'; | ||
6 | |||
7 | |||
8 | update landaccesslist | ||
9 | set LandUUID = substr(LandUUID, 1, 8) || "-" || substr(LandUUID, 9, 4) || "-" || substr(LandUUID, 13, 4) || "-" || substr(LandUUID, 17, 4) || "-" || substr(LandUUID, 21, 12) | ||
10 | where LandUUID not like '%-%'; | ||
11 | |||
12 | update landaccesslist | ||
13 | set AccessUUID = substr(AccessUUID, 1, 8) || "-" || substr(AccessUUID, 9, 4) || "-" || substr(AccessUUID, 13, 4) || "-" || substr(AccessUUID, 17, 4) || "-" || substr(AccessUUID, 21, 12) | ||
14 | where AccessUUID not like '%-%'; | ||
15 | |||
16 | |||
17 | update prims | ||
18 | set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12) | ||
19 | where UUID not like '%-%'; | ||
20 | |||
21 | update prims | ||
22 | set RegionUUID = substr(RegionUUID, 1, 8) || "-" || substr(RegionUUID, 9, 4) || "-" || substr(RegionUUID, 13, 4) || "-" || substr(RegionUUID, 17, 4) || "-" || substr(RegionUUID, 21, 12) | ||
23 | where RegionUUID not like '%-%'; | ||
24 | |||
25 | update prims | ||
26 | set SceneGroupID = substr(SceneGroupID, 1, 8) || "-" || substr(SceneGroupID, 9, 4) || "-" || substr(SceneGroupID, 13, 4) || "-" || substr(SceneGroupID, 17, 4) || "-" || substr(SceneGroupID, 21, 12) | ||
27 | where SceneGroupID not like '%-%'; | ||
28 | |||
29 | update prims | ||
30 | set CreatorID = substr(CreatorID, 1, 8) || "-" || substr(CreatorID, 9, 4) || "-" || substr(CreatorID, 13, 4) || "-" || substr(CreatorID, 17, 4) || "-" || substr(CreatorID, 21, 12) | ||
31 | where CreatorID not like '%-%'; | ||
32 | |||
33 | update prims | ||
34 | set OwnerID = substr(OwnerID, 1, 8) || "-" || substr(OwnerID, 9, 4) || "-" || substr(OwnerID, 13, 4) || "-" || substr(OwnerID, 17, 4) || "-" || substr(OwnerID, 21, 12) | ||
35 | where OwnerID not like '%-%'; | ||
36 | |||
37 | update prims | ||
38 | set GroupID = substr(GroupID, 1, 8) || "-" || substr(GroupID, 9, 4) || "-" || substr(GroupID, 13, 4) || "-" || substr(GroupID, 17, 4) || "-" || substr(GroupID, 21, 12) | ||
39 | where GroupID not like '%-%'; | ||
40 | |||
41 | update prims | ||
42 | set LastOwnerID = substr(LastOwnerID, 1, 8) || "-" || substr(LastOwnerID, 9, 4) || "-" || substr(LastOwnerID, 13, 4) || "-" || substr(LastOwnerID, 17, 4) || "-" || substr(LastOwnerID, 21, 12) | ||
43 | where LastOwnerID not like '%-%'; | ||
44 | |||
45 | |||
46 | update primshapes | ||
47 | set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12) | ||
48 | where UUID not like '%-%'; | ||
49 | |||
50 | |||
51 | update land | ||
52 | set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12) | ||
53 | where UUID not like '%-%'; | ||
54 | |||
55 | update land | ||
56 | set RegionUUID = substr(RegionUUID, 1, 8) || "-" || substr(RegionUUID, 9, 4) || "-" || substr(RegionUUID, 13, 4) || "-" || substr(RegionUUID, 17, 4) || "-" || substr(RegionUUID, 21, 12) | ||
57 | where RegionUUID not like '%-%'; | ||
58 | |||
59 | update land | ||
60 | set OwnerUUID = substr(OwnerUUID, 1, 8) || "-" || substr(OwnerUUID, 9, 4) || "-" || substr(OwnerUUID, 13, 4) || "-" || substr(OwnerUUID, 17, 4) || "-" || substr(OwnerUUID, 21, 12) | ||
61 | where OwnerUUID not like '%-%'; | ||
62 | |||
63 | update land | ||
64 | set GroupUUID = substr(GroupUUID, 1, 8) || "-" || substr(GroupUUID, 9, 4) || "-" || substr(GroupUUID, 13, 4) || "-" || substr(GroupUUID, 17, 4) || "-" || substr(GroupUUID, 21, 12) | ||
65 | where GroupUUID not like '%-%'; | ||
66 | |||
67 | update land | ||
68 | set MediaTextureUUID = substr(MediaTextureUUID, 1, 8) || "-" || substr(MediaTextureUUID, 9, 4) || "-" || substr(MediaTextureUUID, 13, 4) || "-" || substr(MediaTextureUUID, 17, 4) || "-" || substr(MediaTextureUUID, 21, 12) | ||
69 | where MediaTextureUUID not like '%-%'; | ||
70 | |||
71 | update land | ||
72 | set SnapshotUUID = substr(SnapshotUUID, 1, 8) || "-" || substr(SnapshotUUID, 9, 4) || "-" || substr(SnapshotUUID, 13, 4) || "-" || substr(SnapshotUUID, 17, 4) || "-" || substr(SnapshotUUID, 21, 12) | ||
73 | where SnapshotUUID not like '%-%'; | ||
74 | |||
75 | update land | ||
76 | set AuthbuyerID = substr(AuthbuyerID, 1, 8) || "-" || substr(AuthbuyerID, 9, 4) || "-" || substr(AuthbuyerID, 13, 4) || "-" || substr(AuthbuyerID, 17, 4) || "-" || substr(AuthbuyerID, 21, 12) | ||
77 | where AuthbuyerID not like '%-%'; | ||
78 | |||
79 | COMMIT; \ No newline at end of file | ||
diff --git a/OpenSim/Data/SQLite/Resources/AssetStore.migrations b/OpenSim/Data/SQLite/Resources/AssetStore.migrations new file mode 100644 index 0000000..bc11e13 --- /dev/null +++ b/OpenSim/Data/SQLite/Resources/AssetStore.migrations | |||
@@ -0,0 +1,66 @@ | |||
1 | :VERSION 1 | ||
2 | |||
3 | BEGIN TRANSACTION; | ||
4 | CREATE TABLE assets( | ||
5 | UUID varchar(255) primary key, | ||
6 | Name varchar(255), | ||
7 | Description varchar(255), | ||
8 | Type integer, | ||
9 | InvType integer, | ||
10 | Local integer, | ||
11 | Temporary integer, | ||
12 | Data blob); | ||
13 | |||
14 | COMMIT; | ||
15 | |||
16 | :VERSION 2 | ||
17 | |||
18 | BEGIN TRANSACTION; | ||
19 | |||
20 | CREATE TEMPORARY TABLE assets_backup(UUID,Name,Description,Type,Local,Temporary,Data); | ||
21 | INSERT INTO assets_backup SELECT UUID,Name,Description,Type,Local,Temporary,Data FROM assets; | ||
22 | DROP TABLE assets; | ||
23 | CREATE TABLE assets(UUID,Name,Description,Type,Local,Temporary,Data); | ||
24 | INSERT INTO assets SELECT UUID,Name,Description,Type,Local,Temporary,Data FROM assets_backup; | ||
25 | DROP TABLE assets_backup; | ||
26 | |||
27 | COMMIT; | ||
28 | |||
29 | :VERSION 3 | ||
30 | |||
31 | DELETE FROM assets WHERE UUID = 'dc4b9f0bd00845c696a401dd947ac621' | ||
32 | |||
33 | :VERSION 4 | ||
34 | |||
35 | BEGIN; | ||
36 | |||
37 | update assets | ||
38 | set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12) | ||
39 | where UUID not like '%-%'; | ||
40 | |||
41 | COMMIT; | ||
42 | |||
43 | :VERSION 5 | ||
44 | |||
45 | BEGIN TRANSACTION; | ||
46 | |||
47 | CREATE TEMPORARY TABLE assets_backup(UUID,Name,Description,Type,Local,Temporary,Data); | ||
48 | INSERT INTO assets_backup SELECT UUID,Name,Description,Type,Local,Temporary,Data FROM assets; | ||
49 | DROP TABLE assets; | ||
50 | CREATE TABLE assets( | ||
51 | UUID NOT NULL PRIMARY KEY, | ||
52 | Name, | ||
53 | Description, | ||
54 | Type, | ||
55 | Local, | ||
56 | Temporary, | ||
57 | asset_flags INTEGER NOT NULL DEFAULT 0, | ||
58 | CreatorID varchar(36) default '', | ||
59 | Data); | ||
60 | |||
61 | INSERT INTO assets(UUID,Name,Description,Type,Local,Temporary,Data) | ||
62 | SELECT UUID,Name,Description,Type,Local,Temporary,Data FROM assets_backup; | ||
63 | DROP TABLE assets_backup; | ||
64 | |||
65 | COMMIT; | ||
66 | |||
diff --git a/OpenSim/Data/SQLite/Resources/001_AuthStore.sql b/OpenSim/Data/SQLite/Resources/AuthStore.migrations index 468567d..ca6bdf5 100644 --- a/OpenSim/Data/SQLite/Resources/001_AuthStore.sql +++ b/OpenSim/Data/SQLite/Resources/AuthStore.migrations | |||
@@ -1,3 +1,5 @@ | |||
1 | :VERSION 1 | ||
2 | |||
1 | BEGIN TRANSACTION; | 3 | BEGIN TRANSACTION; |
2 | 4 | ||
3 | CREATE TABLE auth ( | 5 | CREATE TABLE auth ( |
@@ -16,3 +18,12 @@ CREATE TABLE tokens ( | |||
16 | ); | 18 | ); |
17 | 19 | ||
18 | COMMIT; | 20 | COMMIT; |
21 | |||
22 | :VERSION 2 | ||
23 | |||
24 | BEGIN TRANSACTION; | ||
25 | |||
26 | INSERT INTO auth (UUID, passwordHash, passwordSalt, webLoginKey) SELECT `UUID` AS UUID, `passwordHash` AS passwordHash, `passwordSalt` AS passwordSalt, `webLoginKey` AS webLoginKey FROM users; | ||
27 | |||
28 | COMMIT; | ||
29 | |||
diff --git a/OpenSim/Data/SQLite/Resources/001_Avatar.sql b/OpenSim/Data/SQLite/Resources/Avatar.migrations index 7ec906b..13b4196 100644 --- a/OpenSim/Data/SQLite/Resources/001_Avatar.sql +++ b/OpenSim/Data/SQLite/Resources/Avatar.migrations | |||
@@ -1,3 +1,5 @@ | |||
1 | :VERSION 1 | ||
2 | |||
1 | BEGIN TRANSACTION; | 3 | BEGIN TRANSACTION; |
2 | 4 | ||
3 | CREATE TABLE Avatars ( | 5 | CREATE TABLE Avatars ( |
diff --git a/OpenSim/Data/SQLite/Resources/001_FriendsStore.sql b/OpenSim/Data/SQLite/Resources/FriendsStore.migrations index f1b9ab9..3eb4352 100644 --- a/OpenSim/Data/SQLite/Resources/001_FriendsStore.sql +++ b/OpenSim/Data/SQLite/Resources/FriendsStore.migrations | |||
@@ -1,3 +1,5 @@ | |||
1 | :VERSION 1 | ||
2 | |||
1 | BEGIN TRANSACTION; | 3 | BEGIN TRANSACTION; |
2 | 4 | ||
3 | CREATE TABLE `Friends` ( | 5 | CREATE TABLE `Friends` ( |
@@ -8,3 +10,11 @@ CREATE TABLE `Friends` ( | |||
8 | PRIMARY KEY(`PrincipalID`, `Friend`)); | 10 | PRIMARY KEY(`PrincipalID`, `Friend`)); |
9 | 11 | ||
10 | COMMIT; | 12 | COMMIT; |
13 | |||
14 | :VERSION 2 | ||
15 | |||
16 | BEGIN TRANSACTION; | ||
17 | |||
18 | INSERT INTO `Friends` SELECT `ownerID`, `friendID`, `friendPerms`, 0 FROM `userfriends`; | ||
19 | |||
20 | COMMIT; | ||
diff --git a/OpenSim/Data/SQLite/Resources/004_InventoryStore.sql b/OpenSim/Data/SQLite/Resources/InventoryStore.migrations index e8f4d46..585ac49 100644 --- a/OpenSim/Data/SQLite/Resources/004_InventoryStore.sql +++ b/OpenSim/Data/SQLite/Resources/InventoryStore.migrations | |||
@@ -1,3 +1,59 @@ | |||
1 | :VERSION 1 | ||
2 | |||
3 | BEGIN TRANSACTION; | ||
4 | |||
5 | CREATE TABLE inventoryfolders( | ||
6 | UUID varchar(255) primary key, | ||
7 | name varchar(255), | ||
8 | agentID varchar(255), | ||
9 | parentID varchar(255), | ||
10 | type integer, | ||
11 | version integer); | ||
12 | |||
13 | CREATE TABLE inventoryitems( | ||
14 | UUID varchar(255) primary key, | ||
15 | assetID varchar(255), | ||
16 | assetType integer, | ||
17 | invType integer, | ||
18 | parentFolderID varchar(255), | ||
19 | avatarID varchar(255), | ||
20 | creatorsID varchar(255), | ||
21 | inventoryName varchar(255), | ||
22 | inventoryDescription varchar(255), | ||
23 | inventoryNextPermissions integer, | ||
24 | inventoryCurrentPermissions integer, | ||
25 | inventoryBasePermissions integer, | ||
26 | inventoryEveryOnePermissions integer, | ||
27 | salePrice integer default 99, | ||
28 | saleType integer default 0, | ||
29 | creationDate integer default 2000, | ||
30 | groupID varchar(255) default '00000000-0000-0000-0000-000000000000', | ||
31 | groupOwned integer default 0, | ||
32 | flags integer default 0); | ||
33 | |||
34 | COMMIT; | ||
35 | |||
36 | :VERSION 2 | ||
37 | |||
38 | BEGIN TRANSACTION; | ||
39 | |||
40 | create index inventoryfolders_agentid on inventoryfolders(agentid); | ||
41 | create index inventoryfolders_parentid on inventoryfolders(parentid); | ||
42 | create index inventoryitems_parentfolderid on inventoryitems(parentfolderid); | ||
43 | create index inventoryitems_avatarid on inventoryitems(avatarid); | ||
44 | |||
45 | COMMIT; | ||
46 | |||
47 | :VERSION 3 | ||
48 | |||
49 | BEGIN; | ||
50 | |||
51 | alter table inventoryitems add column inventoryGroupPermissions integer unsigned not null default 0; | ||
52 | |||
53 | COMMIT; | ||
54 | |||
55 | :VERSION 4 | ||
56 | |||
1 | BEGIN; | 57 | BEGIN; |
2 | 58 | ||
3 | update inventoryitems | 59 | update inventoryitems |
diff --git a/OpenSim/Data/SQLite/Resources/RegionStore.migrations b/OpenSim/Data/SQLite/Resources/RegionStore.migrations new file mode 100644 index 0000000..7b27378 --- /dev/null +++ b/OpenSim/Data/SQLite/Resources/RegionStore.migrations | |||
@@ -0,0 +1,526 @@ | |||
1 | :VERSION 1 | ||
2 | |||
3 | BEGIN TRANSACTION; | ||
4 | |||
5 | CREATE TABLE prims( | ||
6 | UUID varchar(255) primary key, | ||
7 | RegionUUID varchar(255), | ||
8 | ParentID integer, | ||
9 | CreationDate integer, | ||
10 | Name varchar(255), | ||
11 | SceneGroupID varchar(255), | ||
12 | Text varchar(255), | ||
13 | Description varchar(255), | ||
14 | SitName varchar(255), | ||
15 | TouchName varchar(255), | ||
16 | CreatorID varchar(255), | ||
17 | OwnerID varchar(255), | ||
18 | GroupID varchar(255), | ||
19 | LastOwnerID varchar(255), | ||
20 | OwnerMask integer, | ||
21 | NextOwnerMask integer, | ||
22 | GroupMask integer, | ||
23 | EveryoneMask integer, | ||
24 | BaseMask integer, | ||
25 | PositionX float, | ||
26 | PositionY float, | ||
27 | PositionZ float, | ||
28 | GroupPositionX float, | ||
29 | GroupPositionY float, | ||
30 | GroupPositionZ float, | ||
31 | VelocityX float, | ||
32 | VelocityY float, | ||
33 | VelocityZ float, | ||
34 | AngularVelocityX float, | ||
35 | AngularVelocityY float, | ||
36 | AngularVelocityZ float, | ||
37 | AccelerationX float, | ||
38 | AccelerationY float, | ||
39 | AccelerationZ float, | ||
40 | RotationX float, | ||
41 | RotationY float, | ||
42 | RotationZ float, | ||
43 | RotationW float, | ||
44 | ObjectFlags integer, | ||
45 | SitTargetOffsetX float NOT NULL default 0, | ||
46 | SitTargetOffsetY float NOT NULL default 0, | ||
47 | SitTargetOffsetZ float NOT NULL default 0, | ||
48 | SitTargetOrientW float NOT NULL default 0, | ||
49 | SitTargetOrientX float NOT NULL default 0, | ||
50 | SitTargetOrientY float NOT NULL default 0, | ||
51 | SitTargetOrientZ float NOT NULL default 0); | ||
52 | |||
53 | CREATE TABLE primshapes( | ||
54 | UUID varchar(255) primary key, | ||
55 | Shape integer, | ||
56 | ScaleX float, | ||
57 | ScaleY float, | ||
58 | ScaleZ float, | ||
59 | PCode integer, | ||
60 | PathBegin integer, | ||
61 | PathEnd integer, | ||
62 | PathScaleX integer, | ||
63 | PathScaleY integer, | ||
64 | PathShearX integer, | ||
65 | PathShearY integer, | ||
66 | PathSkew integer, | ||
67 | PathCurve integer, | ||
68 | PathRadiusOffset integer, | ||
69 | PathRevolutions integer, | ||
70 | PathTaperX integer, | ||
71 | PathTaperY integer, | ||
72 | PathTwist integer, | ||
73 | PathTwistBegin integer, | ||
74 | ProfileBegin integer, | ||
75 | ProfileEnd integer, | ||
76 | ProfileCurve integer, | ||
77 | ProfileHollow integer, | ||
78 | Texture blob, | ||
79 | ExtraParams blob, | ||
80 | State Integer NOT NULL default 0); | ||
81 | |||
82 | CREATE TABLE primitems( | ||
83 | itemID varchar(255) primary key, | ||
84 | primID varchar(255), | ||
85 | assetID varchar(255), | ||
86 | parentFolderID varchar(255), | ||
87 | invType integer, | ||
88 | assetType integer, | ||
89 | name varchar(255), | ||
90 | description varchar(255), | ||
91 | creationDate integer, | ||
92 | creatorID varchar(255), | ||
93 | ownerID varchar(255), | ||
94 | lastOwnerID varchar(255), | ||
95 | groupID varchar(255), | ||
96 | nextPermissions string, | ||
97 | currentPermissions string, | ||
98 | basePermissions string, | ||
99 | everyonePermissions string, | ||
100 | groupPermissions string); | ||
101 | |||
102 | CREATE TABLE terrain( | ||
103 | RegionUUID varchar(255), | ||
104 | Revision integer, | ||
105 | Heightfield blob); | ||
106 | |||
107 | CREATE TABLE land( | ||
108 | UUID varchar(255) primary key, | ||
109 | RegionUUID varchar(255), | ||
110 | LocalLandID string, | ||
111 | Bitmap blob, | ||
112 | Name varchar(255), | ||
113 | Desc varchar(255), | ||
114 | OwnerUUID varchar(255), | ||
115 | IsGroupOwned string, | ||
116 | Area integer, | ||
117 | AuctionID integer, | ||
118 | Category integer, | ||
119 | ClaimDate integer, | ||
120 | ClaimPrice integer, | ||
121 | GroupUUID varchar(255), | ||
122 | SalePrice integer, | ||
123 | LandStatus integer, | ||
124 | LandFlags string, | ||
125 | LandingType string, | ||
126 | MediaAutoScale string, | ||
127 | MediaTextureUUID varchar(255), | ||
128 | MediaURL varchar(255), | ||
129 | MusicURL varchar(255), | ||
130 | PassHours float, | ||
131 | PassPrice string, | ||
132 | SnapshotUUID varchar(255), | ||
133 | UserLocationX float, | ||
134 | UserLocationY float, | ||
135 | UserLocationZ float, | ||
136 | UserLookAtX float, | ||
137 | UserLookAtY float, | ||
138 | UserLookAtZ float, | ||
139 | AuthbuyerID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000'); | ||
140 | |||
141 | CREATE TABLE landaccesslist( | ||
142 | LandUUID varchar(255), | ||
143 | AccessUUID varchar(255), | ||
144 | Flags string); | ||
145 | |||
146 | COMMIT; | ||
147 | |||
148 | :VERSION 2 | ||
149 | |||
150 | BEGIN TRANSACTION; | ||
151 | |||
152 | CREATE TABLE regionban( | ||
153 | regionUUID varchar (255), | ||
154 | bannedUUID varchar (255), | ||
155 | bannedIp varchar (255), | ||
156 | bannedIpHostMask varchar (255) | ||
157 | ); | ||
158 | |||
159 | COMMIT; | ||
160 | |||
161 | :VERSION 3 | ||
162 | |||
163 | BEGIN; | ||
164 | |||
165 | ALTER TABLE primitems add flags integer not null default 0; | ||
166 | |||
167 | COMMIT; | ||
168 | |||
169 | :VERSION 4 | ||
170 | |||
171 | BEGIN; | ||
172 | |||
173 | create table regionsettings ( | ||
174 | regionUUID char(36) not null, | ||
175 | block_terraform integer not null, | ||
176 | block_fly integer not null, | ||
177 | allow_damage integer not null, | ||
178 | restrict_pushing integer not null, | ||
179 | allow_land_resell integer not null, | ||
180 | allow_land_join_divide integer not null, | ||
181 | block_show_in_search integer not null, | ||
182 | agent_limit integer not null, | ||
183 | object_bonus float not null, | ||
184 | maturity integer not null, | ||
185 | disable_scripts integer not null, | ||
186 | disable_collisions integer not null, | ||
187 | disable_physics integer not null, | ||
188 | terrain_texture_1 char(36) not null, | ||
189 | terrain_texture_2 char(36) not null, | ||
190 | terrain_texture_3 char(36) not null, | ||
191 | terrain_texture_4 char(36) not null, | ||
192 | elevation_1_nw float not null, | ||
193 | elevation_2_nw float not null, | ||
194 | elevation_1_ne float not null, | ||
195 | elevation_2_ne float not null, | ||
196 | elevation_1_se float not null, | ||
197 | elevation_2_se float not null, | ||
198 | elevation_1_sw float not null, | ||
199 | elevation_2_sw float not null, | ||
200 | water_height float not null, | ||
201 | terrain_raise_limit float not null, | ||
202 | terrain_lower_limit float not null, | ||
203 | use_estate_sun integer not null, | ||
204 | fixed_sun integer not null, | ||
205 | sun_position float not null, | ||
206 | covenant char(36)); | ||
207 | |||
208 | COMMIT; | ||
209 | |||
210 | :VERSION 5 | ||
211 | |||
212 | BEGIN; | ||
213 | |||
214 | delete from regionsettings; | ||
215 | |||
216 | COMMIT; | ||
217 | |||
218 | :VERSION 6 | ||
219 | |||
220 | BEGIN TRANSACTION; | ||
221 | |||
222 | CREATE TABLE estate_groups ( | ||
223 | EstateID int(10) NOT NULL, | ||
224 | uuid char(36) NOT NULL | ||
225 | ); | ||
226 | |||
227 | CREATE TABLE estate_managers ( | ||
228 | EstateID int(10) NOT NULL, | ||
229 | uuid char(36) NOT NULL | ||
230 | ); | ||
231 | |||
232 | CREATE TABLE estate_map ( | ||
233 | RegionID char(36) NOT NULL default '00000000-0000-0000-0000-000000000000', | ||
234 | EstateID int(11) NOT NULL | ||
235 | ); | ||
236 | |||
237 | CREATE TABLE estate_settings ( | ||
238 | EstateID INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, | ||
239 | EstateName varchar(64) default NULL, | ||
240 | AbuseEmailToEstateOwner tinyint(4) NOT NULL, | ||
241 | DenyAnonymous tinyint(4) NOT NULL, | ||
242 | ResetHomeOnTeleport tinyint(4) NOT NULL, | ||
243 | FixedSun tinyint(4) NOT NULL, | ||
244 | DenyTransacted tinyint(4) NOT NULL, | ||
245 | BlockDwell tinyint(4) NOT NULL, | ||
246 | DenyIdentified tinyint(4) NOT NULL, | ||
247 | AllowVoice tinyint(4) NOT NULL, | ||
248 | UseGlobalTime tinyint(4) NOT NULL, | ||
249 | PricePerMeter int(11) NOT NULL, | ||
250 | TaxFree tinyint(4) NOT NULL, | ||
251 | AllowDirectTeleport tinyint(4) NOT NULL, | ||
252 | RedirectGridX int(11) NOT NULL, | ||
253 | RedirectGridY int(11) NOT NULL, | ||
254 | ParentEstateID int(10) NOT NULL, | ||
255 | SunPosition double NOT NULL, | ||
256 | EstateSkipScripts tinyint(4) NOT NULL, | ||
257 | BillableFactor float NOT NULL, | ||
258 | PublicAccess tinyint(4) NOT NULL | ||
259 | ); | ||
260 | insert into estate_settings (EstateID,EstateName,AbuseEmailToEstateOwner,DenyAnonymous,ResetHomeOnTeleport,FixedSun,DenyTransacted,BlockDwell,DenyIdentified,AllowVoice,UseGlobalTime,PricePerMeter,TaxFree,AllowDirectTeleport,RedirectGridX,RedirectGridY,ParentEstateID,SunPosition,PublicAccess,EstateSkipScripts,BillableFactor) values ( 99, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''); | ||
261 | delete from estate_settings; | ||
262 | CREATE TABLE estate_users ( | ||
263 | EstateID int(10) NOT NULL, | ||
264 | uuid char(36) NOT NULL | ||
265 | ); | ||
266 | |||
267 | CREATE TABLE estateban ( | ||
268 | EstateID int(10) NOT NULL, | ||
269 | bannedUUID varchar(36) NOT NULL, | ||
270 | bannedIp varchar(16) NOT NULL, | ||
271 | bannedIpHostMask varchar(16) NOT NULL, | ||
272 | bannedNameMask varchar(64) default NULL | ||
273 | ); | ||
274 | |||
275 | drop table regionsettings; | ||
276 | CREATE TABLE regionsettings ( | ||
277 | regionUUID char(36) NOT NULL, | ||
278 | block_terraform int(11) NOT NULL, | ||
279 | block_fly int(11) NOT NULL, | ||
280 | allow_damage int(11) NOT NULL, | ||
281 | restrict_pushing int(11) NOT NULL, | ||
282 | allow_land_resell int(11) NOT NULL, | ||
283 | allow_land_join_divide int(11) NOT NULL, | ||
284 | block_show_in_search int(11) NOT NULL, | ||
285 | agent_limit int(11) NOT NULL, | ||
286 | object_bonus float NOT NULL, | ||
287 | maturity int(11) NOT NULL, | ||
288 | disable_scripts int(11) NOT NULL, | ||
289 | disable_collisions int(11) NOT NULL, | ||
290 | disable_physics int(11) NOT NULL, | ||
291 | terrain_texture_1 char(36) NOT NULL, | ||
292 | terrain_texture_2 char(36) NOT NULL, | ||
293 | terrain_texture_3 char(36) NOT NULL, | ||
294 | terrain_texture_4 char(36) NOT NULL, | ||
295 | elevation_1_nw float NOT NULL, | ||
296 | elevation_2_nw float NOT NULL, | ||
297 | elevation_1_ne float NOT NULL, | ||
298 | elevation_2_ne float NOT NULL, | ||
299 | elevation_1_se float NOT NULL, | ||
300 | elevation_2_se float NOT NULL, | ||
301 | elevation_1_sw float NOT NULL, | ||
302 | elevation_2_sw float NOT NULL, | ||
303 | water_height float NOT NULL, | ||
304 | terrain_raise_limit float NOT NULL, | ||
305 | terrain_lower_limit float NOT NULL, | ||
306 | use_estate_sun int(11) NOT NULL, | ||
307 | fixed_sun int(11) NOT NULL, | ||
308 | sun_position float NOT NULL, | ||
309 | covenant char(36) default NULL, | ||
310 | Sandbox tinyint(4) NOT NULL, | ||
311 | PRIMARY KEY (regionUUID) | ||
312 | ); | ||
313 | |||
314 | CREATE INDEX estate_ban_estate_id on estateban(EstateID); | ||
315 | CREATE INDEX estate_groups_estate_id on estate_groups(EstateID); | ||
316 | CREATE INDEX estate_managers_estate_id on estate_managers(EstateID); | ||
317 | CREATE INDEX estate_map_estate_id on estate_map(EstateID); | ||
318 | CREATE UNIQUE INDEX estate_map_region_id on estate_map(RegionID); | ||
319 | CREATE INDEX estate_users_estate_id on estate_users(EstateID); | ||
320 | |||
321 | COMMIT; | ||
322 | |||
323 | :VERSION 7 | ||
324 | |||
325 | begin; | ||
326 | |||
327 | alter table estate_settings add column AbuseEmail varchar(255) not null default ''; | ||
328 | |||
329 | alter table estate_settings add column EstateOwner varchar(36) not null default ''; | ||
330 | |||
331 | commit; | ||
332 | |||
333 | :VERSION 8 | ||
334 | |||
335 | begin; | ||
336 | |||
337 | alter table estate_settings add column DenyMinors tinyint not null default 0; | ||
338 | |||
339 | commit; | ||
340 | |||
341 | :VERSION 9 | ||
342 | |||
343 | BEGIN; | ||
344 | |||
345 | ALTER TABLE prims ADD COLUMN ColorR integer not null default 0; | ||
346 | ALTER TABLE prims ADD COLUMN ColorG integer not null default 0; | ||
347 | ALTER TABLE prims ADD COLUMN ColorB integer not null default 0; | ||
348 | ALTER TABLE prims ADD COLUMN ColorA integer not null default 0; | ||
349 | |||
350 | COMMIT; | ||
351 | |||
352 | :VERSION 10 | ||
353 | |||
354 | BEGIN; | ||
355 | |||
356 | ALTER TABLE prims ADD COLUMN ClickAction INTEGER NOT NULL default 0; | ||
357 | |||
358 | COMMIT; | ||
359 | |||
360 | :VERSION 11 | ||
361 | |||
362 | BEGIN; | ||
363 | |||
364 | ALTER TABLE prims ADD COLUMN PayPrice INTEGER NOT NULL default 0; | ||
365 | ALTER TABLE prims ADD COLUMN PayButton1 INTEGER NOT NULL default 0; | ||
366 | ALTER TABLE prims ADD COLUMN PayButton2 INTEGER NOT NULL default 0; | ||
367 | ALTER TABLE prims ADD COLUMN PayButton3 INTEGER NOT NULL default 0; | ||
368 | ALTER TABLE prims ADD COLUMN PayButton4 INTEGER NOT NULL default 0; | ||
369 | ALTER TABLE prims ADD COLUMN LoopedSound varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000'; | ||
370 | ALTER TABLE prims ADD COLUMN LoopedSoundGain float NOT NULL default 0; | ||
371 | ALTER TABLE prims ADD COLUMN TextureAnimation string; | ||
372 | ALTER TABLE prims ADD COLUMN ParticleSystem string; | ||
373 | ALTER TABLE prims ADD COLUMN OmegaX float NOT NULL default 0; | ||
374 | ALTER TABLE prims ADD COLUMN OmegaY float NOT NULL default 0; | ||
375 | ALTER TABLE prims ADD COLUMN OmegaZ float NOT NULL default 0; | ||
376 | ALTER TABLE prims ADD COLUMN CameraEyeOffsetX float NOT NULL default 0; | ||
377 | ALTER TABLE prims ADD COLUMN CameraEyeOffsetY float NOT NULL default 0; | ||
378 | ALTER TABLE prims ADD COLUMN CameraEyeOffsetZ float NOT NULL default 0; | ||
379 | ALTER TABLE prims ADD COLUMN CameraAtOffsetX float NOT NULL default 0; | ||
380 | ALTER TABLE prims ADD COLUMN CameraAtOffsetY float NOT NULL default 0; | ||
381 | ALTER TABLE prims ADD COLUMN CameraAtOffsetZ float NOT NULL default 0; | ||
382 | ALTER TABLE prims ADD COLUMN ForceMouselook string NOT NULL default 0; | ||
383 | ALTER TABLE prims ADD COLUMN ScriptAccessPin INTEGER NOT NULL default 0; | ||
384 | ALTER TABLE prims ADD COLUMN AllowedDrop INTEGER NOT NULL default 0; | ||
385 | ALTER TABLE prims ADD COLUMN DieAtEdge string NOT NULL default 0; | ||
386 | ALTER TABLE prims ADD COLUMN SalePrice INTEGER NOT NULL default 0; | ||
387 | ALTER TABLE prims ADD COLUMN SaleType string NOT NULL default 0; | ||
388 | |||
389 | COMMIT; | ||
390 | |||
391 | :VERSION 12 | ||
392 | |||
393 | BEGIN; | ||
394 | |||
395 | ALTER TABLE prims ADD COLUMN Material INTEGER NOT NULL default 3; | ||
396 | |||
397 | COMMIT; | ||
398 | |||
399 | :VERSION 13 | ||
400 | |||
401 | BEGIN; | ||
402 | |||
403 | ALTER TABLE land ADD COLUMN OtherCleanTime INTEGER NOT NULL default 0; | ||
404 | ALTER TABLE land ADD COLUMN Dwell INTEGER NOT NULL default 0; | ||
405 | |||
406 | COMMIT; | ||
407 | |||
408 | :VERSION 14 | ||
409 | |||
410 | begin; | ||
411 | |||
412 | ALTER TABLE regionsettings ADD COLUMN sunvectorx double NOT NULL default 0; | ||
413 | ALTER TABLE regionsettings ADD COLUMN sunvectory double NOT NULL default 0; | ||
414 | ALTER TABLE regionsettings ADD COLUMN sunvectorz double NOT NULL default 0; | ||
415 | |||
416 | commit; | ||
417 | |||
418 | :VERSION 15 | ||
419 | |||
420 | BEGIN; | ||
421 | |||
422 | ALTER TABLE prims ADD COLUMN CollisionSound varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000'; | ||
423 | ALTER TABLE prims ADD COLUMN CollisionSoundVolume float NOT NULL default 0; | ||
424 | |||
425 | COMMIT; | ||
426 | |||
427 | :VERSION 16 | ||
428 | |||
429 | BEGIN; | ||
430 | |||
431 | ALTER TABLE prims ADD COLUMN VolumeDetect INTEGER NOT NULL DEFAULT 0; | ||
432 | |||
433 | COMMIT; | ||
434 | |||
435 | :VERSION 17 | ||
436 | |||
437 | BEGIN; | ||
438 | CREATE TEMPORARY TABLE prims_backup(UUID,RegionUUID,CreationDate,Name,SceneGroupID,Text,Description,SitName,TouchName,CreatorID,OwnerID,GroupID,LastOwnerID,OwnerMask,NextOwnerMask,GroupMask,EveryoneMask,BaseMask,PositionX,PositionY,PositionZ,GroupPositionX,GroupPositionY,GroupPositionZ,VelocityX,VelocityY,VelocityZ,AngularVelocityX,AngularVelocityY,AngularVelocityZ,AccelerationX,AccelerationY,AccelerationZ,RotationX,RotationY,RotationZ,RotationW,ObjectFlags,SitTargetOffsetX,SitTargetOffsetY,SitTargetOffsetZ,SitTargetOrientW,SitTargetOrientX,SitTargetOrientY,SitTargetOrientZ,ColorR,ColorG,ColorB,ColorA,ClickAction,PayPrice,PayButton1,PayButton2,PayButton3,PayButton4,LoopedSound,LoopedSoundGain,TextureAnimation,ParticleSystem,OmegaX,OmegaY,OmegaZ,CameraEyeOffsetX,CameraEyeOffsetY,CameraEyeOffsetZ,CameraAtOffsetX,CameraAtOffsetY,CameraAtOffsetZ,ForceMouselook,ScriptAccessPin,AllowedDrop,DieAtEdge,SalePrice,SaleType,Material,CollisionSound,CollisionSoundVolume,VolumeDetect); | ||
439 | INSERT INTO prims_backup SELECT UUID,RegionUUID,CreationDate,Name,SceneGroupID,Text,Description,SitName,TouchName,CreatorID,OwnerID,GroupID,LastOwnerID,OwnerMask,NextOwnerMask,GroupMask,EveryoneMask,BaseMask,PositionX,PositionY,PositionZ,GroupPositionX,GroupPositionY,GroupPositionZ,VelocityX,VelocityY,VelocityZ,AngularVelocityX,AngularVelocityY,AngularVelocityZ,AccelerationX,AccelerationY,AccelerationZ,RotationX,RotationY,RotationZ,RotationW,ObjectFlags,SitTargetOffsetX,SitTargetOffsetY,SitTargetOffsetZ,SitTargetOrientW,SitTargetOrientX,SitTargetOrientY,SitTargetOrientZ,ColorR,ColorG,ColorB,ColorA,ClickAction,PayPrice,PayButton1,PayButton2,PayButton3,PayButton4,LoopedSound,LoopedSoundGain,TextureAnimation,ParticleSystem,OmegaX,OmegaY,OmegaZ,CameraEyeOffsetX,CameraEyeOffsetY,CameraEyeOffsetZ,CameraAtOffsetX,CameraAtOffsetY,CameraAtOffsetZ,ForceMouselook,ScriptAccessPin,AllowedDrop,DieAtEdge,SalePrice,SaleType,Material,CollisionSound,CollisionSoundVolume,VolumeDetect FROM prims; | ||
440 | DROP TABLE prims; | ||
441 | CREATE TABLE prims(UUID,RegionUUID,CreationDate,Name,SceneGroupID,Text,Description,SitName,TouchName,CreatorID,OwnerID,GroupID,LastOwnerID,OwnerMask,NextOwnerMask,GroupMask,EveryoneMask,BaseMask,PositionX,PositionY,PositionZ,GroupPositionX,GroupPositionY,GroupPositionZ,VelocityX,VelocityY,VelocityZ,AngularVelocityX,AngularVelocityY,AngularVelocityZ,AccelerationX,AccelerationY,AccelerationZ,RotationX,RotationY,RotationZ,RotationW,ObjectFlags,SitTargetOffsetX,SitTargetOffsetY,SitTargetOffsetZ,SitTargetOrientW,SitTargetOrientX,SitTargetOrientY,SitTargetOrientZ,ColorR,ColorG,ColorB,ColorA,ClickAction,PayPrice,PayButton1,PayButton2,PayButton3,PayButton4,LoopedSound,LoopedSoundGain,TextureAnimation,ParticleSystem,OmegaX,OmegaY,OmegaZ,CameraEyeOffsetX,CameraEyeOffsetY,CameraEyeOffsetZ,CameraAtOffsetX,CameraAtOffsetY,CameraAtOffsetZ,ForceMouselook,ScriptAccessPin,AllowedDrop,DieAtEdge,SalePrice,SaleType,Material,CollisionSound,CollisionSoundVolume,VolumeDetect); | ||
442 | INSERT INTO prims SELECT UUID,RegionUUID,CreationDate,Name,SceneGroupID,Text,Description,SitName,TouchName,CreatorID,OwnerID,GroupID,LastOwnerID,OwnerMask,NextOwnerMask,GroupMask,EveryoneMask,BaseMask,PositionX,PositionY,PositionZ,GroupPositionX,GroupPositionY,GroupPositionZ,VelocityX,VelocityY,VelocityZ,AngularVelocityX,AngularVelocityY,AngularVelocityZ,AccelerationX,AccelerationY,AccelerationZ,RotationX,RotationY,RotationZ,RotationW,ObjectFlags,SitTargetOffsetX,SitTargetOffsetY,SitTargetOffsetZ,SitTargetOrientW,SitTargetOrientX,SitTargetOrientY,SitTargetOrientZ,ColorR,ColorG,ColorB,ColorA,ClickAction,PayPrice,PayButton1,PayButton2,PayButton3,PayButton4,LoopedSound,LoopedSoundGain,TextureAnimation,ParticleSystem,OmegaX,OmegaY,OmegaZ,CameraEyeOffsetX,CameraEyeOffsetY,CameraEyeOffsetZ,CameraAtOffsetX,CameraAtOffsetY,CameraAtOffsetZ,ForceMouselook,ScriptAccessPin,AllowedDrop,DieAtEdge,SalePrice,SaleType,Material,CollisionSound,CollisionSoundVolume,VolumeDetect FROM prims_backup; | ||
443 | DROP TABLE prims_backup; | ||
444 | COMMIT; | ||
445 | |||
446 | :VERSION 18 | ||
447 | |||
448 | BEGIN; | ||
449 | |||
450 | update terrain | ||
451 | set RegionUUID = substr(RegionUUID, 1, 8) || "-" || substr(RegionUUID, 9, 4) || "-" || substr(RegionUUID, 13, 4) || "-" || substr(RegionUUID, 17, 4) || "-" || substr(RegionUUID, 21, 12) | ||
452 | where RegionUUID not like '%-%'; | ||
453 | |||
454 | |||
455 | update landaccesslist | ||
456 | set LandUUID = substr(LandUUID, 1, 8) || "-" || substr(LandUUID, 9, 4) || "-" || substr(LandUUID, 13, 4) || "-" || substr(LandUUID, 17, 4) || "-" || substr(LandUUID, 21, 12) | ||
457 | where LandUUID not like '%-%'; | ||
458 | |||
459 | update landaccesslist | ||
460 | set AccessUUID = substr(AccessUUID, 1, 8) || "-" || substr(AccessUUID, 9, 4) || "-" || substr(AccessUUID, 13, 4) || "-" || substr(AccessUUID, 17, 4) || "-" || substr(AccessUUID, 21, 12) | ||
461 | where AccessUUID not like '%-%'; | ||
462 | |||
463 | |||
464 | update prims | ||
465 | set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12) | ||
466 | where UUID not like '%-%'; | ||
467 | |||
468 | update prims | ||
469 | set RegionUUID = substr(RegionUUID, 1, 8) || "-" || substr(RegionUUID, 9, 4) || "-" || substr(RegionUUID, 13, 4) || "-" || substr(RegionUUID, 17, 4) || "-" || substr(RegionUUID, 21, 12) | ||
470 | where RegionUUID not like '%-%'; | ||
471 | |||
472 | update prims | ||
473 | set SceneGroupID = substr(SceneGroupID, 1, 8) || "-" || substr(SceneGroupID, 9, 4) || "-" || substr(SceneGroupID, 13, 4) || "-" || substr(SceneGroupID, 17, 4) || "-" || substr(SceneGroupID, 21, 12) | ||
474 | where SceneGroupID not like '%-%'; | ||
475 | |||
476 | update prims | ||
477 | set CreatorID = substr(CreatorID, 1, 8) || "-" || substr(CreatorID, 9, 4) || "-" || substr(CreatorID, 13, 4) || "-" || substr(CreatorID, 17, 4) || "-" || substr(CreatorID, 21, 12) | ||
478 | where CreatorID not like '%-%'; | ||
479 | |||
480 | update prims | ||
481 | set OwnerID = substr(OwnerID, 1, 8) || "-" || substr(OwnerID, 9, 4) || "-" || substr(OwnerID, 13, 4) || "-" || substr(OwnerID, 17, 4) || "-" || substr(OwnerID, 21, 12) | ||
482 | where OwnerID not like '%-%'; | ||
483 | |||
484 | update prims | ||
485 | set GroupID = substr(GroupID, 1, 8) || "-" || substr(GroupID, 9, 4) || "-" || substr(GroupID, 13, 4) || "-" || substr(GroupID, 17, 4) || "-" || substr(GroupID, 21, 12) | ||
486 | where GroupID not like '%-%'; | ||
487 | |||
488 | update prims | ||
489 | set LastOwnerID = substr(LastOwnerID, 1, 8) || "-" || substr(LastOwnerID, 9, 4) || "-" || substr(LastOwnerID, 13, 4) || "-" || substr(LastOwnerID, 17, 4) || "-" || substr(LastOwnerID, 21, 12) | ||
490 | where LastOwnerID not like '%-%'; | ||
491 | |||
492 | |||
493 | update primshapes | ||
494 | set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12) | ||
495 | where UUID not like '%-%'; | ||
496 | |||
497 | |||
498 | update land | ||
499 | set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12) | ||
500 | where UUID not like '%-%'; | ||
501 | |||
502 | update land | ||
503 | set RegionUUID = substr(RegionUUID, 1, 8) || "-" || substr(RegionUUID, 9, 4) || "-" || substr(RegionUUID, 13, 4) || "-" || substr(RegionUUID, 17, 4) || "-" || substr(RegionUUID, 21, 12) | ||
504 | where RegionUUID not like '%-%'; | ||
505 | |||
506 | update land | ||
507 | set OwnerUUID = substr(OwnerUUID, 1, 8) || "-" || substr(OwnerUUID, 9, 4) || "-" || substr(OwnerUUID, 13, 4) || "-" || substr(OwnerUUID, 17, 4) || "-" || substr(OwnerUUID, 21, 12) | ||
508 | where OwnerUUID not like '%-%'; | ||
509 | |||
510 | update land | ||
511 | set GroupUUID = substr(GroupUUID, 1, 8) || "-" || substr(GroupUUID, 9, 4) || "-" || substr(GroupUUID, 13, 4) || "-" || substr(GroupUUID, 17, 4) || "-" || substr(GroupUUID, 21, 12) | ||
512 | where GroupUUID not like '%-%'; | ||
513 | |||
514 | update land | ||
515 | set MediaTextureUUID = substr(MediaTextureUUID, 1, 8) || "-" || substr(MediaTextureUUID, 9, 4) || "-" || substr(MediaTextureUUID, 13, 4) || "-" || substr(MediaTextureUUID, 17, 4) || "-" || substr(MediaTextureUUID, 21, 12) | ||
516 | where MediaTextureUUID not like '%-%'; | ||
517 | |||
518 | update land | ||
519 | set SnapshotUUID = substr(SnapshotUUID, 1, 8) || "-" || substr(SnapshotUUID, 9, 4) || "-" || substr(SnapshotUUID, 13, 4) || "-" || substr(SnapshotUUID, 17, 4) || "-" || substr(SnapshotUUID, 21, 12) | ||
520 | where SnapshotUUID not like '%-%'; | ||
521 | |||
522 | update land | ||
523 | set AuthbuyerID = substr(AuthbuyerID, 1, 8) || "-" || substr(AuthbuyerID, 9, 4) || "-" || substr(AuthbuyerID, 13, 4) || "-" || substr(AuthbuyerID, 17, 4) || "-" || substr(AuthbuyerID, 21, 12) | ||
524 | where AuthbuyerID not like '%-%'; | ||
525 | |||
526 | COMMIT; | ||
diff --git a/OpenSim/Data/SQLite/Resources/001_UserAccount.sql b/OpenSim/Data/SQLite/Resources/UserAccount.migrations index c38d9a7..854fe69 100644 --- a/OpenSim/Data/SQLite/Resources/001_UserAccount.sql +++ b/OpenSim/Data/SQLite/Resources/UserAccount.migrations | |||
@@ -1,4 +1,6 @@ | |||
1 | BEGIN TRANSACTION; | 1 | :VERSION 1 |
2 | |||
3 | BEGIN TRANSACTION; | ||
2 | 4 | ||
3 | -- useraccounts table | 5 | -- useraccounts table |
4 | CREATE TABLE UserAccounts ( | 6 | CREATE TABLE UserAccounts ( |
@@ -14,4 +16,12 @@ CREATE TABLE UserAccounts ( | |||
14 | UserTitle varchar(64) NOT NULL DEFAULT '' | 16 | UserTitle varchar(64) NOT NULL DEFAULT '' |
15 | ); | 17 | ); |
16 | 18 | ||
17 | COMMIT; \ No newline at end of file | 19 | COMMIT; |
20 | |||
21 | :VERSION 2 | ||
22 | |||
23 | BEGIN TRANSACTION; | ||
24 | |||
25 | INSERT INTO UserAccounts (PrincipalID, ScopeID, FirstName, LastName, Email, ServiceURLs, Created) SELECT `UUID` AS PrincipalID, '00000000-0000-0000-0000-000000000000' AS ScopeID, username AS FirstName, surname AS LastName, '' as Email, '' AS ServiceURLs, created as Created FROM users; | ||
26 | |||
27 | COMMIT; | ||
diff --git a/OpenSim/Data/SQLite/Resources/UserStore.migrations b/OpenSim/Data/SQLite/Resources/UserStore.migrations new file mode 100644 index 0000000..73d35e8 --- /dev/null +++ b/OpenSim/Data/SQLite/Resources/UserStore.migrations | |||
@@ -0,0 +1,169 @@ | |||
1 | :VERSION 1 | ||
2 | |||
3 | BEGIN TRANSACTION; | ||
4 | |||
5 | -- users table | ||
6 | CREATE TABLE users( | ||
7 | UUID varchar(255) primary key, | ||
8 | username varchar(255), | ||
9 | surname varchar(255), | ||
10 | passwordHash varchar(255), | ||
11 | passwordSalt varchar(255), | ||
12 | homeRegionX integer, | ||
13 | homeRegionY integer, | ||
14 | homeLocationX float, | ||
15 | homeLocationY float, | ||
16 | homeLocationZ float, | ||
17 | homeLookAtX float, | ||
18 | homeLookAtY float, | ||
19 | homeLookAtZ float, | ||
20 | created integer, | ||
21 | lastLogin integer, | ||
22 | rootInventoryFolderID varchar(255), | ||
23 | userInventoryURI varchar(255), | ||
24 | userAssetURI varchar(255), | ||
25 | profileCanDoMask integer, | ||
26 | profileWantDoMask integer, | ||
27 | profileAboutText varchar(255), | ||
28 | profileFirstText varchar(255), | ||
29 | profileImage varchar(255), | ||
30 | profileFirstImage varchar(255), | ||
31 | webLoginKey text default '00000000-0000-0000-0000-000000000000'); | ||
32 | -- friends table | ||
33 | CREATE TABLE userfriends( | ||
34 | ownerID varchar(255), | ||
35 | friendID varchar(255), | ||
36 | friendPerms integer, | ||
37 | ownerPerms integer, | ||
38 | datetimestamp integer); | ||
39 | |||
40 | COMMIT; | ||
41 | |||
42 | :VERSION 2 | ||
43 | |||
44 | BEGIN; | ||
45 | |||
46 | ALTER TABLE users add homeRegionID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000'; | ||
47 | |||
48 | COMMIT; | ||
49 | |||
50 | :VERSION 3 | ||
51 | |||
52 | BEGIN; | ||
53 | |||
54 | ALTER TABLE users add userFlags integer NOT NULL default 0; | ||
55 | ALTER TABLE users add godLevel integer NOT NULL default 0; | ||
56 | |||
57 | COMMIT; | ||
58 | |||
59 | :VERSION 4 | ||
60 | |||
61 | BEGIN; | ||
62 | |||
63 | ALTER TABLE users add customType varchar(32) not null default ''; | ||
64 | ALTER TABLE users add partner char(36) not null default '00000000-0000-0000-0000-000000000000'; | ||
65 | |||
66 | COMMIT; | ||
67 | |||
68 | :VERSION 5 | ||
69 | |||
70 | BEGIN; | ||
71 | |||
72 | CREATE TABLE `avatarattachments` (`UUID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', `attachpoint` int(11) NOT NULL DEFAULT 0, `item` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', `asset` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000'); | ||
73 | |||
74 | COMMIT; | ||
75 | |||
76 | :VERSION 6 | ||
77 | |||
78 | BEGIN TRANSACTION; | ||
79 | |||
80 | -- usersagents table | ||
81 | CREATE TABLE IF NOT EXISTS useragents( | ||
82 | UUID varchar(255) primary key, | ||
83 | agentIP varchar(255), | ||
84 | agentPort integer, | ||
85 | agentOnline boolean, | ||
86 | sessionID varchar(255), | ||
87 | secureSessionID varchar(255), | ||
88 | regionID varchar(255), | ||
89 | loginTime integer, | ||
90 | logoutTime integer, | ||
91 | currentRegion varchar(255), | ||
92 | currentHandle varchar(255), | ||
93 | currentPosX float, | ||
94 | currentPosY float, | ||
95 | currentPosZ float); | ||
96 | |||
97 | COMMIT; | ||
98 | |||
99 | :VERSION 7 | ||
100 | |||
101 | BEGIN TRANSACTION; | ||
102 | |||
103 | ALTER TABLE useragents add currentLookAtX float not null default 128; | ||
104 | ALTER TABLE useragents add currentLookAtY float not null default 128; | ||
105 | ALTER TABLE useragents add currentLookAtZ float not null default 70; | ||
106 | |||
107 | COMMIT; | ||
108 | |||
109 | :VERSION 8 | ||
110 | |||
111 | BEGIN TRANSACTION; | ||
112 | |||
113 | ALTER TABLE users add email varchar(250); | ||
114 | |||
115 | COMMIT; | ||
116 | |||
117 | :VERSION 9 | ||
118 | |||
119 | BEGIN; | ||
120 | |||
121 | update users | ||
122 | set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12) | ||
123 | where UUID not like '%-%'; | ||
124 | |||
125 | update useragents | ||
126 | set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12) | ||
127 | where UUID not like '%-%'; | ||
128 | |||
129 | COMMIT; | ||
130 | |||
131 | :VERSION 10 | ||
132 | |||
133 | BEGIN TRANSACTION; | ||
134 | |||
135 | CREATE TABLE IF NOT EXISTS avatarappearance( | ||
136 | Owner varchar(36) NOT NULL primary key, | ||
137 | BodyItem varchar(36) DEFAULT NULL, | ||
138 | BodyAsset varchar(36) DEFAULT NULL, | ||
139 | SkinItem varchar(36) DEFAULT NULL, | ||
140 | SkinAsset varchar(36) DEFAULT NULL, | ||
141 | HairItem varchar(36) DEFAULT NULL, | ||
142 | HairAsset varchar(36) DEFAULT NULL, | ||
143 | EyesItem varchar(36) DEFAULT NULL, | ||
144 | EyesAsset varchar(36) DEFAULT NULL, | ||
145 | ShirtItem varchar(36) DEFAULT NULL, | ||
146 | ShirtAsset varchar(36) DEFAULT NULL, | ||
147 | PantsItem varchar(36) DEFAULT NULL, | ||
148 | PantsAsset varchar(36) DEFAULT NULL, | ||
149 | ShoesItem varchar(36) DEFAULT NULL, | ||
150 | ShoesAsset varchar(36) DEFAULT NULL, | ||
151 | SocksItem varchar(36) DEFAULT NULL, | ||
152 | SocksAsset varchar(36) DEFAULT NULL, | ||
153 | JacketItem varchar(36) DEFAULT NULL, | ||
154 | JacketAsset varchar(36) DEFAULT NULL, | ||
155 | GlovesItem varchar(36) DEFAULT NULL, | ||
156 | GlovesAsset varchar(36) DEFAULT NULL, | ||
157 | UnderShirtItem varchar(36) DEFAULT NULL, | ||
158 | UnderShirtAsset varchar(36) DEFAULT NULL, | ||
159 | UnderPantsItem varchar(36) DEFAULT NULL, | ||
160 | UnderPantsAsset varchar(36) DEFAULT NULL, | ||
161 | SkirtItem varchar(36) DEFAULT NULL, | ||
162 | SkirtAsset varchar(36) DEFAULT NULL, | ||
163 | Texture blob, | ||
164 | VisualParams blob, | ||
165 | Serial int DEFAULT NULL, | ||
166 | AvatarHeight float DEFAULT NULL | ||
167 | ); | ||
168 | |||
169 | COMMIT; | ||
diff --git a/OpenSim/Data/SQLite/SQLiteAssetData.cs b/OpenSim/Data/SQLite/SQLiteAssetData.cs index 7081f99..16e560c 100644 --- a/OpenSim/Data/SQLite/SQLiteAssetData.cs +++ b/OpenSim/Data/SQLite/SQLiteAssetData.cs | |||
@@ -44,10 +44,10 @@ namespace OpenSim.Data.SQLite | |||
44 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 44 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
45 | 45 | ||
46 | private const string SelectAssetSQL = "select * from assets where UUID=:UUID"; | 46 | private const string SelectAssetSQL = "select * from assets where UUID=:UUID"; |
47 | private const string SelectAssetMetadataSQL = "select Name, Description, Type, Temporary, asset_flags, UUID from assets limit :start, :count"; | 47 | private const string SelectAssetMetadataSQL = "select Name, Description, Type, Temporary, asset_flags, UUID, CreatorID from assets limit :start, :count"; |
48 | private const string DeleteAssetSQL = "delete from assets where UUID=:UUID"; | 48 | private const string DeleteAssetSQL = "delete from assets where UUID=:UUID"; |
49 | private const string InsertAssetSQL = "insert into assets(UUID, Name, Description, Type, Local, Temporary, asset_flags, Data) values(:UUID, :Name, :Description, :Type, :Local, :Temporary, :Flags, :Data)"; | 49 | private const string InsertAssetSQL = "insert into assets(UUID, Name, Description, Type, Local, Temporary, asset_flags, CreatorID, Data) values(:UUID, :Name, :Description, :Type, :Local, :Temporary, :Flags, :CreatorID, :Data)"; |
50 | private const string UpdateAssetSQL = "update assets set Name=:Name, Description=:Description, Type=:Type, Local=:Local, Temporary=:Temporary, asset_flags=:Flags, Data=:Data where UUID=:UUID"; | 50 | private const string UpdateAssetSQL = "update assets set Name=:Name, Description=:Description, Type=:Type, Local=:Local, Temporary=:Temporary, asset_flags=:Flags, CreatorID=:CreatorID, Data=:Data where UUID=:UUID"; |
51 | private const string assetSelect = "select * from assets"; | 51 | private const string assetSelect = "select * from assets"; |
52 | 52 | ||
53 | private SqliteConnection m_conn; | 53 | private SqliteConnection m_conn; |
@@ -137,6 +137,7 @@ namespace OpenSim.Data.SQLite | |||
137 | cmd.Parameters.Add(new SqliteParameter(":Local", asset.Local)); | 137 | cmd.Parameters.Add(new SqliteParameter(":Local", asset.Local)); |
138 | cmd.Parameters.Add(new SqliteParameter(":Temporary", asset.Temporary)); | 138 | cmd.Parameters.Add(new SqliteParameter(":Temporary", asset.Temporary)); |
139 | cmd.Parameters.Add(new SqliteParameter(":Flags", asset.Flags)); | 139 | cmd.Parameters.Add(new SqliteParameter(":Flags", asset.Flags)); |
140 | cmd.Parameters.Add(new SqliteParameter(":CreatorID", asset.Metadata.CreatorID)); | ||
140 | cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data)); | 141 | cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data)); |
141 | 142 | ||
142 | cmd.ExecuteNonQuery(); | 143 | cmd.ExecuteNonQuery(); |
@@ -156,6 +157,7 @@ namespace OpenSim.Data.SQLite | |||
156 | cmd.Parameters.Add(new SqliteParameter(":Local", asset.Local)); | 157 | cmd.Parameters.Add(new SqliteParameter(":Local", asset.Local)); |
157 | cmd.Parameters.Add(new SqliteParameter(":Temporary", asset.Temporary)); | 158 | cmd.Parameters.Add(new SqliteParameter(":Temporary", asset.Temporary)); |
158 | cmd.Parameters.Add(new SqliteParameter(":Flags", asset.Flags)); | 159 | cmd.Parameters.Add(new SqliteParameter(":Flags", asset.Flags)); |
160 | cmd.Parameters.Add(new SqliteParameter(":CreatorID", asset.Metadata.CreatorID)); | ||
159 | cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data)); | 161 | cmd.Parameters.Add(new SqliteParameter(":Data", asset.Data)); |
160 | 162 | ||
161 | cmd.ExecuteNonQuery(); | 163 | cmd.ExecuteNonQuery(); |
@@ -223,7 +225,7 @@ namespace OpenSim.Data.SQLite | |||
223 | new UUID((String)row["UUID"]), | 225 | new UUID((String)row["UUID"]), |
224 | (String)row["Name"], | 226 | (String)row["Name"], |
225 | Convert.ToSByte(row["Type"]), | 227 | Convert.ToSByte(row["Type"]), |
226 | UUID.Zero.ToString() | 228 | (String)row["CreatorID"] |
227 | ); | 229 | ); |
228 | 230 | ||
229 | asset.Description = (String) row["Description"]; | 231 | asset.Description = (String) row["Description"]; |
@@ -244,6 +246,7 @@ namespace OpenSim.Data.SQLite | |||
244 | metadata.Type = Convert.ToSByte(row["Type"]); | 246 | metadata.Type = Convert.ToSByte(row["Type"]); |
245 | metadata.Temporary = Convert.ToBoolean(row["Temporary"]); // Not sure if this is correct. | 247 | metadata.Temporary = Convert.ToBoolean(row["Temporary"]); // Not sure if this is correct. |
246 | metadata.Flags = (AssetFlags)Convert.ToInt32(row["asset_flags"]); | 248 | metadata.Flags = (AssetFlags)Convert.ToInt32(row["asset_flags"]); |
249 | metadata.CreatorID = row["CreatorID"].ToString(); | ||
247 | 250 | ||
248 | // Current SHA1s are not stored/computed. | 251 | // Current SHA1s are not stored/computed. |
249 | metadata.SHA1 = new byte[] {}; | 252 | metadata.SHA1 = new byte[] {}; |
@@ -328,6 +331,25 @@ namespace OpenSim.Data.SQLite | |||
328 | get { return "SQLite Asset storage engine"; } | 331 | get { return "SQLite Asset storage engine"; } |
329 | } | 332 | } |
330 | 333 | ||
334 | // TODO: (AlexRa): one of these is to be removed eventually (?) | ||
335 | |||
336 | /// <summary> | ||
337 | /// Delete an asset from database | ||
338 | /// </summary> | ||
339 | /// <param name="uuid"></param> | ||
340 | public bool DeleteAsset(UUID uuid) | ||
341 | { | ||
342 | lock (this) | ||
343 | { | ||
344 | using (SqliteCommand cmd = new SqliteCommand(DeleteAssetSQL, m_conn)) | ||
345 | { | ||
346 | cmd.Parameters.Add(new SqliteParameter(":UUID", uuid.ToString())); | ||
347 | cmd.ExecuteNonQuery(); | ||
348 | } | ||
349 | } | ||
350 | return true; | ||
351 | } | ||
352 | |||
331 | public override bool Delete(string id) | 353 | public override bool Delete(string id) |
332 | { | 354 | { |
333 | UUID assetID; | 355 | UUID assetID; |
@@ -335,17 +357,7 @@ namespace OpenSim.Data.SQLite | |||
335 | if (!UUID.TryParse(id, out assetID)) | 357 | if (!UUID.TryParse(id, out assetID)) |
336 | return false; | 358 | return false; |
337 | 359 | ||
338 | lock (this) | 360 | return DeleteAsset(assetID); |
339 | { | ||
340 | using (SqliteCommand cmd = new SqliteCommand(DeleteAssetSQL, m_conn)) | ||
341 | { | ||
342 | cmd.Parameters.Add(new SqliteParameter(":UUID", assetID.ToString())); | ||
343 | |||
344 | cmd.ExecuteNonQuery(); | ||
345 | } | ||
346 | } | ||
347 | |||
348 | return true; | ||
349 | } | 361 | } |
350 | 362 | ||
351 | #endregion | 363 | #endregion |
diff --git a/OpenSim/Data/Tests/BasicAssetTest.cs b/OpenSim/Data/Tests/BasicAssetTest.cs index e80cff9..71d6314 100644 --- a/OpenSim/Data/Tests/BasicAssetTest.cs +++ b/OpenSim/Data/Tests/BasicAssetTest.cs | |||
@@ -42,7 +42,11 @@ namespace OpenSim.Data.Tests | |||
42 | public UUID uuid1; | 42 | public UUID uuid1; |
43 | public UUID uuid2; | 43 | public UUID uuid2; |
44 | public UUID uuid3; | 44 | public UUID uuid3; |
45 | public string critter1 = UUID.Random().ToString(); | ||
46 | public string critter2 = UUID.Random().ToString(); | ||
47 | public string critter3 = UUID.Random().ToString(); | ||
45 | public byte[] asset1; | 48 | public byte[] asset1; |
49 | PropertyScrambler<AssetBase> scrambler; | ||
46 | 50 | ||
47 | public void SuperInit() | 51 | public void SuperInit() |
48 | { | 52 | { |
@@ -53,6 +57,16 @@ namespace OpenSim.Data.Tests | |||
53 | uuid3 = UUID.Random(); | 57 | uuid3 = UUID.Random(); |
54 | asset1 = new byte[100]; | 58 | asset1 = new byte[100]; |
55 | asset1.Initialize(); | 59 | asset1.Initialize(); |
60 | |||
61 | |||
62 | scrambler = new PropertyScrambler<AssetBase>() | ||
63 | .DontScramble(x => x.ID) | ||
64 | .DontScramble(x => x.FullID) | ||
65 | .DontScramble(x => x.Metadata.ID) | ||
66 | .DontScramble(x => x.Metadata.Type) | ||
67 | .DontScramble(x => x.Metadata.CreatorID) | ||
68 | .DontScramble(x => x.Metadata.ContentType) | ||
69 | .DontScramble(x => x.Metadata.FullID); | ||
56 | } | 70 | } |
57 | 71 | ||
58 | [Test] | 72 | [Test] |
@@ -66,27 +80,17 @@ namespace OpenSim.Data.Tests | |||
66 | [Test] | 80 | [Test] |
67 | public void T010_StoreSimpleAsset() | 81 | public void T010_StoreSimpleAsset() |
68 | { | 82 | { |
69 | AssetBase a1 = new AssetBase(uuid1, "asset one", (sbyte)AssetType.Texture, UUID.Zero.ToString()); | 83 | AssetBase a1 = new AssetBase(uuid1, "asset one", (sbyte)AssetType.Texture, critter1); |
70 | AssetBase a2 = new AssetBase(uuid2, "asset two", (sbyte)AssetType.Texture, UUID.Zero.ToString()); | 84 | AssetBase a2 = new AssetBase(uuid2, "asset two", (sbyte)AssetType.Texture, critter2); |
71 | AssetBase a3 = new AssetBase(uuid3, "asset three", (sbyte)AssetType.Texture, UUID.Zero.ToString()); | 85 | AssetBase a3 = new AssetBase(uuid3, "asset three", (sbyte)AssetType.Texture, critter3); |
72 | a1.Data = asset1; | 86 | a1.Data = asset1; |
73 | a2.Data = asset1; | 87 | a2.Data = asset1; |
74 | a3.Data = asset1; | 88 | a3.Data = asset1; |
75 | 89 | ||
76 | PropertyScrambler<AssetBase> scrambler = new PropertyScrambler<AssetBase>() | ||
77 | .DontScramble(x => x.Data) | ||
78 | .DontScramble(x => x.ID) | ||
79 | .DontScramble(x => x.FullID) | ||
80 | .DontScramble(x => x.Metadata.ID) | ||
81 | .DontScramble(x => x.Metadata.CreatorID) | ||
82 | .DontScramble(x => x.Metadata.ContentType) | ||
83 | .DontScramble(x => x.Metadata.FullID); | ||
84 | |||
85 | scrambler.Scramble(a1); | 90 | scrambler.Scramble(a1); |
86 | scrambler.Scramble(a2); | 91 | scrambler.Scramble(a2); |
87 | scrambler.Scramble(a3); | 92 | scrambler.Scramble(a3); |
88 | 93 | ||
89 | |||
90 | db.StoreAsset(a1); | 94 | db.StoreAsset(a1); |
91 | db.StoreAsset(a2); | 95 | db.StoreAsset(a2); |
92 | db.StoreAsset(a3); | 96 | db.StoreAsset(a3); |
@@ -130,5 +134,33 @@ namespace OpenSim.Data.Tests | |||
130 | Assert.That(metadata.Temporary, Is.EqualTo(a1b.Temporary)); | 134 | Assert.That(metadata.Temporary, Is.EqualTo(a1b.Temporary)); |
131 | Assert.That(metadata.FullID, Is.EqualTo(a1b.FullID)); | 135 | Assert.That(metadata.FullID, Is.EqualTo(a1b.FullID)); |
132 | } | 136 | } |
137 | |||
138 | |||
139 | [Test] | ||
140 | public void T020_CheckForWeirdCreatorID() | ||
141 | { | ||
142 | // It is expected that eventually the CreatorID might be an arbitrary string (an URI) | ||
143 | // rather than a valid UUID (?). This test is to make sure that the database layer does not | ||
144 | // attempt to convert CreatorID to GUID, but just passes it both ways as a string. | ||
145 | AssetBase a1 = new AssetBase(uuid1, "asset one", (sbyte)AssetType.Texture, critter1); | ||
146 | AssetBase a2 = new AssetBase(uuid2, "asset two", (sbyte)AssetType.Texture, "This is not a GUID!"); | ||
147 | AssetBase a3 = new AssetBase(uuid3, "asset three", (sbyte)AssetType.Texture, ""); | ||
148 | a1.Data = asset1; | ||
149 | a2.Data = asset1; | ||
150 | a3.Data = asset1; | ||
151 | |||
152 | db.StoreAsset(a1); | ||
153 | db.StoreAsset(a2); | ||
154 | db.StoreAsset(a3); | ||
155 | |||
156 | AssetBase a1a = db.GetAsset(uuid1); | ||
157 | Assert.That(a1a, Constraints.PropertyCompareConstraint(a1)); | ||
158 | |||
159 | AssetBase a2a = db.GetAsset(uuid2); | ||
160 | Assert.That(a2a, Constraints.PropertyCompareConstraint(a2)); | ||
161 | |||
162 | AssetBase a3a = db.GetAsset(uuid3); | ||
163 | Assert.That(a3a, Constraints.PropertyCompareConstraint(a3)); | ||
164 | } | ||
133 | } | 165 | } |
134 | } | 166 | } |
diff --git a/OpenSim/Framework/Console/OpenSimAppender.cs b/OpenSim/Framework/Console/OpenSimAppender.cs index cd95506..72a251e 100644 --- a/OpenSim/Framework/Console/OpenSimAppender.cs +++ b/OpenSim/Framework/Console/OpenSimAppender.cs | |||
@@ -66,7 +66,10 @@ namespace OpenSim.Framework.Console | |||
66 | } | 66 | } |
67 | else | 67 | else |
68 | { | 68 | { |
69 | System.Console.Write(loggingMessage); | 69 | if (!loggingMessage.EndsWith("\n")) |
70 | System.Console.WriteLine(loggingMessage); | ||
71 | else | ||
72 | System.Console.Write(loggingMessage); | ||
70 | } | 73 | } |
71 | } | 74 | } |
72 | catch (Exception e) | 75 | catch (Exception e) |
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index ae2a80c..562d69e 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -571,207 +571,6 @@ namespace OpenSim.Framework | |||
571 | public float dwell; | 571 | public float dwell; |
572 | } | 572 | } |
573 | 573 | ||
574 | public struct SendAvatarData | ||
575 | { | ||
576 | public readonly ulong RegionHandle; | ||
577 | public readonly string FirstName; | ||
578 | public readonly string LastName; | ||
579 | public readonly string GroupTitle; | ||
580 | public readonly UUID AvatarID; | ||
581 | public readonly uint AvatarLocalID; | ||
582 | public readonly Vector3 Position; | ||
583 | public readonly byte[] TextureEntry; | ||
584 | public readonly uint ParentID; | ||
585 | public readonly Quaternion Rotation; | ||
586 | |||
587 | public SendAvatarData(ulong regionHandle, string firstName, string lastName, string groupTitle, UUID avatarID, | ||
588 | uint avatarLocalID, Vector3 position, byte[] textureEntry, uint parentID, Quaternion rotation) | ||
589 | { | ||
590 | RegionHandle = regionHandle; | ||
591 | FirstName = firstName; | ||
592 | LastName = lastName; | ||
593 | GroupTitle = groupTitle; | ||
594 | AvatarID = avatarID; | ||
595 | AvatarLocalID = avatarLocalID; | ||
596 | Position = position; | ||
597 | TextureEntry = textureEntry; | ||
598 | ParentID = parentID; | ||
599 | Rotation = rotation; | ||
600 | } | ||
601 | } | ||
602 | |||
603 | public struct SendAvatarTerseData | ||
604 | { | ||
605 | public readonly ulong RegionHandle; | ||
606 | public readonly ushort TimeDilation; | ||
607 | public readonly uint LocalID; | ||
608 | public readonly Vector3 Position; | ||
609 | public readonly Vector3 Velocity; | ||
610 | public readonly Vector3 Acceleration; | ||
611 | public readonly Quaternion Rotation; | ||
612 | public readonly Vector4 CollisionPlane; | ||
613 | public readonly UUID AgentID; | ||
614 | public readonly byte[] TextureEntry; | ||
615 | public readonly double Priority; | ||
616 | |||
617 | public SendAvatarTerseData(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position, Vector3 velocity, | ||
618 | Vector3 acceleration, Quaternion rotation, Vector4 collisionPlane, UUID agentid, byte[] textureEntry, double priority) | ||
619 | { | ||
620 | RegionHandle = regionHandle; | ||
621 | TimeDilation = timeDilation; | ||
622 | LocalID = localID; | ||
623 | Position = position; | ||
624 | Velocity = velocity; | ||
625 | Acceleration = acceleration; | ||
626 | Rotation = rotation; | ||
627 | CollisionPlane = collisionPlane; | ||
628 | AgentID = agentid; | ||
629 | TextureEntry = textureEntry; | ||
630 | Priority = priority; | ||
631 | } | ||
632 | } | ||
633 | |||
634 | public struct SendPrimitiveTerseData | ||
635 | { | ||
636 | public readonly ulong RegionHandle; | ||
637 | public readonly ushort TimeDilation; | ||
638 | public readonly uint LocalID; | ||
639 | public readonly Vector3 Position; | ||
640 | public readonly Quaternion Rotation; | ||
641 | public readonly Vector3 Velocity; | ||
642 | public readonly Vector3 Acceleration; | ||
643 | public readonly Vector3 AngularVelocity; | ||
644 | public readonly UUID AssetID; | ||
645 | public readonly UUID OwnerID; | ||
646 | public readonly int AttachPoint; | ||
647 | public readonly byte[] TextureEntry; | ||
648 | public readonly double Priority; | ||
649 | |||
650 | public SendPrimitiveTerseData(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position, | ||
651 | Quaternion rotation, Vector3 velocity, Vector3 acceleration, Vector3 rotationalvelocity, | ||
652 | UUID assetID, UUID ownerID, int attachPoint, byte[] textureEntry, double priority) | ||
653 | { | ||
654 | RegionHandle = regionHandle; | ||
655 | TimeDilation = timeDilation; | ||
656 | LocalID = localID; | ||
657 | Position = position; | ||
658 | Rotation = rotation; | ||
659 | Velocity = velocity; | ||
660 | Acceleration = acceleration; | ||
661 | AngularVelocity = rotationalvelocity; | ||
662 | AssetID = assetID; | ||
663 | OwnerID = ownerID; | ||
664 | AttachPoint = attachPoint; | ||
665 | TextureEntry = textureEntry; | ||
666 | Priority = priority; | ||
667 | } | ||
668 | } | ||
669 | |||
670 | public struct SendPrimitiveData | ||
671 | { | ||
672 | private ulong m_regionHandle; | ||
673 | private ushort m_timeDilation; | ||
674 | private uint m_localID; | ||
675 | private PrimitiveBaseShape m_primShape; | ||
676 | private Vector3 m_pos; | ||
677 | private Vector3 m_vel; | ||
678 | private Vector3 m_acc; | ||
679 | private Quaternion m_rotation; | ||
680 | private Vector3 m_rvel; | ||
681 | private PrimFlags m_flags; | ||
682 | private UUID m_objectID; | ||
683 | private UUID m_ownerID; | ||
684 | private string m_text; | ||
685 | private byte[] m_color; | ||
686 | private uint m_parentID; | ||
687 | private byte[] m_particleSystem; | ||
688 | private byte m_clickAction; | ||
689 | private byte m_material; | ||
690 | private byte[] m_textureanim; | ||
691 | private bool m_attachment; | ||
692 | private uint m_AttachPoint; | ||
693 | private UUID m_AssetId; | ||
694 | private UUID m_SoundId; | ||
695 | private double m_SoundVolume; | ||
696 | private byte m_SoundFlags; | ||
697 | private double m_SoundRadius; | ||
698 | private double m_priority; | ||
699 | |||
700 | public SendPrimitiveData(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, | ||
701 | Vector3 pos, Vector3 vel, Vector3 acc, Quaternion rotation, Vector3 rvel, | ||
702 | uint flags, UUID objectID, UUID ownerID, string text, byte[] color, | ||
703 | uint parentID, byte[] particleSystem, byte clickAction, byte material, double priority) : | ||
704 | this(regionHandle, timeDilation, localID, primShape, pos, vel, acc, rotation, rvel, flags, objectID, | ||
705 | ownerID, text, color, parentID, particleSystem, clickAction, material, new byte[0], false, 0, UUID.Zero, | ||
706 | UUID.Zero, 0, 0, 0, priority) { } | ||
707 | |||
708 | public SendPrimitiveData(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, | ||
709 | Vector3 pos, Vector3 vel, Vector3 acc, Quaternion rotation, Vector3 rvel, | ||
710 | uint flags, | ||
711 | UUID objectID, UUID ownerID, string text, byte[] color, uint parentID, | ||
712 | byte[] particleSystem, | ||
713 | byte clickAction, byte material, byte[] textureanim, bool attachment, | ||
714 | uint AttachPoint, UUID AssetId, UUID SoundId, double SoundVolume, byte SoundFlags, | ||
715 | double SoundRadius, double priority) | ||
716 | { | ||
717 | this.m_regionHandle = regionHandle; | ||
718 | this.m_timeDilation = timeDilation; | ||
719 | this.m_localID = localID; | ||
720 | this.m_primShape = primShape; | ||
721 | this.m_pos = pos; | ||
722 | this.m_vel = vel; | ||
723 | this.m_acc = acc; | ||
724 | this.m_rotation = rotation; | ||
725 | this.m_rvel = rvel; | ||
726 | this.m_flags = (PrimFlags)flags; | ||
727 | this.m_objectID = objectID; | ||
728 | this.m_ownerID = ownerID; | ||
729 | this.m_text = text; | ||
730 | this.m_color = color; | ||
731 | this.m_parentID = parentID; | ||
732 | this.m_particleSystem = particleSystem; | ||
733 | this.m_clickAction = clickAction; | ||
734 | this.m_material = material; | ||
735 | this.m_textureanim = textureanim; | ||
736 | this.m_attachment = attachment; | ||
737 | this.m_AttachPoint = AttachPoint; | ||
738 | this.m_AssetId = AssetId; | ||
739 | this.m_SoundId = SoundId; | ||
740 | this.m_SoundVolume = SoundVolume; | ||
741 | this.m_SoundFlags = SoundFlags; | ||
742 | this.m_SoundRadius = SoundRadius; | ||
743 | this.m_priority = priority; | ||
744 | } | ||
745 | |||
746 | public ulong regionHandle { get { return this.m_regionHandle; } } | ||
747 | public ushort timeDilation { get { return this.m_timeDilation; } } | ||
748 | public uint localID { get { return this.m_localID; } } | ||
749 | public PrimitiveBaseShape primShape { get { return this.m_primShape; } } | ||
750 | public Vector3 pos { get { return this.m_pos; } } | ||
751 | public Vector3 vel { get { return this.m_vel; } } | ||
752 | public Vector3 acc { get { return this.m_acc; } } | ||
753 | public Quaternion rotation { get { return this.m_rotation; } } | ||
754 | public Vector3 rvel { get { return this.m_rvel; } } | ||
755 | public PrimFlags flags { get { return this.m_flags; } } | ||
756 | public UUID objectID { get { return this.m_objectID; } } | ||
757 | public UUID ownerID { get { return this.m_ownerID; } } | ||
758 | public string text { get { return this.m_text; } } | ||
759 | public byte[] color { get { return this.m_color; } } | ||
760 | public uint parentID { get { return this.m_parentID; } } | ||
761 | public byte[] particleSystem { get { return this.m_particleSystem; } } | ||
762 | public byte clickAction { get { return this.m_clickAction; } } | ||
763 | public byte material { get { return this.m_material; } } | ||
764 | public byte[] textureanim { get { return this.m_textureanim; } } | ||
765 | public bool attachment { get { return this.m_attachment; } } | ||
766 | public uint AttachPoint { get { return this.m_AttachPoint; } } | ||
767 | public UUID AssetId { get { return this.m_AssetId; } } | ||
768 | public UUID SoundId { get { return this.m_SoundId; } } | ||
769 | public double SoundVolume { get { return this.m_SoundVolume; } } | ||
770 | public byte SoundFlags { get { return this.m_SoundFlags; } } | ||
771 | public double SoundRadius { get { return this.m_SoundRadius; } } | ||
772 | public double priority { get { return this.m_priority; } } | ||
773 | } | ||
774 | |||
775 | public struct UpdatePriorityData { | 574 | public struct UpdatePriorityData { |
776 | private double m_priority; | 575 | private double m_priority; |
777 | private uint m_localID; | 576 | private uint m_localID; |
@@ -785,14 +584,46 @@ namespace OpenSim.Framework | |||
785 | public uint localID { get { return this.m_localID; } } | 584 | public uint localID { get { return this.m_localID; } } |
786 | } | 585 | } |
787 | 586 | ||
587 | /// <summary> | ||
588 | /// Specifies the fields that have been changed when sending a prim or | ||
589 | /// avatar update | ||
590 | /// </summary> | ||
788 | [Flags] | 591 | [Flags] |
789 | public enum StateUpdateTypes | 592 | public enum PrimUpdateFlags : uint |
790 | { | 593 | { |
791 | None = 0, | 594 | None = 0, |
792 | AvatarTerse = 1, | 595 | AttachmentPoint = 1 << 0, |
793 | PrimitiveTerse = AvatarTerse << 1, | 596 | Material = 1 << 1, |
794 | PrimitiveFull = PrimitiveTerse << 1, | 597 | ClickAction = 1 << 2, |
795 | All = AvatarTerse | PrimitiveTerse | PrimitiveFull, | 598 | Scale = 1 << 3, |
599 | ParentID = 1 << 4, | ||
600 | PrimFlags = 1 << 5, | ||
601 | PrimData = 1 << 6, | ||
602 | MediaURL = 1 << 7, | ||
603 | ScratchPad = 1 << 8, | ||
604 | Textures = 1 << 9, | ||
605 | TextureAnim = 1 << 10, | ||
606 | NameValue = 1 << 11, | ||
607 | Position = 1 << 12, | ||
608 | Rotation = 1 << 13, | ||
609 | Velocity = 1 << 14, | ||
610 | Acceleration = 1 << 15, | ||
611 | AngularVelocity = 1 << 16, | ||
612 | CollisionPlane = 1 << 17, | ||
613 | Text = 1 << 18, | ||
614 | Particles = 1 << 19, | ||
615 | ExtraData = 1 << 20, | ||
616 | Sound = 1 << 21, | ||
617 | Joint = 1 << 22, | ||
618 | FullUpdate = UInt32.MaxValue | ||
619 | } | ||
620 | |||
621 | public static class PrimUpdateFlagsExtensions | ||
622 | { | ||
623 | public static bool HasFlag(this PrimUpdateFlags updateFlags, PrimUpdateFlags flag) | ||
624 | { | ||
625 | return (updateFlags & flag) == flag; | ||
626 | } | ||
796 | } | 627 | } |
797 | 628 | ||
798 | public interface IClientAPI | 629 | public interface IClientAPI |
@@ -1188,27 +1019,20 @@ namespace OpenSim.Framework | |||
1188 | void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance); | 1019 | void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance); |
1189 | void SendPayPrice(UUID objectID, int[] payPrice); | 1020 | void SendPayPrice(UUID objectID, int[] payPrice); |
1190 | 1021 | ||
1191 | void SendAvatarData(SendAvatarData data); | ||
1192 | |||
1193 | void SendAvatarTerseUpdate(SendAvatarTerseData data); | ||
1194 | |||
1195 | void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations); | 1022 | void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations); |
1196 | 1023 | ||
1197 | void AttachObject(uint localID, Quaternion rotation, byte attachPoint, UUID ownerID); | 1024 | void AttachObject(uint localID, Quaternion rotation, byte attachPoint, UUID ownerID); |
1198 | void SetChildAgentThrottle(byte[] throttle); | 1025 | void SetChildAgentThrottle(byte[] throttle); |
1199 | 1026 | ||
1200 | void SendPrimitiveToClient(SendPrimitiveData data); | 1027 | void SendAvatarDataImmediate(ISceneEntity avatar); |
1201 | 1028 | void SendPrimUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags); | |
1202 | void SendPrimTerseUpdate(SendPrimitiveTerseData data); | 1029 | void ReprioritizeUpdates(UpdatePriorityHandler handler); |
1203 | 1030 | void FlushPrimUpdates(); | |
1204 | void ReprioritizeUpdates(StateUpdateTypes type, UpdatePriorityHandler handler); | ||
1205 | 1031 | ||
1206 | void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List<InventoryItemBase> items, | 1032 | void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List<InventoryItemBase> items, |
1207 | List<InventoryFolderBase> folders, int version, bool fetchFolders, | 1033 | List<InventoryFolderBase> folders, int version, bool fetchFolders, |
1208 | bool fetchItems); | 1034 | bool fetchItems); |
1209 | 1035 | ||
1210 | void FlushPrimUpdates(); | ||
1211 | |||
1212 | void SendInventoryItemDetails(UUID ownerID, InventoryItemBase item); | 1036 | void SendInventoryItemDetails(UUID ownerID, InventoryItemBase item); |
1213 | 1037 | ||
1214 | /// <summary> | 1038 | /// <summary> |
diff --git a/OpenSim/Framework/ISceneEntity.cs b/OpenSim/Framework/ISceneEntity.cs new file mode 100644 index 0000000..fa3c514 --- /dev/null +++ b/OpenSim/Framework/ISceneEntity.cs | |||
@@ -0,0 +1,37 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using OpenMetaverse; | ||
29 | |||
30 | namespace OpenSim.Framework | ||
31 | { | ||
32 | public interface ISceneEntity | ||
33 | { | ||
34 | UUID UUID { get; } | ||
35 | uint LocalId { get; } | ||
36 | } | ||
37 | } | ||
diff --git a/OpenSim/Framework/Lazy.cs b/OpenSim/Framework/Lazy.cs new file mode 100644 index 0000000..8a417ac --- /dev/null +++ b/OpenSim/Framework/Lazy.cs | |||
@@ -0,0 +1,236 @@ | |||
1 | // | ||
2 | // Lazy.cs | ||
3 | // | ||
4 | // Authors: | ||
5 | // Zoltan Varga (vargaz@gmail.com) | ||
6 | // Marek Safar (marek.safar@gmail.com) | ||
7 | // | ||
8 | // Copyright (C) 2009 Novell | ||
9 | // | ||
10 | // Permission is hereby granted, free of charge, to any person obtaining | ||
11 | // a copy of this software and associated documentation files (the | ||
12 | // "Software"), to deal in the Software without restriction, including | ||
13 | // without limitation the rights to use, copy, modify, merge, publish, | ||
14 | // distribute, sublicense, and/or sell copies of the Software, and to | ||
15 | // permit persons to whom the Software is furnished to do so, subject to | ||
16 | // the following conditions: | ||
17 | // | ||
18 | // The above copyright notice and this permission notice shall be | ||
19 | // included in all copies or substantial portions of the Software. | ||
20 | // | ||
21 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
22 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
23 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
24 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||
25 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
26 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
27 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
28 | // | ||
29 | |||
30 | using System; | ||
31 | using System.Runtime.Serialization; | ||
32 | using System.Runtime.InteropServices; | ||
33 | using System.Security.Permissions; | ||
34 | using System.Threading; | ||
35 | using System.Diagnostics; | ||
36 | |||
37 | namespace OpenSim.Framework | ||
38 | { | ||
39 | public enum LazyThreadSafetyMode | ||
40 | { | ||
41 | None, | ||
42 | PublicationOnly, | ||
43 | ExecutionAndPublication | ||
44 | } | ||
45 | |||
46 | [SerializableAttribute] | ||
47 | [ComVisibleAttribute(false)] | ||
48 | [HostProtectionAttribute(SecurityAction.LinkDemand, Synchronization = true, ExternalThreading = true)] | ||
49 | public class Lazy<T> | ||
50 | { | ||
51 | T value; | ||
52 | bool inited; | ||
53 | LazyThreadSafetyMode mode; | ||
54 | Func<T> factory; | ||
55 | object monitor; | ||
56 | Exception exception; | ||
57 | |||
58 | public Lazy() | ||
59 | : this(LazyThreadSafetyMode.ExecutionAndPublication) | ||
60 | { | ||
61 | } | ||
62 | |||
63 | public Lazy(Func<T> valueFactory) | ||
64 | : this(valueFactory, LazyThreadSafetyMode.ExecutionAndPublication) | ||
65 | { | ||
66 | } | ||
67 | |||
68 | public Lazy(bool isThreadSafe) | ||
69 | : this(() => Activator.CreateInstance<T>(), isThreadSafe ? LazyThreadSafetyMode.ExecutionAndPublication : LazyThreadSafetyMode.None) | ||
70 | { | ||
71 | } | ||
72 | |||
73 | public Lazy(Func<T> valueFactory, bool isThreadSafe) | ||
74 | : this(valueFactory, isThreadSafe ? LazyThreadSafetyMode.ExecutionAndPublication : LazyThreadSafetyMode.None) | ||
75 | { | ||
76 | } | ||
77 | |||
78 | public Lazy(LazyThreadSafetyMode mode) | ||
79 | : this(() => Activator.CreateInstance<T>(), mode) | ||
80 | { | ||
81 | } | ||
82 | |||
83 | public Lazy(Func<T> valueFactory, LazyThreadSafetyMode mode) | ||
84 | { | ||
85 | if (valueFactory == null) | ||
86 | throw new ArgumentNullException("valueFactory"); | ||
87 | this.factory = valueFactory; | ||
88 | if (mode != LazyThreadSafetyMode.None) | ||
89 | monitor = new object(); | ||
90 | this.mode = mode; | ||
91 | } | ||
92 | |||
93 | // Don't trigger expensive initialization | ||
94 | [DebuggerBrowsable(DebuggerBrowsableState.Never)] | ||
95 | public T Value | ||
96 | { | ||
97 | get | ||
98 | { | ||
99 | if (inited) | ||
100 | return value; | ||
101 | if (exception != null) | ||
102 | throw exception; | ||
103 | |||
104 | return InitValue(); | ||
105 | } | ||
106 | } | ||
107 | |||
108 | T InitValue() | ||
109 | { | ||
110 | switch (mode) | ||
111 | { | ||
112 | case LazyThreadSafetyMode.None: | ||
113 | { | ||
114 | var init_factory = factory; | ||
115 | if (init_factory == null) | ||
116 | throw exception = new InvalidOperationException("The initialization function tries to access Value on this instance"); | ||
117 | try | ||
118 | { | ||
119 | factory = null; | ||
120 | T v = init_factory(); | ||
121 | value = v; | ||
122 | Thread.MemoryBarrier(); | ||
123 | inited = true; | ||
124 | } | ||
125 | catch (Exception ex) | ||
126 | { | ||
127 | exception = ex; | ||
128 | throw; | ||
129 | } | ||
130 | break; | ||
131 | } | ||
132 | case LazyThreadSafetyMode.PublicationOnly: | ||
133 | { | ||
134 | var init_factory = factory; | ||
135 | T v; | ||
136 | |||
137 | //exceptions are ignored | ||
138 | if (init_factory != null) | ||
139 | v = init_factory(); | ||
140 | else | ||
141 | v = default(T); | ||
142 | |||
143 | lock (monitor) | ||
144 | { | ||
145 | if (inited) | ||
146 | return value; | ||
147 | value = v; | ||
148 | Thread.MemoryBarrier(); | ||
149 | inited = true; | ||
150 | factory = null; | ||
151 | } | ||
152 | break; | ||
153 | } | ||
154 | case LazyThreadSafetyMode.ExecutionAndPublication: | ||
155 | { | ||
156 | lock (monitor) | ||
157 | { | ||
158 | if (inited) | ||
159 | return value; | ||
160 | |||
161 | if (factory == null) | ||
162 | throw exception = new InvalidOperationException("The initialization function tries to access Value on this instance"); | ||
163 | |||
164 | var init_factory = factory; | ||
165 | try | ||
166 | { | ||
167 | factory = null; | ||
168 | T v = init_factory(); | ||
169 | value = v; | ||
170 | Thread.MemoryBarrier(); | ||
171 | inited = true; | ||
172 | } | ||
173 | catch (Exception ex) | ||
174 | { | ||
175 | exception = ex; | ||
176 | throw; | ||
177 | } | ||
178 | } | ||
179 | break; | ||
180 | } | ||
181 | default: | ||
182 | throw new InvalidOperationException("Invalid LazyThreadSafetyMode " + mode); | ||
183 | } | ||
184 | |||
185 | if (monitor == null) | ||
186 | { | ||
187 | value = factory(); | ||
188 | inited = true; | ||
189 | } | ||
190 | else | ||
191 | { | ||
192 | lock (monitor) | ||
193 | { | ||
194 | if (inited) | ||
195 | return value; | ||
196 | |||
197 | if (factory == null) | ||
198 | throw new InvalidOperationException("The initialization function tries to access Value on this instance"); | ||
199 | |||
200 | var init_factory = factory; | ||
201 | try | ||
202 | { | ||
203 | factory = null; | ||
204 | T v = init_factory(); | ||
205 | value = v; | ||
206 | Thread.MemoryBarrier(); | ||
207 | inited = true; | ||
208 | } | ||
209 | catch | ||
210 | { | ||
211 | factory = init_factory; | ||
212 | throw; | ||
213 | } | ||
214 | } | ||
215 | } | ||
216 | |||
217 | return value; | ||
218 | } | ||
219 | |||
220 | public bool IsValueCreated | ||
221 | { | ||
222 | get | ||
223 | { | ||
224 | return inited; | ||
225 | } | ||
226 | } | ||
227 | |||
228 | public override string ToString() | ||
229 | { | ||
230 | if (inited) | ||
231 | return value.ToString(); | ||
232 | else | ||
233 | return "Value is not created"; | ||
234 | } | ||
235 | } | ||
236 | } | ||
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 5b1aa86..e29ae2a 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -50,43 +50,17 @@ using Nini.Config; | |||
50 | 50 | ||
51 | namespace OpenSim.Region.ClientStack.LindenUDP | 51 | namespace OpenSim.Region.ClientStack.LindenUDP |
52 | { | 52 | { |
53 | #region Enums | 53 | public class EntityUpdate |
54 | |||
55 | /// <summary> | ||
56 | /// Specifies the fields that have been changed when sending a prim or | ||
57 | /// avatar update | ||
58 | /// </summary> | ||
59 | [Flags] | ||
60 | public enum PrimUpdateFlags : uint | ||
61 | { | 54 | { |
62 | None = 0, | 55 | public ISceneEntity Entity; |
63 | AttachmentPoint = 1 << 0, | 56 | public PrimUpdateFlags Flags; |
64 | Material = 1 << 1, | ||
65 | ClickAction = 1 << 2, | ||
66 | Scale = 1 << 3, | ||
67 | ParentID = 1 << 4, | ||
68 | PrimFlags = 1 << 5, | ||
69 | PrimData = 1 << 6, | ||
70 | MediaURL = 1 << 7, | ||
71 | ScratchPad = 1 << 8, | ||
72 | Textures = 1 << 9, | ||
73 | TextureAnim = 1 << 10, | ||
74 | NameValue = 1 << 11, | ||
75 | Position = 1 << 12, | ||
76 | Rotation = 1 << 13, | ||
77 | Velocity = 1 << 14, | ||
78 | Acceleration = 1 << 15, | ||
79 | AngularVelocity = 1 << 16, | ||
80 | CollisionPlane = 1 << 17, | ||
81 | Text = 1 << 18, | ||
82 | Particles = 1 << 19, | ||
83 | ExtraData = 1 << 20, | ||
84 | Sound = 1 << 21, | ||
85 | Joint = 1 << 22, | ||
86 | FullUpdate = UInt32.MaxValue | ||
87 | } | ||
88 | 57 | ||
89 | #endregion Enums | 58 | public EntityUpdate(ISceneEntity entity, PrimUpdateFlags flags) |
59 | { | ||
60 | Entity = entity; | ||
61 | Flags = flags; | ||
62 | } | ||
63 | } | ||
90 | 64 | ||
91 | public delegate bool PacketMethod(IClientAPI simClient, Packet packet); | 65 | public delegate bool PacketMethod(IClientAPI simClient, Packet packet); |
92 | 66 | ||
@@ -350,9 +324,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
350 | private readonly IGroupsModule m_GroupsModule; | 324 | private readonly IGroupsModule m_GroupsModule; |
351 | 325 | ||
352 | private int m_cachedTextureSerial; | 326 | private int m_cachedTextureSerial; |
353 | protected PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock> m_avatarTerseUpdates; | 327 | private PriorityQueue<double, EntityUpdate> m_entityUpdates; |
354 | private PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock> m_primTerseUpdates; | ||
355 | private PriorityQueue<double, ObjectUpdatePacket.ObjectDataBlock> m_primFullUpdates; | ||
356 | 328 | ||
357 | /// <value> | 329 | /// <value> |
358 | /// List used in construction of data blocks for an object update packet. This is to stop us having to | 330 | /// List used in construction of data blocks for an object update packet. This is to stop us having to |
@@ -466,9 +438,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
466 | 438 | ||
467 | m_scene = scene; | 439 | m_scene = scene; |
468 | 440 | ||
469 | m_avatarTerseUpdates = new PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock>(); | 441 | m_entityUpdates = new PriorityQueue<double, EntityUpdate>(m_scene.Entities.Count); |
470 | m_primTerseUpdates = new PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock>(); | ||
471 | m_primFullUpdates = new PriorityQueue<double, ObjectUpdatePacket.ObjectDataBlock>(m_scene.Entities.Count); | ||
472 | m_fullUpdateDataBlocksBuilder = new List<ObjectUpdatePacket.ObjectDataBlock>(); | 442 | m_fullUpdateDataBlocksBuilder = new List<ObjectUpdatePacket.ObjectDataBlock>(); |
473 | m_killRecord = new HashSet<uint>(); | 443 | m_killRecord = new HashSet<uint>(); |
474 | 444 | ||
@@ -1519,7 +1489,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1519 | kill.Header.Reliable = true; | 1489 | kill.Header.Reliable = true; |
1520 | kill.Header.Zerocoded = true; | 1490 | kill.Header.Zerocoded = true; |
1521 | 1491 | ||
1522 | lock (m_primFullUpdates.SyncRoot) | 1492 | lock (m_entityUpdates.SyncRoot) |
1523 | { | 1493 | { |
1524 | m_killRecord.Add(localID); | 1494 | m_killRecord.Add(localID); |
1525 | OutPacket(kill, ThrottleOutPacketType.State); | 1495 | OutPacket(kill, ThrottleOutPacketType.State); |
@@ -3419,67 +3389,22 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3419 | /// <summary> | 3389 | /// <summary> |
3420 | /// Send an ObjectUpdate packet with information about an avatar | 3390 | /// Send an ObjectUpdate packet with information about an avatar |
3421 | /// </summary> | 3391 | /// </summary> |
3422 | public void SendAvatarData(SendAvatarData data) | 3392 | public void SendAvatarDataImmediate(ISceneEntity avatar) |
3423 | { | 3393 | { |
3394 | ScenePresence presence = avatar as ScenePresence; | ||
3395 | if (presence == null) | ||
3396 | return; | ||
3397 | |||
3424 | ObjectUpdatePacket objupdate = (ObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdate); | 3398 | ObjectUpdatePacket objupdate = (ObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdate); |
3425 | objupdate.Header.Zerocoded = true; | 3399 | objupdate.Header.Zerocoded = true; |
3426 | 3400 | ||
3427 | objupdate.RegionData.RegionHandle = data.RegionHandle; | 3401 | objupdate.RegionData.RegionHandle = presence.RegionHandle; |
3428 | objupdate.RegionData.TimeDilation = ushort.MaxValue; | 3402 | objupdate.RegionData.TimeDilation = ushort.MaxValue; |
3429 | 3403 | ||
3430 | objupdate.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1]; | 3404 | objupdate.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1]; |
3431 | objupdate.ObjectData[0] = CreateAvatarUpdateBlock(data); | 3405 | objupdate.ObjectData[0] = CreateAvatarUpdateBlock(presence); |
3432 | OutPacket(objupdate, ThrottleOutPacketType.Task); | ||
3433 | } | ||
3434 | |||
3435 | /// <summary> | ||
3436 | /// Send a terse positional/rotation/velocity update about an avatar | ||
3437 | /// to the client. This avatar can be that of the client itself. | ||
3438 | /// </summary> | ||
3439 | public virtual void SendAvatarTerseUpdate(SendAvatarTerseData data) | ||
3440 | { | ||
3441 | if (data.Priority == double.NaN) | ||
3442 | { | ||
3443 | m_log.Error("[LLClientView] SendAvatarTerseUpdate received a NaN priority, dropping update"); | ||
3444 | return; | ||
3445 | } | ||
3446 | |||
3447 | Quaternion rotation = data.Rotation; | ||
3448 | if (rotation.W == 0.0f && rotation.X == 0.0f && rotation.Y == 0.0f && rotation.Z == 0.0f) | ||
3449 | rotation = Quaternion.Identity; | ||
3450 | 3406 | ||
3451 | ImprovedTerseObjectUpdatePacket.ObjectDataBlock terseBlock = CreateImprovedTerseBlock(data); | 3407 | OutPacket(objupdate, ThrottleOutPacketType.Task); |
3452 | |||
3453 | lock (m_avatarTerseUpdates.SyncRoot) | ||
3454 | m_avatarTerseUpdates.Enqueue(data.Priority, terseBlock, data.LocalID); | ||
3455 | |||
3456 | // If we received an update about our own avatar, process the avatar update priority queue immediately | ||
3457 | if (data.AgentID == m_agentId) | ||
3458 | ProcessAvatarTerseUpdates(); | ||
3459 | } | ||
3460 | |||
3461 | protected void ProcessAvatarTerseUpdates() | ||
3462 | { | ||
3463 | ImprovedTerseObjectUpdatePacket terse = (ImprovedTerseObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ImprovedTerseObjectUpdate); | ||
3464 | terse.Header.Reliable = false; | ||
3465 | terse.Header.Zerocoded = true; | ||
3466 | |||
3467 | //terse.RegionData = new ImprovedTerseObjectUpdatePacket.RegionDataBlock(); | ||
3468 | terse.RegionData.RegionHandle = Scene.RegionInfo.RegionHandle; | ||
3469 | terse.RegionData.TimeDilation = (ushort)(Scene.TimeDilation * ushort.MaxValue); | ||
3470 | |||
3471 | lock (m_avatarTerseUpdates.SyncRoot) | ||
3472 | { | ||
3473 | int count = Math.Min(m_avatarTerseUpdates.Count, m_udpServer.AvatarTerseUpdatesPerPacket); | ||
3474 | if (count == 0) | ||
3475 | return; | ||
3476 | |||
3477 | terse.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[count]; | ||
3478 | for (int i = 0; i < count; i++) | ||
3479 | terse.ObjectData[i] = m_avatarTerseUpdates.Dequeue(); | ||
3480 | } | ||
3481 | |||
3482 | OutPacket(terse, ThrottleOutPacketType.State); | ||
3483 | } | 3408 | } |
3484 | 3409 | ||
3485 | public void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations) | 3410 | public void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations) |
@@ -3526,172 +3451,187 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3526 | 3451 | ||
3527 | #region Primitive Packet/Data Sending Methods | 3452 | #region Primitive Packet/Data Sending Methods |
3528 | 3453 | ||
3529 | public void SendPrimitiveToClient(SendPrimitiveData data) | 3454 | /// <summary> |
3455 | /// Generate one of the object update packets based on PrimUpdateFlags | ||
3456 | /// and broadcast the packet to clients | ||
3457 | /// </summary> | ||
3458 | public void SendPrimUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags) | ||
3530 | { | 3459 | { |
3531 | // string text = data.text; | 3460 | double priority; |
3532 | // if (text.IndexOf("\n") >= 0) | ||
3533 | // text = text.Remove(text.IndexOf("\n")); | ||
3534 | // m_log.DebugFormat( | ||
3535 | // "[CLIENT]: Placing request to send full info about prim {0} text {1} to client {2}", | ||
3536 | // data.localID, text, Name); | ||
3537 | |||
3538 | if (data.priority == double.NaN) | ||
3539 | { | ||
3540 | m_log.Error("[LLClientView] SendPrimitiveToClient received a NaN priority, dropping update"); | ||
3541 | return; | ||
3542 | } | ||
3543 | |||
3544 | Quaternion rotation = data.rotation; | ||
3545 | if (rotation.W == 0.0f && rotation.X == 0.0f && rotation.Y == 0.0f && rotation.Z == 0.0f) | ||
3546 | rotation = Quaternion.Identity; | ||
3547 | |||
3548 | if (data.AttachPoint > 30 && data.ownerID != AgentId) // Someone else's HUD | ||
3549 | return; | ||
3550 | if (data.primShape.State != 0 && data.parentID == 0 && data.primShape.PCode == 9) | ||
3551 | return; | ||
3552 | 3461 | ||
3553 | ObjectUpdatePacket.ObjectDataBlock objectData = CreatePrimUpdateBlock(data); | 3462 | if (entity is SceneObjectPart) |
3463 | priority = ((SceneObjectPart)entity).ParentGroup.GetUpdatePriority(this); | ||
3464 | else if (entity is ScenePresence) | ||
3465 | priority = ((ScenePresence)entity).GetUpdatePriority(this); | ||
3466 | else | ||
3467 | priority = 0.0d; | ||
3554 | 3468 | ||
3555 | lock (m_primFullUpdates.SyncRoot) | 3469 | lock (m_entityUpdates.SyncRoot) |
3556 | m_primFullUpdates.Enqueue(data.priority, objectData, data.localID); | 3470 | m_entityUpdates.Enqueue(priority, new EntityUpdate(entity, updateFlags), entity.LocalId); |
3557 | } | 3471 | } |
3558 | 3472 | ||
3559 | void ProcessPrimFullUpdates() | 3473 | private void ProcessEntityUpdates(int maxUpdates) |
3560 | { | 3474 | { |
3561 | ObjectUpdatePacket outPacket = (ObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdate); | 3475 | Lazy<List<ObjectUpdatePacket.ObjectDataBlock>> objectUpdateBlocks = new Lazy<List<ObjectUpdatePacket.ObjectDataBlock>>(); |
3562 | outPacket.Header.Zerocoded = true; | 3476 | Lazy<List<ObjectUpdateCompressedPacket.ObjectDataBlock>> compressedUpdateBlocks = new Lazy<List<ObjectUpdateCompressedPacket.ObjectDataBlock>>(); |
3477 | Lazy<List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>> terseUpdateBlocks = new Lazy<List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>>(); | ||
3563 | 3478 | ||
3564 | outPacket.RegionData.RegionHandle = Scene.RegionInfo.RegionHandle; | 3479 | if (maxUpdates <= 0) maxUpdates = Int32.MaxValue; |
3565 | outPacket.RegionData.TimeDilation = (ushort)(Scene.TimeDilation * ushort.MaxValue); | 3480 | int updatesThisCall = 0; |
3566 | 3481 | ||
3567 | lock (m_primFullUpdates.SyncRoot) | 3482 | lock (m_entityUpdates.SyncRoot) |
3568 | { | 3483 | { |
3569 | int count = Math.Min(m_primFullUpdates.Count, m_udpServer.PrimFullUpdatesPerPacket); | 3484 | EntityUpdate update; |
3570 | if (count == 0) | 3485 | while (updatesThisCall < maxUpdates && m_entityUpdates.TryDequeue(out update)) |
3571 | return; | ||
3572 | |||
3573 | m_fullUpdateDataBlocksBuilder.Clear(); | ||
3574 | |||
3575 | for (int i = 0; i < count; i++) | ||
3576 | { | 3486 | { |
3577 | ObjectUpdatePacket.ObjectDataBlock block = m_primFullUpdates.Dequeue(); | 3487 | ++updatesThisCall; |
3488 | |||
3489 | #region UpdateFlags to packet type conversion | ||
3578 | 3490 | ||
3579 | if (!m_killRecord.Contains(block.ID)) | 3491 | PrimUpdateFlags updateFlags = update.Flags; |
3492 | |||
3493 | bool canUseCompressed = true; | ||
3494 | bool canUseImproved = true; | ||
3495 | |||
3496 | // Compressed object updates only make sense for LL primitives | ||
3497 | if (!(update.Entity is SceneObjectPart)) | ||
3498 | canUseCompressed = false; | ||
3499 | |||
3500 | if (updateFlags.HasFlag(PrimUpdateFlags.FullUpdate)) | ||
3580 | { | 3501 | { |
3581 | m_fullUpdateDataBlocksBuilder.Add(block); | 3502 | canUseCompressed = false; |
3582 | 3503 | canUseImproved = false; | |
3583 | // string text = Util.FieldToString(outPacket.ObjectData[i].Text); | 3504 | } |
3584 | // if (text.IndexOf("\n") >= 0) | 3505 | else |
3585 | // text = text.Remove(text.IndexOf("\n")); | 3506 | { |
3586 | // m_log.DebugFormat( | 3507 | if (updateFlags.HasFlag(PrimUpdateFlags.Velocity) || |
3587 | // "[CLIENT]: Sending full info about prim {0} text {1} to client {2}", | 3508 | updateFlags.HasFlag(PrimUpdateFlags.Acceleration) || |
3588 | // outPacket.ObjectData[i].ID, text, Name); | 3509 | updateFlags.HasFlag(PrimUpdateFlags.CollisionPlane) || |
3510 | updateFlags.HasFlag(PrimUpdateFlags.Joint)) | ||
3511 | { | ||
3512 | canUseCompressed = false; | ||
3513 | } | ||
3514 | |||
3515 | if (updateFlags.HasFlag(PrimUpdateFlags.PrimFlags) || | ||
3516 | updateFlags.HasFlag(PrimUpdateFlags.ParentID) || | ||
3517 | updateFlags.HasFlag(PrimUpdateFlags.Scale) || | ||
3518 | updateFlags.HasFlag(PrimUpdateFlags.PrimData) || | ||
3519 | updateFlags.HasFlag(PrimUpdateFlags.Text) || | ||
3520 | updateFlags.HasFlag(PrimUpdateFlags.NameValue) || | ||
3521 | updateFlags.HasFlag(PrimUpdateFlags.ExtraData) || | ||
3522 | updateFlags.HasFlag(PrimUpdateFlags.TextureAnim) || | ||
3523 | updateFlags.HasFlag(PrimUpdateFlags.Sound) || | ||
3524 | updateFlags.HasFlag(PrimUpdateFlags.Particles) || | ||
3525 | updateFlags.HasFlag(PrimUpdateFlags.Material) || | ||
3526 | updateFlags.HasFlag(PrimUpdateFlags.ClickAction) || | ||
3527 | updateFlags.HasFlag(PrimUpdateFlags.MediaURL) || | ||
3528 | updateFlags.HasFlag(PrimUpdateFlags.Joint)) | ||
3529 | { | ||
3530 | canUseImproved = false; | ||
3531 | } | ||
3532 | } | ||
3533 | |||
3534 | #endregion UpdateFlags to packet type conversion | ||
3535 | |||
3536 | #region Block Construction | ||
3537 | |||
3538 | // TODO: Remove this once we can build compressed updates | ||
3539 | canUseCompressed = false; | ||
3540 | |||
3541 | if (!canUseImproved && !canUseCompressed) | ||
3542 | { | ||
3543 | if (update.Entity is ScenePresence) | ||
3544 | objectUpdateBlocks.Value.Add(CreateAvatarUpdateBlock((ScenePresence)update.Entity)); | ||
3545 | else | ||
3546 | objectUpdateBlocks.Value.Add(CreatePrimUpdateBlock((SceneObjectPart)update.Entity, this.m_agentId)); | ||
3547 | } | ||
3548 | else if (!canUseImproved) | ||
3549 | { | ||
3550 | compressedUpdateBlocks.Value.Add(CreateCompressedUpdateBlock((SceneObjectPart)update.Entity, updateFlags)); | ||
3589 | } | 3551 | } |
3590 | // else | 3552 | else |
3591 | // { | 3553 | { |
3592 | // m_log.WarnFormat( | 3554 | terseUpdateBlocks.Value.Add(CreateImprovedTerseBlock(update.Entity, updateFlags.HasFlag(PrimUpdateFlags.Textures))); |
3593 | // "[CLIENT]: Preventing full update for {0} after kill to {1}", block.ID, Name); | 3555 | } |
3594 | // } | 3556 | |
3557 | #endregion Block Construction | ||
3595 | } | 3558 | } |
3559 | } | ||
3596 | 3560 | ||
3597 | outPacket.ObjectData = m_fullUpdateDataBlocksBuilder.ToArray(); | 3561 | #region Packet Sending |
3598 | |||
3599 | OutPacket(outPacket, ThrottleOutPacketType.State); | ||
3600 | } | ||
3601 | } | ||
3602 | 3562 | ||
3603 | public void SendPrimTerseUpdate(SendPrimitiveTerseData data) | 3563 | const float TIME_DILATION = 1.0f; |
3604 | { | 3564 | ushort timeDilation = Utils.FloatToUInt16(TIME_DILATION, 0.0f, 1.0f); |
3605 | if (data.Priority == double.NaN) | 3565 | |
3566 | if (objectUpdateBlocks.IsValueCreated) | ||
3606 | { | 3567 | { |
3607 | m_log.Error("[LLClientView] SendPrimTerseUpdate received a NaN priority, dropping update"); | 3568 | List<ObjectUpdatePacket.ObjectDataBlock> blocks = objectUpdateBlocks.Value; |
3608 | return; | ||
3609 | } | ||
3610 | 3569 | ||
3611 | Quaternion rotation = data.Rotation; | 3570 | ObjectUpdatePacket packet = (ObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdate); |
3612 | if (rotation.W == 0.0f && rotation.X == 0.0f && rotation.Y == 0.0f && rotation.Z == 0.0f) | 3571 | packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle; |
3613 | rotation = Quaternion.Identity; | 3572 | packet.RegionData.TimeDilation = timeDilation; |
3573 | packet.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[blocks.Count]; | ||
3614 | 3574 | ||
3615 | if (data.AttachPoint > 30 && data.OwnerID != AgentId) // Someone else's HUD | 3575 | for (int i = 0; i < blocks.Count; i++) |
3616 | return; | 3576 | packet.ObjectData[i] = blocks[i]; |
3617 | 3577 | ||
3618 | ImprovedTerseObjectUpdatePacket.ObjectDataBlock objectData = CreateImprovedTerseBlock(data); | 3578 | OutPacket(packet, ThrottleOutPacketType.Task, true); |
3579 | } | ||
3619 | 3580 | ||
3620 | lock (m_primTerseUpdates.SyncRoot) | 3581 | if (compressedUpdateBlocks.IsValueCreated) |
3621 | m_primTerseUpdates.Enqueue(data.Priority, objectData, data.LocalID); | 3582 | { |
3622 | } | 3583 | List<ObjectUpdateCompressedPacket.ObjectDataBlock> blocks = compressedUpdateBlocks.Value; |
3623 | 3584 | ||
3624 | void ProcessPrimTerseUpdates() | 3585 | ObjectUpdateCompressedPacket packet = (ObjectUpdateCompressedPacket)PacketPool.Instance.GetPacket(PacketType.ObjectUpdateCompressed); |
3625 | { | 3586 | packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle; |
3626 | ImprovedTerseObjectUpdatePacket outPacket = (ImprovedTerseObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ImprovedTerseObjectUpdate); | 3587 | packet.RegionData.TimeDilation = timeDilation; |
3627 | outPacket.Header.Reliable = false; | 3588 | packet.ObjectData = new ObjectUpdateCompressedPacket.ObjectDataBlock[blocks.Count]; |
3628 | outPacket.Header.Zerocoded = true; | ||
3629 | 3589 | ||
3630 | outPacket.RegionData.RegionHandle = Scene.RegionInfo.RegionHandle; | 3590 | for (int i = 0; i < blocks.Count; i++) |
3631 | outPacket.RegionData.TimeDilation = (ushort)(Scene.TimeDilation * ushort.MaxValue); | 3591 | packet.ObjectData[i] = blocks[i]; |
3632 | 3592 | ||
3633 | lock (m_primTerseUpdates.SyncRoot) | 3593 | OutPacket(packet, ThrottleOutPacketType.Task, true); |
3594 | } | ||
3595 | |||
3596 | if (terseUpdateBlocks.IsValueCreated) | ||
3634 | { | 3597 | { |
3635 | int count = Math.Min(m_primTerseUpdates.Count, m_udpServer.PrimTerseUpdatesPerPacket); | 3598 | List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock> blocks = terseUpdateBlocks.Value; |
3636 | if (count == 0) | ||
3637 | return; | ||
3638 | 3599 | ||
3639 | outPacket.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[count]; | 3600 | ImprovedTerseObjectUpdatePacket packet = new ImprovedTerseObjectUpdatePacket(); |
3640 | for (int i = 0; i < count; i++) | 3601 | packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle; |
3641 | outPacket.ObjectData[i] = m_primTerseUpdates.Dequeue(); | 3602 | packet.RegionData.TimeDilation = timeDilation; |
3603 | packet.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[blocks.Count]; | ||
3604 | |||
3605 | for (int i = 0; i < blocks.Count; i++) | ||
3606 | packet.ObjectData[i] = blocks[i]; | ||
3607 | |||
3608 | OutPacket(packet, ThrottleOutPacketType.Task, true); | ||
3642 | } | 3609 | } |
3643 | 3610 | ||
3644 | OutPacket(outPacket, ThrottleOutPacketType.State); | 3611 | #endregion Packet Sending |
3645 | } | 3612 | } |
3646 | 3613 | ||
3647 | public void ReprioritizeUpdates(StateUpdateTypes type, UpdatePriorityHandler handler) | 3614 | public void ReprioritizeUpdates(UpdatePriorityHandler handler) |
3648 | { | 3615 | { |
3649 | PriorityQueue<double, ImprovedTerseObjectUpdatePacket.ObjectDataBlock>.UpdatePriorityHandler terse_update_priority_handler = | 3616 | //m_log.Debug("[CLIENT]: Reprioritizing prim updates for " + m_firstName + " " + m_lastName); |
3650 | delegate(ref double priority, uint local_id) | 3617 | |
3651 | { | 3618 | PriorityQueue<double, EntityUpdate>.UpdatePriorityHandler update_priority_handler = |
3652 | priority = handler(new UpdatePriorityData(priority, local_id)); | ||
3653 | return priority != double.NaN; | ||
3654 | }; | ||
3655 | PriorityQueue<double, ObjectUpdatePacket.ObjectDataBlock>.UpdatePriorityHandler update_priority_handler = | ||
3656 | delegate(ref double priority, uint local_id) | 3619 | delegate(ref double priority, uint local_id) |
3657 | { | 3620 | { |
3658 | priority = handler(new UpdatePriorityData(priority, local_id)); | 3621 | priority = handler(new UpdatePriorityData(priority, local_id)); |
3659 | return priority != double.NaN; | 3622 | return priority != double.NaN; |
3660 | }; | 3623 | }; |
3661 | 3624 | ||
3662 | if ((type & StateUpdateTypes.AvatarTerse) != 0) | 3625 | lock (m_entityUpdates.SyncRoot) |
3663 | { | 3626 | m_entityUpdates.Reprioritize(update_priority_handler); |
3664 | lock (m_avatarTerseUpdates.SyncRoot) | ||
3665 | m_avatarTerseUpdates.Reprioritize(terse_update_priority_handler); | ||
3666 | } | ||
3667 | |||
3668 | if ((type & StateUpdateTypes.PrimitiveFull) != 0) | ||
3669 | { | ||
3670 | lock (m_primFullUpdates.SyncRoot) | ||
3671 | m_primFullUpdates.Reprioritize(update_priority_handler); | ||
3672 | } | ||
3673 | |||
3674 | if ((type & StateUpdateTypes.PrimitiveTerse) != 0) | ||
3675 | { | ||
3676 | lock (m_primTerseUpdates.SyncRoot) | ||
3677 | m_primTerseUpdates.Reprioritize(terse_update_priority_handler); | ||
3678 | } | ||
3679 | } | 3627 | } |
3680 | 3628 | ||
3681 | public void FlushPrimUpdates() | 3629 | public void FlushPrimUpdates() |
3682 | { | 3630 | { |
3683 | while (m_primFullUpdates.Count > 0) | 3631 | m_log.Debug("[CLIENT]: Flushing prim updates to " + m_firstName + " " + m_lastName); |
3684 | { | 3632 | |
3685 | ProcessPrimFullUpdates(); | 3633 | while (m_entityUpdates.Count > 0) |
3686 | } | 3634 | ProcessEntityUpdates(-1); |
3687 | while (m_primTerseUpdates.Count > 0) | ||
3688 | { | ||
3689 | ProcessPrimTerseUpdates(); | ||
3690 | } | ||
3691 | while (m_avatarTerseUpdates.Count > 0) | ||
3692 | { | ||
3693 | ProcessAvatarTerseUpdates(); | ||
3694 | } | ||
3695 | } | 3635 | } |
3696 | 3636 | ||
3697 | #endregion Primitive Packet/Data Sending Methods | 3637 | #endregion Primitive Packet/Data Sending Methods |
@@ -3724,26 +3664,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3724 | { | 3664 | { |
3725 | if ((categories & ThrottleOutPacketTypeFlags.Task) != 0) | 3665 | if ((categories & ThrottleOutPacketTypeFlags.Task) != 0) |
3726 | { | 3666 | { |
3727 | lock (m_avatarTerseUpdates.SyncRoot) | 3667 | if (m_entityUpdates.Count > 0) |
3728 | { | 3668 | ProcessEntityUpdates(m_udpServer.PrimUpdatesPerCallback); |
3729 | if (m_avatarTerseUpdates.Count > 0) | ||
3730 | ProcessAvatarTerseUpdates(); | ||
3731 | } | ||
3732 | } | ||
3733 | |||
3734 | if ((categories & ThrottleOutPacketTypeFlags.State) != 0) | ||
3735 | { | ||
3736 | lock (m_primFullUpdates.SyncRoot) | ||
3737 | { | ||
3738 | if (m_primFullUpdates.Count > 0) | ||
3739 | ProcessPrimFullUpdates(); | ||
3740 | } | ||
3741 | |||
3742 | lock (m_primTerseUpdates.SyncRoot) | ||
3743 | { | ||
3744 | if (m_primTerseUpdates.Count > 0) | ||
3745 | ProcessPrimTerseUpdates(); | ||
3746 | } | ||
3747 | } | 3669 | } |
3748 | 3670 | ||
3749 | if ((categories & ThrottleOutPacketTypeFlags.Texture) != 0) | 3671 | if ((categories & ThrottleOutPacketTypeFlags.Texture) != 0) |
@@ -4404,22 +4326,55 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4404 | 4326 | ||
4405 | #region Helper Methods | 4327 | #region Helper Methods |
4406 | 4328 | ||
4407 | protected ImprovedTerseObjectUpdatePacket.ObjectDataBlock CreateImprovedTerseBlock(SendAvatarTerseData data) | 4329 | protected ImprovedTerseObjectUpdatePacket.ObjectDataBlock CreateImprovedTerseBlock(ISceneEntity entity, bool sendTexture) |
4408 | { | 4330 | { |
4409 | return CreateImprovedTerseBlock(true, data.LocalID, 0, data.CollisionPlane, data.Position, data.Velocity, | 4331 | #region ScenePresence/SOP Handling |
4410 | data.Acceleration, data.Rotation, Vector3.Zero, data.TextureEntry); | ||
4411 | } | ||
4412 | 4332 | ||
4413 | protected ImprovedTerseObjectUpdatePacket.ObjectDataBlock CreateImprovedTerseBlock(SendPrimitiveTerseData data) | 4333 | bool avatar = (entity is ScenePresence); |
4414 | { | 4334 | uint localID = entity.LocalId; |
4415 | return CreateImprovedTerseBlock(false, data.LocalID, data.AttachPoint, Vector4.Zero, data.Position, data.Velocity, | 4335 | uint attachPoint; |
4416 | data.Acceleration, data.Rotation, data.AngularVelocity, data.TextureEntry); | 4336 | Vector4 collisionPlane; |
4417 | } | 4337 | Vector3 position, velocity, acceleration, angularVelocity; |
4338 | Quaternion rotation; | ||
4339 | byte[] textureEntry; | ||
4340 | |||
4341 | if (entity is ScenePresence) | ||
4342 | { | ||
4343 | ScenePresence presence = (ScenePresence)entity; | ||
4344 | |||
4345 | attachPoint = 0; | ||
4346 | collisionPlane = presence.CollisionPlane; | ||
4347 | position = presence.OffsetPosition; | ||
4348 | velocity = presence.Velocity; | ||
4349 | acceleration = Vector3.Zero; | ||
4350 | angularVelocity = Vector3.Zero; | ||
4351 | rotation = presence.Rotation; | ||
4352 | |||
4353 | if (sendTexture) | ||
4354 | textureEntry = presence.Appearance.Texture.GetBytes(); | ||
4355 | else | ||
4356 | textureEntry = null; | ||
4357 | } | ||
4358 | else | ||
4359 | { | ||
4360 | SceneObjectPart part = (SceneObjectPart)entity; | ||
4361 | |||
4362 | attachPoint = part.AttachmentPoint; | ||
4363 | collisionPlane = Vector4.Zero; | ||
4364 | position = part.RelativePosition; | ||
4365 | velocity = part.Velocity; | ||
4366 | acceleration = part.Acceleration; | ||
4367 | angularVelocity = part.AngularVelocity; | ||
4368 | rotation = part.RotationOffset; | ||
4369 | |||
4370 | if (sendTexture) | ||
4371 | textureEntry = part.Shape.TextureEntry; | ||
4372 | else | ||
4373 | textureEntry = null; | ||
4374 | } | ||
4375 | |||
4376 | #endregion ScenePresence/SOP Handling | ||
4418 | 4377 | ||
4419 | protected ImprovedTerseObjectUpdatePacket.ObjectDataBlock CreateImprovedTerseBlock(bool avatar, uint localID, int attachPoint, | ||
4420 | Vector4 collisionPlane, Vector3 position, Vector3 velocity, Vector3 acceleration, Quaternion rotation, | ||
4421 | Vector3 angularVelocity, byte[] textureEntry) | ||
4422 | { | ||
4423 | int pos = 0; | 4378 | int pos = 0; |
4424 | byte[] data = new byte[(avatar ? 60 : 44)]; | 4379 | byte[] data = new byte[(avatar ? 60 : 44)]; |
4425 | 4380 | ||
@@ -4491,12 +4446,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4491 | return block; | 4446 | return block; |
4492 | } | 4447 | } |
4493 | 4448 | ||
4494 | protected ObjectUpdatePacket.ObjectDataBlock CreateAvatarUpdateBlock(SendAvatarData data) | 4449 | protected ObjectUpdatePacket.ObjectDataBlock CreateAvatarUpdateBlock(ScenePresence data) |
4495 | { | 4450 | { |
4496 | byte[] objectData = new byte[76]; | 4451 | byte[] objectData = new byte[76]; |
4497 | 4452 | ||
4498 | Vector4.UnitW.ToBytes(objectData, 0); // TODO: Collision plane support | 4453 | data.CollisionPlane.ToBytes(objectData, 0); |
4499 | data.Position.ToBytes(objectData, 16); | 4454 | data.OffsetPosition.ToBytes(objectData, 16); |
4500 | //data.Velocity.ToBytes(objectData, 28); | 4455 | //data.Velocity.ToBytes(objectData, 28); |
4501 | //data.Acceleration.ToBytes(objectData, 40); | 4456 | //data.Acceleration.ToBytes(objectData, 40); |
4502 | data.Rotation.ToBytes(objectData, 52); | 4457 | data.Rotation.ToBytes(objectData, 52); |
@@ -4506,12 +4461,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4506 | 4461 | ||
4507 | update.Data = Utils.EmptyBytes; | 4462 | update.Data = Utils.EmptyBytes; |
4508 | update.ExtraParams = new byte[1]; | 4463 | update.ExtraParams = new byte[1]; |
4509 | update.FullID = data.AvatarID; | 4464 | update.FullID = data.UUID; |
4510 | update.ID = data.AvatarLocalID; | 4465 | update.ID = data.LocalId; |
4511 | update.Material = (byte)Material.Flesh; | 4466 | update.Material = (byte)Material.Flesh; |
4512 | update.MediaURL = Utils.EmptyBytes; | 4467 | update.MediaURL = Utils.EmptyBytes; |
4513 | update.NameValue = Utils.StringToBytes("FirstName STRING RW SV " + data.FirstName + "\nLastName STRING RW SV " + | 4468 | update.NameValue = Utils.StringToBytes("FirstName STRING RW SV " + data.Firstname + "\nLastName STRING RW SV " + |
4514 | data.LastName + "\nTitle STRING RW SV " + data.GroupTitle); | 4469 | data.Lastname + "\nTitle STRING RW SV " + data.Grouptitle); |
4515 | update.ObjectData = objectData; | 4470 | update.ObjectData = objectData; |
4516 | update.ParentID = data.ParentID; | 4471 | update.ParentID = data.ParentID; |
4517 | update.PathCurve = 16; | 4472 | update.PathCurve = 16; |
@@ -4520,102 +4475,116 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4520 | update.PCode = (byte)PCode.Avatar; | 4475 | update.PCode = (byte)PCode.Avatar; |
4521 | update.ProfileCurve = 1; | 4476 | update.ProfileCurve = 1; |
4522 | update.PSBlock = Utils.EmptyBytes; | 4477 | update.PSBlock = Utils.EmptyBytes; |
4523 | update.Scale = new Vector3(0.45f,0.6f,1.9f); | 4478 | update.Scale = new Vector3(0.45f, 0.6f, 1.9f); |
4524 | update.Text = Utils.EmptyBytes; | 4479 | update.Text = Utils.EmptyBytes; |
4525 | update.TextColor = new byte[4]; | 4480 | update.TextColor = new byte[4]; |
4526 | update.TextureAnim = Utils.EmptyBytes; | 4481 | update.TextureAnim = Utils.EmptyBytes; |
4527 | update.TextureEntry = data.TextureEntry ?? Utils.EmptyBytes; | 4482 | update.TextureEntry = (data.Appearance.Texture != null) ? data.Appearance.Texture.GetBytes() : Utils.EmptyBytes; |
4528 | update.UpdateFlags = (uint)(PrimFlags.Physics | PrimFlags.ObjectModify | PrimFlags.ObjectCopy | PrimFlags.ObjectAnyOwner | PrimFlags.ObjectYouOwner | PrimFlags.ObjectMove | PrimFlags.InventoryEmpty | PrimFlags.ObjectTransfer | PrimFlags.ObjectOwnerModify);//61 + (9 << 8) + (130 << 16) + (16 << 24); // TODO: Replace these numbers with PrimFlags | 4483 | update.UpdateFlags = (uint)( |
4484 | PrimFlags.Physics | PrimFlags.ObjectModify | PrimFlags.ObjectCopy | PrimFlags.ObjectAnyOwner | | ||
4485 | PrimFlags.ObjectYouOwner | PrimFlags.ObjectMove | PrimFlags.InventoryEmpty | PrimFlags.ObjectTransfer | | ||
4486 | PrimFlags.ObjectOwnerModify); | ||
4529 | 4487 | ||
4530 | return update; | 4488 | return update; |
4531 | } | 4489 | } |
4532 | 4490 | ||
4533 | protected ObjectUpdatePacket.ObjectDataBlock CreatePrimUpdateBlock(SendPrimitiveData data) | 4491 | protected ObjectUpdatePacket.ObjectDataBlock CreatePrimUpdateBlock(SceneObjectPart data, UUID recipientID) |
4534 | { | 4492 | { |
4535 | byte[] objectData = new byte[60]; | 4493 | byte[] objectData = new byte[60]; |
4536 | data.pos.ToBytes(objectData, 0); | 4494 | data.RelativePosition.ToBytes(objectData, 0); |
4537 | data.vel.ToBytes(objectData, 12); | 4495 | data.Velocity.ToBytes(objectData, 12); |
4538 | data.acc.ToBytes(objectData, 24); | 4496 | data.Acceleration.ToBytes(objectData, 24); |
4539 | data.rotation.ToBytes(objectData, 36); | 4497 | data.RotationOffset.ToBytes(objectData, 36); |
4540 | data.rvel.ToBytes(objectData, 48); | 4498 | data.AngularVelocity.ToBytes(objectData, 48); |
4541 | 4499 | ||
4542 | ObjectUpdatePacket.ObjectDataBlock update = new ObjectUpdatePacket.ObjectDataBlock(); | 4500 | ObjectUpdatePacket.ObjectDataBlock update = new ObjectUpdatePacket.ObjectDataBlock(); |
4543 | update.ClickAction = (byte)data.clickAction; | 4501 | update.ClickAction = (byte)data.ClickAction; |
4544 | update.CRC = 0; | 4502 | update.CRC = 0; |
4545 | update.ExtraParams = data.primShape.ExtraParams ?? Utils.EmptyBytes; | 4503 | update.ExtraParams = data.Shape.ExtraParams ?? Utils.EmptyBytes; |
4546 | update.FullID = data.objectID; | 4504 | update.FullID = data.UUID; |
4547 | update.ID = data.localID; | 4505 | update.ID = data.LocalId; |
4548 | //update.JointAxisOrAnchor = Vector3.Zero; // These are deprecated | 4506 | //update.JointAxisOrAnchor = Vector3.Zero; // These are deprecated |
4549 | //update.JointPivot = Vector3.Zero; | 4507 | //update.JointPivot = Vector3.Zero; |
4550 | //update.JointType = 0; | 4508 | //update.JointType = 0; |
4551 | update.Material = data.material; | 4509 | update.Material = data.Material; |
4552 | update.MediaURL = Utils.EmptyBytes; // FIXME: Support this in OpenSim | 4510 | update.MediaURL = Utils.EmptyBytes; // FIXME: Support this in OpenSim |
4553 | if (data.attachment) | 4511 | if (data.IsAttachment) |
4554 | { | 4512 | { |
4555 | update.NameValue = Util.StringToBytes256("AttachItemID STRING RW SV " + data.AssetId); | 4513 | update.NameValue = Util.StringToBytes256("AttachItemID STRING RW SV " + data.FromItemID); |
4556 | update.State = (byte)((data.AttachPoint % 16) * 16 + (data.AttachPoint / 16)); | 4514 | update.State = (byte)((data.AttachmentPoint % 16) * 16 + (data.AttachmentPoint / 16)); |
4557 | } | 4515 | } |
4558 | else | 4516 | else |
4559 | { | 4517 | { |
4560 | update.NameValue = Utils.EmptyBytes; | 4518 | update.NameValue = Utils.EmptyBytes; |
4561 | update.State = data.primShape.State; | 4519 | update.State = data.Shape.State; |
4562 | } | 4520 | } |
4521 | |||
4563 | update.ObjectData = objectData; | 4522 | update.ObjectData = objectData; |
4564 | update.ParentID = data.parentID; | 4523 | update.ParentID = data.ParentID; |
4565 | update.PathBegin = data.primShape.PathBegin; | 4524 | update.PathBegin = data.Shape.PathBegin; |
4566 | update.PathCurve = data.primShape.PathCurve; | 4525 | update.PathCurve = data.Shape.PathCurve; |
4567 | update.PathEnd = data.primShape.PathEnd; | 4526 | update.PathEnd = data.Shape.PathEnd; |
4568 | update.PathRadiusOffset = data.primShape.PathRadiusOffset; | 4527 | update.PathRadiusOffset = data.Shape.PathRadiusOffset; |
4569 | update.PathRevolutions = data.primShape.PathRevolutions; | 4528 | update.PathRevolutions = data.Shape.PathRevolutions; |
4570 | update.PathScaleX = data.primShape.PathScaleX; | 4529 | update.PathScaleX = data.Shape.PathScaleX; |
4571 | update.PathScaleY = data.primShape.PathScaleY; | 4530 | update.PathScaleY = data.Shape.PathScaleY; |
4572 | update.PathShearX = data.primShape.PathShearX; | 4531 | update.PathShearX = data.Shape.PathShearX; |
4573 | update.PathShearY = data.primShape.PathShearY; | 4532 | update.PathShearY = data.Shape.PathShearY; |
4574 | update.PathSkew = data.primShape.PathSkew; | 4533 | update.PathSkew = data.Shape.PathSkew; |
4575 | update.PathTaperX = data.primShape.PathTaperX; | 4534 | update.PathTaperX = data.Shape.PathTaperX; |
4576 | update.PathTaperY = data.primShape.PathTaperY; | 4535 | update.PathTaperY = data.Shape.PathTaperY; |
4577 | update.PathTwist = data.primShape.PathTwist; | 4536 | update.PathTwist = data.Shape.PathTwist; |
4578 | update.PathTwistBegin = data.primShape.PathTwistBegin; | 4537 | update.PathTwistBegin = data.Shape.PathTwistBegin; |
4579 | update.PCode = data.primShape.PCode; | 4538 | update.PCode = data.Shape.PCode; |
4580 | update.ProfileBegin = data.primShape.ProfileBegin; | 4539 | update.ProfileBegin = data.Shape.ProfileBegin; |
4581 | update.ProfileCurve = data.primShape.ProfileCurve; | 4540 | update.ProfileCurve = data.Shape.ProfileCurve; |
4582 | update.ProfileEnd = data.primShape.ProfileEnd; | 4541 | update.ProfileEnd = data.Shape.ProfileEnd; |
4583 | update.ProfileHollow = data.primShape.ProfileHollow; | 4542 | update.ProfileHollow = data.Shape.ProfileHollow; |
4584 | update.PSBlock = data.particleSystem ?? Utils.EmptyBytes; | 4543 | update.PSBlock = data.ParticleSystem ?? Utils.EmptyBytes; |
4585 | update.TextColor = data.color ?? Color4.Black.GetBytes(true); | 4544 | update.TextColor = data.GetTextColor().GetBytes(false); |
4586 | update.TextureAnim = data.textureanim ?? Utils.EmptyBytes; | 4545 | update.TextureAnim = data.TextureAnimation ?? Utils.EmptyBytes; |
4587 | update.TextureEntry = data.primShape.TextureEntry ?? Utils.EmptyBytes; | 4546 | update.TextureEntry = data.Shape.TextureEntry ?? Utils.EmptyBytes; |
4588 | update.Scale = data.primShape.Scale; | 4547 | update.Scale = data.Shape.Scale; |
4589 | update.Text = Util.StringToBytes256(data.text); | 4548 | update.Text = Util.StringToBytes256(data.Text); |
4590 | update.UpdateFlags = (uint)data.flags; | 4549 | |
4591 | 4550 | #region PrimFlags | |
4592 | if (data.SoundId != UUID.Zero) | 4551 | |
4593 | { | 4552 | PrimFlags flags = (PrimFlags)m_scene.Permissions.GenerateClientFlags(recipientID, data.UUID); |
4594 | update.Sound = data.SoundId; | 4553 | |
4595 | update.OwnerID = data.ownerID; | 4554 | // Don't send the CreateSelected flag to everyone |
4596 | update.Gain = (float)data.SoundVolume; | 4555 | flags &= ~PrimFlags.CreateSelected; |
4556 | |||
4557 | if (recipientID == data.OwnerID) | ||
4558 | { | ||
4559 | if ((data.Flags & PrimFlags.CreateSelected) != 0) | ||
4560 | { | ||
4561 | // Only send this flag once, then unset it | ||
4562 | flags |= PrimFlags.CreateSelected; | ||
4563 | data.Flags &= ~PrimFlags.CreateSelected; | ||
4564 | } | ||
4565 | } | ||
4566 | |||
4567 | update.UpdateFlags = (uint)flags; | ||
4568 | |||
4569 | #endregion PrimFlags | ||
4570 | |||
4571 | if (data.Sound != UUID.Zero) | ||
4572 | { | ||
4573 | update.Sound = data.Sound; | ||
4574 | update.OwnerID = data.OwnerID; | ||
4575 | update.Gain = (float)data.SoundGain; | ||
4597 | update.Radius = (float)data.SoundRadius; | 4576 | update.Radius = (float)data.SoundRadius; |
4598 | update.Flags = data.SoundFlags; | 4577 | update.Flags = data.SoundFlags; |
4599 | } | 4578 | } |
4600 | 4579 | ||
4601 | switch ((PCode)data.primShape.PCode) | 4580 | switch ((PCode)data.Shape.PCode) |
4602 | { | 4581 | { |
4603 | case PCode.Grass: | 4582 | case PCode.Grass: |
4604 | case PCode.Tree: | 4583 | case PCode.Tree: |
4605 | case PCode.NewTree: | 4584 | case PCode.NewTree: |
4606 | update.Data = new byte[] { data.primShape.State }; | 4585 | update.Data = new byte[] { data.Shape.State }; |
4607 | break; | 4586 | break; |
4608 | default: | 4587 | default: |
4609 | // TODO: Support ScratchPad | ||
4610 | //if (prim.ScratchPad != null) | ||
4611 | //{ | ||
4612 | // update.Data = new byte[prim.ScratchPad.Length]; | ||
4613 | // Buffer.BlockCopy(prim.ScratchPad, 0, update.Data, 0, update.Data.Length); | ||
4614 | //} | ||
4615 | //else | ||
4616 | //{ | ||
4617 | // update.Data = Utils.EmptyBytes; | ||
4618 | //} | ||
4619 | update.Data = Utils.EmptyBytes; | 4588 | update.Data = Utils.EmptyBytes; |
4620 | break; | 4589 | break; |
4621 | } | 4590 | } |
@@ -4623,6 +4592,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4623 | return update; | 4592 | return update; |
4624 | } | 4593 | } |
4625 | 4594 | ||
4595 | protected ObjectUpdateCompressedPacket.ObjectDataBlock CreateCompressedUpdateBlock(SceneObjectPart part, PrimUpdateFlags updateFlags) | ||
4596 | { | ||
4597 | // TODO: Implement this | ||
4598 | return null; | ||
4599 | } | ||
4600 | |||
4626 | public void SendNameReply(UUID profileId, string firstname, string lastname) | 4601 | public void SendNameReply(UUID profileId, string firstname, string lastname) |
4627 | { | 4602 | { |
4628 | UUIDNameReplyPacket packet = (UUIDNameReplyPacket)PacketPool.Instance.GetPacket(PacketType.UUIDNameReply); | 4603 | UUIDNameReplyPacket packet = (UUIDNameReplyPacket)PacketPool.Instance.GetPacket(PacketType.UUIDNameReply); |
@@ -11672,7 +11647,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11672 | throw new InvalidOperationException(string.Format("The {0} is empty", this.GetType().ToString())); | 11647 | throw new InvalidOperationException(string.Format("The {0} is empty", this.GetType().ToString())); |
11673 | } | 11648 | } |
11674 | 11649 | ||
11675 | internal TValue Dequeue() | 11650 | internal bool TryDequeue(out TValue value) |
11676 | { | 11651 | { |
11677 | for (int i = 0; i < m_heaps.Length; ++i) | 11652 | for (int i = 0; i < m_heaps.Length; ++i) |
11678 | { | 11653 | { |
@@ -11680,10 +11655,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11680 | { | 11655 | { |
11681 | MinHeapItem item = m_heaps[i].RemoveMin(); | 11656 | MinHeapItem item = m_heaps[i].RemoveMin(); |
11682 | m_lookupTable.Remove(item.LocalID); | 11657 | m_lookupTable.Remove(item.LocalID); |
11683 | return item.Value; | 11658 | value = item.Value; |
11659 | return true; | ||
11684 | } | 11660 | } |
11685 | } | 11661 | } |
11686 | throw new InvalidOperationException(string.Format("The {0} is empty", this.GetType().ToString())); | 11662 | |
11663 | value = default(TValue); | ||
11664 | return false; | ||
11687 | } | 11665 | } |
11688 | 11666 | ||
11689 | internal void Reprioritize(UpdatePriorityHandler handler) | 11667 | internal void Reprioritize(UpdatePriorityHandler handler) |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index d708055..cda461c 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs | |||
@@ -99,15 +99,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
99 | 99 | ||
100 | /// <summary>The measured resolution of Environment.TickCount</summary> | 100 | /// <summary>The measured resolution of Environment.TickCount</summary> |
101 | public readonly float TickCountResolution; | 101 | public readonly float TickCountResolution; |
102 | /// <summary>Number of terse prim updates to put on the queue each time the | 102 | /// <summary>Number of prim updates to put on the queue each time the |
103 | /// OnQueueEmpty event is triggered for updates</summary> | 103 | /// OnQueueEmpty event is triggered for updates</summary> |
104 | public readonly int PrimTerseUpdatesPerPacket; | 104 | public readonly int PrimUpdatesPerCallback; |
105 | /// <summary>Number of terse avatar updates to put on the queue each time the | ||
106 | /// OnQueueEmpty event is triggered for updates</summary> | ||
107 | public readonly int AvatarTerseUpdatesPerPacket; | ||
108 | /// <summary>Number of full prim updates to put on the queue each time the | ||
109 | /// OnQueueEmpty event is triggered for updates</summary> | ||
110 | public readonly int PrimFullUpdatesPerPacket; | ||
111 | /// <summary>Number of texture packets to put on the queue each time the | 105 | /// <summary>Number of texture packets to put on the queue each time the |
112 | /// OnQueueEmpty event is triggered for textures</summary> | 106 | /// OnQueueEmpty event is triggered for textures</summary> |
113 | public readonly int TextureSendLimit; | 107 | public readonly int TextureSendLimit; |
@@ -191,9 +185,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
191 | m_recvBufferSize = config.GetInt("client_socket_rcvbuf_size", 0); | 185 | m_recvBufferSize = config.GetInt("client_socket_rcvbuf_size", 0); |
192 | sceneThrottleBps = config.GetInt("scene_throttle_max_bps", 0); | 186 | sceneThrottleBps = config.GetInt("scene_throttle_max_bps", 0); |
193 | 187 | ||
194 | PrimTerseUpdatesPerPacket = config.GetInt("PrimTerseUpdatesPerPacket", 25); | 188 | PrimUpdatesPerCallback = config.GetInt("PrimUpdatesPerCallback", 100); |
195 | AvatarTerseUpdatesPerPacket = config.GetInt("AvatarTerseUpdatesPerPacket", 10); | ||
196 | PrimFullUpdatesPerPacket = config.GetInt("PrimFullUpdatesPerPacket", 100); | ||
197 | TextureSendLimit = config.GetInt("TextureSendLimit", 20); | 189 | TextureSendLimit = config.GetInt("TextureSendLimit", 20); |
198 | 190 | ||
199 | m_defaultRTO = config.GetInt("DefaultRTO", 0); | 191 | m_defaultRTO = config.GetInt("DefaultRTO", 0); |
@@ -201,9 +193,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
201 | } | 193 | } |
202 | else | 194 | else |
203 | { | 195 | { |
204 | PrimTerseUpdatesPerPacket = 25; | 196 | PrimUpdatesPerCallback = 100; |
205 | AvatarTerseUpdatesPerPacket = 10; | ||
206 | PrimFullUpdatesPerPacket = 100; | ||
207 | TextureSendLimit = 20; | 197 | TextureSendLimit = 20; |
208 | } | 198 | } |
209 | 199 | ||
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs index 6c01927..83c8eac 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/GridUser/ActivityDetector.cs | |||
@@ -56,7 +56,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser | |||
56 | // But we could trigger the position update more often | 56 | // But we could trigger the position update more often |
57 | scene.EventManager.OnMakeRootAgent += OnMakeRootAgent; | 57 | scene.EventManager.OnMakeRootAgent += OnMakeRootAgent; |
58 | scene.EventManager.OnNewClient += OnNewClient; | 58 | scene.EventManager.OnNewClient += OnNewClient; |
59 | scene.EventManager.OnAvatarEnteringNewParcel += OnEnteringNewParcel; | ||
60 | 59 | ||
61 | if (m_aScene == null) | 60 | if (m_aScene == null) |
62 | m_aScene = scene; | 61 | m_aScene = scene; |
@@ -105,12 +104,5 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser | |||
105 | 104 | ||
106 | } | 105 | } |
107 | 106 | ||
108 | void OnEnteringNewParcel(ScenePresence sp, int localLandID, UUID regionID) | ||
109 | { | ||
110 | // TODO: grab the parcel ID from ILandModule | ||
111 | // and send that along | ||
112 | m_GridUserService.SetLastPosition(sp.UUID.ToString(), sp.Scene.RegionInfo.RegionID, sp.AbsolutePosition, sp.Lookat); | ||
113 | } | ||
114 | |||
115 | } | 107 | } |
116 | } | 108 | } |
diff --git a/OpenSim/Region/CoreModules/World/Land/LandChannel.cs b/OpenSim/Region/CoreModules/World/Land/LandChannel.cs index 1fbc733..1ad4db2 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandChannel.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandChannel.cs | |||
@@ -154,6 +154,22 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
154 | m_landManagementModule.UpdateLandObject(localID, data); | 154 | m_landManagementModule.UpdateLandObject(localID, data); |
155 | } | 155 | } |
156 | } | 156 | } |
157 | |||
158 | public void Join(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id) | ||
159 | { | ||
160 | if (m_landManagementModule != null) | ||
161 | { | ||
162 | m_landManagementModule.Join(start_x, start_y, end_x, end_y, attempting_user_id); | ||
163 | } | ||
164 | } | ||
165 | |||
166 | public void Subdivide(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id) | ||
167 | { | ||
168 | if (m_landManagementModule != null) | ||
169 | { | ||
170 | m_landManagementModule.Subdivide(start_x, start_y, end_x, end_y, attempting_user_id); | ||
171 | } | ||
172 | } | ||
157 | 173 | ||
158 | public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient) | 174 | public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient) |
159 | { | 175 | { |
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index d05235e..9d6c9a9 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -956,6 +956,16 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
956 | masterLandObject.SendLandUpdateToAvatarsOverMe(); | 956 | masterLandObject.SendLandUpdateToAvatarsOverMe(); |
957 | } | 957 | } |
958 | 958 | ||
959 | public void Join(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id) | ||
960 | { | ||
961 | join(start_x, start_y, end_x, end_y, attempting_user_id); | ||
962 | } | ||
963 | |||
964 | public void Subdivide(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id) | ||
965 | { | ||
966 | subdivide(start_x, start_y, end_x, end_y, attempting_user_id); | ||
967 | } | ||
968 | |||
959 | #endregion | 969 | #endregion |
960 | 970 | ||
961 | #region Parcel Updating | 971 | #region Parcel Updating |
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs index c454d1f..b6b25ea 100644 --- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs | |||
@@ -528,14 +528,6 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
528 | { | 528 | { |
529 | } | 529 | } |
530 | 530 | ||
531 | public virtual void SendAvatarData(SendAvatarData data) | ||
532 | { | ||
533 | } | ||
534 | |||
535 | public virtual void SendAvatarTerseUpdate(SendAvatarTerseData data) | ||
536 | { | ||
537 | } | ||
538 | |||
539 | public virtual void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations) | 531 | public virtual void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations) |
540 | { | 532 | { |
541 | } | 533 | } |
@@ -548,15 +540,15 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
548 | { | 540 | { |
549 | } | 541 | } |
550 | 542 | ||
551 | public virtual void SendPrimitiveToClient(SendPrimitiveData data) | 543 | public void SendAvatarDataImmediate(ISceneEntity avatar) |
552 | { | 544 | { |
553 | } | 545 | } |
554 | 546 | ||
555 | public virtual void SendPrimTerseUpdate(SendPrimitiveTerseData data) | 547 | public void SendPrimUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags) |
556 | { | 548 | { |
557 | } | 549 | } |
558 | 550 | ||
559 | public virtual void ReprioritizeUpdates(StateUpdateTypes type, UpdatePriorityHandler handler) | 551 | public void ReprioritizeUpdates(UpdatePriorityHandler handler) |
560 | { | 552 | { |
561 | } | 553 | } |
562 | 554 | ||
diff --git a/OpenSim/Region/Framework/Interfaces/ILandChannel.cs b/OpenSim/Region/Framework/Interfaces/ILandChannel.cs index f71e31d..20b8ab6 100644 --- a/OpenSim/Region/Framework/Interfaces/ILandChannel.cs +++ b/OpenSim/Region/Framework/Interfaces/ILandChannel.cs | |||
@@ -76,5 +76,8 @@ namespace OpenSim.Region.Framework.Interfaces | |||
76 | void setParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel); | 76 | void setParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel); |
77 | void setSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel); | 77 | void setSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel); |
78 | void SetParcelOtherCleanTime(IClientAPI remoteClient, int localID, int otherCleanTime); | 78 | void SetParcelOtherCleanTime(IClientAPI remoteClient, int localID, int otherCleanTime); |
79 | |||
80 | void Join(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id); | ||
81 | void Subdivide(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id); | ||
79 | } | 82 | } |
80 | } | 83 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 48e65a5..d174d04 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -104,7 +104,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
104 | 104 | ||
105 | #endregion Enumerations | 105 | #endregion Enumerations |
106 | 106 | ||
107 | public class SceneObjectPart : IScriptHost | 107 | public class SceneObjectPart : IScriptHost, ISceneEntity |
108 | { | 108 | { |
109 | /// <value> | 109 | /// <value> |
110 | /// Denote all sides of the prim | 110 | /// Denote all sides of the prim |
@@ -714,6 +714,24 @@ namespace OpenSim.Region.Framework.Scenes | |||
714 | } | 714 | } |
715 | } | 715 | } |
716 | 716 | ||
717 | public Vector3 RelativePosition | ||
718 | { | ||
719 | get | ||
720 | { | ||
721 | if (IsRoot) | ||
722 | { | ||
723 | if (IsAttachment) | ||
724 | return AttachedPos; | ||
725 | else | ||
726 | return AbsolutePosition; | ||
727 | } | ||
728 | else | ||
729 | { | ||
730 | return OffsetPosition; | ||
731 | } | ||
732 | } | ||
733 | } | ||
734 | |||
717 | public Quaternion RotationOffset | 735 | public Quaternion RotationOffset |
718 | { | 736 | { |
719 | get | 737 | get |
@@ -985,7 +1003,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
985 | get { return AggregateScriptEvents; } | 1003 | get { return AggregateScriptEvents; } |
986 | } | 1004 | } |
987 | 1005 | ||
988 | |||
989 | public Quaternion SitTargetOrientation | 1006 | public Quaternion SitTargetOrientation |
990 | { | 1007 | { |
991 | get { return m_sitTargetOrientation; } | 1008 | get { return m_sitTargetOrientation; } |
@@ -2911,11 +2928,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2911 | //if (LocalId != ParentGroup.RootPart.LocalId) | 2928 | //if (LocalId != ParentGroup.RootPart.LocalId) |
2912 | //isattachment = ParentGroup.RootPart.IsAttachment; | 2929 | //isattachment = ParentGroup.RootPart.IsAttachment; |
2913 | 2930 | ||
2914 | byte[] color = new byte[] {m_color.R, m_color.G, m_color.B, m_color.A}; | 2931 | remoteClient.SendPrimUpdate(this, PrimUpdateFlags.FullUpdate); |
2915 | remoteClient.SendPrimitiveToClient(new SendPrimitiveData(m_regionHandle, m_parentGroup.GetTimeDilation(), LocalId, m_shape, | ||
2916 | lPos, Velocity, Acceleration, RotationOffset, AngularVelocity, clientFlags, m_uuid, _ownerID, | ||
2917 | m_text, color, _parentID, m_particleSystem, m_clickAction, (byte)m_material, m_TextureAnimation, IsAttachment, | ||
2918 | AttachmentPoint,FromItemID, Sound, SoundGain, SoundFlags, SoundRadius, ParentGroup.GetUpdatePriority(remoteClient))); | ||
2919 | } | 2932 | } |
2920 | 2933 | ||
2921 | /// <summary> | 2934 | /// <summary> |
@@ -4627,11 +4640,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4627 | 4640 | ||
4628 | // Causes this thread to dig into the Client Thread Data. | 4641 | // Causes this thread to dig into the Client Thread Data. |
4629 | // Remember your locking here! | 4642 | // Remember your locking here! |
4630 | remoteClient.SendPrimTerseUpdate(new SendPrimitiveTerseData(m_regionHandle, | 4643 | remoteClient.SendPrimUpdate(this, PrimUpdateFlags.Position | PrimUpdateFlags.Rotation | PrimUpdateFlags.Velocity | PrimUpdateFlags.Acceleration | PrimUpdateFlags.AngularVelocity); |
4631 | m_parentGroup.GetTimeDilation(), LocalId, lPos, | ||
4632 | RotationOffset, Velocity, Acceleration, | ||
4633 | AngularVelocity, FromItemID, | ||
4634 | OwnerID, (int)AttachmentPoint, null, ParentGroup.GetUpdatePriority(remoteClient))); | ||
4635 | } | 4644 | } |
4636 | 4645 | ||
4637 | public void AddScriptLPS(int count) | 4646 | public void AddScriptLPS(int count) |
@@ -4681,7 +4690,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
4681 | 4690 | ||
4682 | public Color4 GetTextColor() | 4691 | public Color4 GetTextColor() |
4683 | { | 4692 | { |
4684 | return new Color4((byte)Color.R, (byte)Color.G, (byte)Color.B, (byte)(0xFF - Color.A)); | 4693 | Color color = Color; |
4694 | return new Color4(color.R, color.G, color.B, (byte)(0xFF - color.A)); | ||
4685 | } | 4695 | } |
4686 | 4696 | ||
4687 | public void ResetOwnerChangeFlag() | 4697 | public void ResetOwnerChangeFlag() |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index ad66273..179ecdc 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -68,7 +68,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
68 | 68 | ||
69 | public delegate void SendCourseLocationsMethod(UUID scene, ScenePresence presence); | 69 | public delegate void SendCourseLocationsMethod(UUID scene, ScenePresence presence); |
70 | 70 | ||
71 | public class ScenePresence : EntityBase | 71 | public class ScenePresence : EntityBase, ISceneEntity |
72 | { | 72 | { |
73 | // ~ScenePresence() | 73 | // ~ScenePresence() |
74 | // { | 74 | // { |
@@ -491,6 +491,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
491 | } | 491 | } |
492 | } | 492 | } |
493 | 493 | ||
494 | public Vector3 OffsetPosition | ||
495 | { | ||
496 | get { return m_pos; } | ||
497 | set { m_pos = value; } | ||
498 | } | ||
499 | |||
494 | /// <summary> | 500 | /// <summary> |
495 | /// Current velocity of the avatar. | 501 | /// Current velocity of the avatar. |
496 | /// </summary> | 502 | /// </summary> |
@@ -1120,8 +1126,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
1120 | 1126 | ||
1121 | m_updateCount = UPDATE_COUNT; //KF: Trigger Anim updates to catch falling anim. | 1127 | m_updateCount = UPDATE_COUNT; //KF: Trigger Anim updates to catch falling anim. |
1122 | 1128 | ||
1123 | ControllingClient.SendAvatarTerseUpdate(new SendAvatarTerseData(m_rootRegionHandle, (ushort)(m_scene.TimeDilation * ushort.MaxValue), LocalId, | 1129 | ControllingClient.SendPrimUpdate(this, PrimUpdateFlags.Position); |
1124 | AbsolutePosition, Velocity, Vector3.Zero, m_bodyRot, new Vector4(0,0,1,AbsolutePosition.Z - 0.5f), m_uuid, null, GetUpdatePriority(ControllingClient))); | 1130 | //ControllingClient.SendAvatarTerseUpdate(new SendAvatarTerseData(m_rootRegionHandle, (ushort)(m_scene.TimeDilation * ushort.MaxValue), LocalId, |
1131 | // AbsolutePosition, Velocity, Vector3.Zero, m_bodyRot, new Vector4(0,0,1,AbsolutePosition.Z - 0.5f), m_uuid, null, GetUpdatePriority(ControllingClient))); | ||
1125 | } | 1132 | } |
1126 | 1133 | ||
1127 | public void AddNeighbourRegion(ulong regionHandle, string cap) | 1134 | public void AddNeighbourRegion(ulong regionHandle, string cap) |
@@ -2604,8 +2611,7 @@ Console.WriteLine("Scripted Sit ofset {0}", m_pos); | |||
2604 | 2611 | ||
2605 | //m_log.DebugFormat("[SCENEPRESENCE]: TerseUpdate: Pos={0} Rot={1} Vel={2}", m_pos, m_bodyRot, m_velocity); | 2612 | //m_log.DebugFormat("[SCENEPRESENCE]: TerseUpdate: Pos={0} Rot={1} Vel={2}", m_pos, m_bodyRot, m_velocity); |
2606 | 2613 | ||
2607 | remoteClient.SendAvatarTerseUpdate(new SendAvatarTerseData(m_rootRegionHandle, (ushort)(m_scene.TimeDilation * ushort.MaxValue), LocalId, | 2614 | remoteClient.SendPrimUpdate(this, PrimUpdateFlags.Position | PrimUpdateFlags.Rotation | PrimUpdateFlags.Velocity | PrimUpdateFlags.Acceleration | PrimUpdateFlags.AngularVelocity); |
2608 | pos, velocity, Vector3.Zero, m_bodyRot, CollisionPlane, m_uuid, null, GetUpdatePriority(remoteClient))); | ||
2609 | 2615 | ||
2610 | m_scene.StatsReporter.AddAgentTime(Util.EnvironmentTickCountSubtract(m_perfMonMS)); | 2616 | m_scene.StatsReporter.AddAgentTime(Util.EnvironmentTickCountSubtract(m_perfMonMS)); |
2611 | m_scene.StatsReporter.AddAgentUpdates(1); | 2617 | m_scene.StatsReporter.AddAgentUpdates(1); |
@@ -2701,9 +2707,7 @@ Console.WriteLine("Scripted Sit ofset {0}", m_pos); | |||
2701 | Vector3 pos = m_pos; | 2707 | Vector3 pos = m_pos; |
2702 | pos.Z += m_appearance.HipOffset; | 2708 | pos.Z += m_appearance.HipOffset; |
2703 | 2709 | ||
2704 | remoteAvatar.m_controllingClient.SendAvatarData(new SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_grouptitle, m_uuid, | 2710 | remoteAvatar.m_controllingClient.SendAvatarDataImmediate(this); |
2705 | LocalId, pos, m_appearance.Texture.GetBytes(), | ||
2706 | m_parentID, m_bodyRot)); | ||
2707 | m_scene.StatsReporter.AddAgentUpdates(1); | 2711 | m_scene.StatsReporter.AddAgentUpdates(1); |
2708 | } | 2712 | } |
2709 | 2713 | ||
@@ -2771,8 +2775,7 @@ Console.WriteLine("Scripted Sit ofset {0}", m_pos); | |||
2771 | Vector3 pos = m_pos; | 2775 | Vector3 pos = m_pos; |
2772 | pos.Z += m_appearance.HipOffset; | 2776 | pos.Z += m_appearance.HipOffset; |
2773 | 2777 | ||
2774 | m_controllingClient.SendAvatarData(new SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_grouptitle, m_uuid, LocalId, | 2778 | m_controllingClient.SendAvatarDataImmediate(this); |
2775 | pos, m_appearance.Texture.GetBytes(), m_parentID, m_bodyRot)); | ||
2776 | 2779 | ||
2777 | SendInitialFullUpdateToAllClients(); | 2780 | SendInitialFullUpdateToAllClients(); |
2778 | SendAppearanceToAllOtherAgents(); | 2781 | SendAppearanceToAllOtherAgents(); |
@@ -2882,9 +2885,7 @@ Console.WriteLine("Scripted Sit ofset {0}", m_pos); | |||
2882 | Vector3 pos = m_pos; | 2885 | Vector3 pos = m_pos; |
2883 | pos.Z += m_appearance.HipOffset; | 2886 | pos.Z += m_appearance.HipOffset; |
2884 | 2887 | ||
2885 | m_controllingClient.SendAvatarData(new SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_grouptitle, m_uuid, LocalId, | 2888 | m_controllingClient.SendAvatarDataImmediate(this); |
2886 | pos, m_appearance.Texture.GetBytes(), m_parentID, m_bodyRot)); | ||
2887 | |||
2888 | } | 2889 | } |
2889 | 2890 | ||
2890 | public void SetWearable(int wearableId, AvatarWearable wearable) | 2891 | public void SetWearable(int wearableId, AvatarWearable wearable) |
@@ -4219,7 +4220,7 @@ Console.WriteLine("Scripted Sit ofset {0}", m_pos); | |||
4219 | 4220 | ||
4220 | private void Reprioritize(object sender, ElapsedEventArgs e) | 4221 | private void Reprioritize(object sender, ElapsedEventArgs e) |
4221 | { | 4222 | { |
4222 | m_controllingClient.ReprioritizeUpdates(StateUpdateTypes.All, UpdatePriority); | 4223 | m_controllingClient.ReprioritizeUpdates(UpdatePriority); |
4223 | 4224 | ||
4224 | lock (m_reprioritization_timer) | 4225 | lock (m_reprioritization_timer) |
4225 | { | 4226 | { |
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index cab640b..fb8543b 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs | |||
@@ -1054,16 +1054,6 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server | |||
1054 | 1054 | ||
1055 | } | 1055 | } |
1056 | 1056 | ||
1057 | public void SendAvatarData(SendAvatarData data) | ||
1058 | { | ||
1059 | |||
1060 | } | ||
1061 | |||
1062 | public void SendAvatarTerseUpdate(SendAvatarTerseData data) | ||
1063 | { | ||
1064 | |||
1065 | } | ||
1066 | |||
1067 | public void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations) | 1057 | public void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations) |
1068 | { | 1058 | { |
1069 | 1059 | ||
@@ -1074,32 +1064,27 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server | |||
1074 | 1064 | ||
1075 | } | 1065 | } |
1076 | 1066 | ||
1077 | public void SetChildAgentThrottle(byte[] throttle) | 1067 | public void SendAvatarDataImmediate(ISceneEntity avatar) |
1078 | { | 1068 | { |
1079 | |||
1080 | } | ||
1081 | 1069 | ||
1082 | public void SendPrimitiveToClient(SendPrimitiveData data) | ||
1083 | { | ||
1084 | |||
1085 | } | 1070 | } |
1086 | 1071 | ||
1087 | public void SendPrimTerseUpdate(SendPrimitiveTerseData data) | 1072 | public void SendPrimUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags) |
1088 | { | 1073 | { |
1089 | 1074 | ||
1090 | } | 1075 | } |
1091 | 1076 | ||
1092 | public void ReprioritizeUpdates(StateUpdateTypes type, UpdatePriorityHandler handler) | 1077 | public void ReprioritizeUpdates(UpdatePriorityHandler handler) |
1093 | { | 1078 | { |
1094 | 1079 | ||
1095 | } | 1080 | } |
1096 | 1081 | ||
1097 | public void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List<InventoryItemBase> items, List<InventoryFolderBase> folders, int version, bool fetchFolders, bool fetchItems) | 1082 | public void FlushPrimUpdates() |
1098 | { | 1083 | { |
1099 | 1084 | ||
1100 | } | 1085 | } |
1101 | 1086 | ||
1102 | public void FlushPrimUpdates() | 1087 | public void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List<InventoryItemBase> items, List<InventoryFolderBase> folders, int version, bool fetchFolders, bool fetchItems) |
1103 | { | 1088 | { |
1104 | 1089 | ||
1105 | } | 1090 | } |
@@ -1429,6 +1414,11 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server | |||
1429 | 1414 | ||
1430 | } | 1415 | } |
1431 | 1416 | ||
1417 | public virtual void SetChildAgentThrottle(byte[] throttle) | ||
1418 | { | ||
1419 | |||
1420 | } | ||
1421 | |||
1432 | public byte[] GetThrottlesPacked(float multiplier) | 1422 | public byte[] GetThrottlesPacked(float multiplier) |
1433 | { | 1423 | { |
1434 | return new byte[0]; | 1424 | return new byte[0]; |
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index b828357..3cbc538 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | |||
@@ -618,14 +618,6 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
618 | { | 618 | { |
619 | } | 619 | } |
620 | 620 | ||
621 | public virtual void SendAvatarData(SendAvatarData data) | ||
622 | { | ||
623 | } | ||
624 | |||
625 | public virtual void SendAvatarTerseUpdate(SendAvatarTerseData data) | ||
626 | { | ||
627 | } | ||
628 | |||
629 | public virtual void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations) | 621 | public virtual void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations) |
630 | { | 622 | { |
631 | } | 623 | } |
@@ -638,15 +630,15 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
638 | { | 630 | { |
639 | } | 631 | } |
640 | 632 | ||
641 | public virtual void SendPrimitiveToClient(SendPrimitiveData data) | 633 | public void SendAvatarDataImmediate(ISceneEntity avatar) |
642 | { | 634 | { |
643 | } | 635 | } |
644 | 636 | ||
645 | public virtual void SendPrimTerseUpdate(SendPrimitiveTerseData data) | 637 | public void SendPrimUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags) |
646 | { | 638 | { |
647 | } | 639 | } |
648 | 640 | ||
649 | public virtual void ReprioritizeUpdates(StateUpdateTypes type, UpdatePriorityHandler handler) | 641 | public void ReprioritizeUpdates(UpdatePriorityHandler handler) |
650 | { | 642 | { |
651 | } | 643 | } |
652 | 644 | ||
diff --git a/OpenSim/Region/RegionCombinerModule/RegionCombinerLargeLandChannel.cs b/OpenSim/Region/RegionCombinerModule/RegionCombinerLargeLandChannel.cs index 9da818a..33ff707 100644 --- a/OpenSim/Region/RegionCombinerModule/RegionCombinerLargeLandChannel.cs +++ b/OpenSim/Region/RegionCombinerModule/RegionCombinerLargeLandChannel.cs | |||
@@ -140,6 +140,16 @@ public class RegionCombinerLargeLandChannel : ILandChannel | |||
140 | RootRegionLandChannel.UpdateLandObject(localID, data); | 140 | RootRegionLandChannel.UpdateLandObject(localID, data); |
141 | } | 141 | } |
142 | 142 | ||
143 | public void Join(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id) | ||
144 | { | ||
145 | RootRegionLandChannel.Join(start_x, start_y, end_x, end_y, attempting_user_id); | ||
146 | } | ||
147 | |||
148 | public void Subdivide(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id) | ||
149 | { | ||
150 | RootRegionLandChannel.Subdivide(start_x, start_y, end_x, end_y, attempting_user_id); | ||
151 | } | ||
152 | |||
143 | public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient) | 153 | public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient) |
144 | { | 154 | { |
145 | RootRegionLandChannel.ReturnObjectsInParcel(localID, returnType, agentIDs, taskIDs, remoteClient); | 155 | RootRegionLandChannel.ReturnObjectsInParcel(localID, returnType, agentIDs, taskIDs, remoteClient); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 9474bab..942e4ef 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -1127,7 +1127,89 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1127 | return 0.0f; | 1127 | return 0.0f; |
1128 | } | 1128 | } |
1129 | 1129 | ||
1130 | // Routines for creating and managing parcels programmatically | ||
1131 | public void osParcelJoin(LSL_Vector pos1, LSL_Vector pos2) | ||
1132 | { | ||
1133 | CheckThreatLevel(ThreatLevel.High, "osParcelJoin"); | ||
1134 | m_host.AddScriptLPS(1); | ||
1135 | |||
1136 | int startx = (int)(pos1.x < pos2.x ? pos1.x : pos2.x); | ||
1137 | int starty = (int)(pos1.y < pos2.y ? pos1.y : pos2.y); | ||
1138 | int endx = (int)(pos1.x > pos2.x ? pos1.x : pos2.x); | ||
1139 | int endy = (int)(pos1.y > pos2.y ? pos1.y : pos2.y); | ||
1140 | |||
1141 | World.LandChannel.Join(startx,starty,endx,endy,m_host.OwnerID); | ||
1142 | } | ||
1143 | |||
1144 | public void osParcelSubdivide(LSL_Vector pos1, LSL_Vector pos2) | ||
1145 | { | ||
1146 | CheckThreatLevel(ThreatLevel.High, "osParcelSubdivide"); | ||
1147 | m_host.AddScriptLPS(1); | ||
1148 | |||
1149 | int startx = (int)(pos1.x < pos2.x ? pos1.x : pos2.x); | ||
1150 | int starty = (int)(pos1.y < pos2.y ? pos1.y : pos2.y); | ||
1151 | int endx = (int)(pos1.x > pos2.x ? pos1.x : pos2.x); | ||
1152 | int endy = (int)(pos1.y > pos2.y ? pos1.y : pos2.y); | ||
1130 | 1153 | ||
1154 | World.LandChannel.Subdivide(startx,starty,endx,endy,m_host.OwnerID); | ||
1155 | } | ||
1156 | |||
1157 | public void osParcelSetDetails(LSL_Vector pos, LSL_List rules) | ||
1158 | { | ||
1159 | CheckThreatLevel(ThreatLevel.High, "osParcelSetDetails"); | ||
1160 | m_host.AddScriptLPS(1); | ||
1161 | |||
1162 | // Get a reference to the land data and make sure the owner of the script | ||
1163 | // can modify it | ||
1164 | |||
1165 | ILandObject startLandObject = World.LandChannel.GetLandObject((int)pos.x, (int)pos.y); | ||
1166 | if (startLandObject == null) | ||
1167 | { | ||
1168 | OSSLShoutError("There is no land at that location"); | ||
1169 | return; | ||
1170 | } | ||
1171 | |||
1172 | if (! World.Permissions.CanEditParcel(m_host.OwnerID, startLandObject)) | ||
1173 | { | ||
1174 | OSSLShoutError("You do not have permission to modify the parcel"); | ||
1175 | return; | ||
1176 | } | ||
1177 | |||
1178 | // Create a new land data object we can modify | ||
1179 | LandData newLand = startLandObject.LandData.Copy(); | ||
1180 | UUID uuid; | ||
1181 | |||
1182 | // Process the rules, not sure what the impact would be of changing owner or group | ||
1183 | for (int idx = 0; idx < rules.Length; ) | ||
1184 | { | ||
1185 | int code = rules.GetLSLIntegerItem(idx++); | ||
1186 | string arg = rules.GetLSLStringItem(idx++); | ||
1187 | switch (code) | ||
1188 | { | ||
1189 | case 0: | ||
1190 | newLand.Name = arg; | ||
1191 | break; | ||
1192 | |||
1193 | case 1: | ||
1194 | newLand.Description = arg; | ||
1195 | break; | ||
1196 | |||
1197 | case 2: | ||
1198 | CheckThreatLevel(ThreatLevel.VeryHigh, "osParcelSetDetails"); | ||
1199 | if (UUID.TryParse(arg , out uuid)) | ||
1200 | newLand.OwnerID = uuid; | ||
1201 | break; | ||
1202 | |||
1203 | case 3: | ||
1204 | CheckThreatLevel(ThreatLevel.VeryHigh, "osParcelSetDetails"); | ||
1205 | if (UUID.TryParse(arg , out uuid)) | ||
1206 | newLand.GroupID = uuid; | ||
1207 | break; | ||
1208 | } | ||
1209 | } | ||
1210 | |||
1211 | World.LandChannel.UpdateLandObject(newLand.LocalID,newLand); | ||
1212 | } | ||
1131 | 1213 | ||
1132 | public double osList2Double(LSL_Types.list src, int index) | 1214 | public double osList2Double(LSL_Types.list src, int index) |
1133 | { | 1215 | { |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs index f5921e1..9dbd369 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs | |||
@@ -123,6 +123,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
123 | void osWindParamSet(string plugin, string param, float value); | 123 | void osWindParamSet(string plugin, string param, float value); |
124 | float osWindParamGet(string plugin, string param); | 124 | float osWindParamGet(string plugin, string param); |
125 | 125 | ||
126 | // Parcel commands | ||
127 | void osParcelJoin(vector pos1, vector pos2); | ||
128 | void osParcelSubdivide(vector pos1, vector pos2); | ||
129 | void osParcelSetDetails(vector pos, LSL_List rules); | ||
126 | 130 | ||
127 | string osGetScriptEngineName(); | 131 | string osGetScriptEngineName(); |
128 | string osGetSimulatorVersion(); | 132 | string osGetSimulatorVersion(); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs index 3870af3..fd9309a 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs | |||
@@ -106,6 +106,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
106 | // return m_OSSL_Functions.osWindParamGet(plugin, param); | 106 | // return m_OSSL_Functions.osWindParamGet(plugin, param); |
107 | // } | 107 | // } |
108 | 108 | ||
109 | public void osParcelJoin(vector pos1, vector pos2) | ||
110 | { | ||
111 | m_OSSL_Functions.osParcelJoin(pos1,pos2); | ||
112 | } | ||
113 | |||
114 | public void osParcelSubdivide(vector pos1, vector pos2) | ||
115 | { | ||
116 | m_OSSL_Functions.osParcelSubdivide(pos1, pos2); | ||
117 | } | ||
118 | |||
119 | public void osParcelSetDetails(vector pos, LSL_List rules) | ||
120 | { | ||
121 | m_OSSL_Functions.osParcelSetDetails(pos,rules); | ||
122 | } | ||
123 | |||
109 | public double osList2Double(LSL_Types.list src, int index) | 124 | public double osList2Double(LSL_Types.list src, int index) |
110 | { | 125 | { |
111 | return m_OSSL_Functions.osList2Double(src, index); | 126 | return m_OSSL_Functions.osList2Double(src, index); |
diff --git a/OpenSim/Services/Connectors/GridUser/GridUserServiceConnector.cs b/OpenSim/Services/Connectors/GridUser/GridUserServiceConnector.cs index b4500a5..600ddfd 100644 --- a/OpenSim/Services/Connectors/GridUser/GridUserServiceConnector.cs +++ b/OpenSim/Services/Connectors/GridUser/GridUserServiceConnector.cs | |||
@@ -84,7 +84,7 @@ namespace OpenSim.Services.Connectors | |||
84 | } | 84 | } |
85 | 85 | ||
86 | 86 | ||
87 | #region IPresenceService | 87 | #region IGridUserService |
88 | 88 | ||
89 | 89 | ||
90 | public GridUserInfo LoggedIn(string userID) | 90 | public GridUserInfo LoggedIn(string userID) |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianActivityDetector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianActivityDetector.cs new file mode 100644 index 0000000..a871d07 --- /dev/null +++ b/OpenSim/Services/Connectors/SimianGrid/SimianActivityDetector.cs | |||
@@ -0,0 +1,113 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using System.Reflection; | ||
31 | using OpenSim.Framework; | ||
32 | using OpenSim.Region.Framework.Scenes; | ||
33 | using OpenSim.Services.Interfaces; | ||
34 | using OpenMetaverse; | ||
35 | using log4net; | ||
36 | |||
37 | namespace OpenSim.Services.Connectors.SimianGrid | ||
38 | { | ||
39 | public class SimianActivityDetector | ||
40 | { | ||
41 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
42 | |||
43 | private SimianPresenceServiceConnector m_GridUserService; | ||
44 | private Scene m_aScene; | ||
45 | |||
46 | public SimianActivityDetector(SimianPresenceServiceConnector guservice) | ||
47 | { | ||
48 | m_GridUserService = guservice; | ||
49 | m_log.DebugFormat("[SIMIAN ACTIVITY DETECTOR]: Started"); | ||
50 | } | ||
51 | |||
52 | public void AddRegion(Scene scene) | ||
53 | { | ||
54 | // For now the only events we listen to are these | ||
55 | // But we could trigger the position update more often | ||
56 | scene.EventManager.OnMakeRootAgent += OnMakeRootAgent; | ||
57 | scene.EventManager.OnNewClient += OnNewClient; | ||
58 | scene.EventManager.OnAvatarEnteringNewParcel += OnEnteringNewParcel; | ||
59 | |||
60 | if (m_aScene == null) | ||
61 | m_aScene = scene; | ||
62 | } | ||
63 | |||
64 | public void RemoveRegion(Scene scene) | ||
65 | { | ||
66 | scene.EventManager.OnMakeRootAgent -= OnMakeRootAgent; | ||
67 | scene.EventManager.OnNewClient -= OnNewClient; | ||
68 | scene.EventManager.OnAvatarEnteringNewParcel -= OnEnteringNewParcel; | ||
69 | } | ||
70 | |||
71 | public void OnMakeRootAgent(ScenePresence sp) | ||
72 | { | ||
73 | m_log.DebugFormat("[SIMIAN ACTIVITY DETECTOR]: Detected root presence {0} in {1}", sp.UUID, sp.Scene.RegionInfo.RegionName); | ||
74 | m_GridUserService.SetLastPosition(sp.UUID.ToString(), sp.ControllingClient.SessionId, sp.Scene.RegionInfo.RegionID, sp.AbsolutePosition, sp.Lookat); | ||
75 | } | ||
76 | |||
77 | public void OnNewClient(IClientAPI client) | ||
78 | { | ||
79 | client.OnConnectionClosed += OnConnectionClose; | ||
80 | } | ||
81 | |||
82 | public void OnConnectionClose(IClientAPI client) | ||
83 | { | ||
84 | if (client.IsLoggingOut) | ||
85 | { | ||
86 | object sp = null; | ||
87 | Vector3 position = new Vector3(128, 128, 0); | ||
88 | Vector3 lookat = new Vector3(0, 1, 0); | ||
89 | |||
90 | if (client.Scene.TryGetScenePresence(client.AgentId, out sp)) | ||
91 | { | ||
92 | if (sp is ScenePresence) | ||
93 | { | ||
94 | if (((ScenePresence)sp).IsChildAgent) | ||
95 | return; | ||
96 | |||
97 | position = ((ScenePresence)sp).AbsolutePosition; | ||
98 | lookat = ((ScenePresence)sp).Lookat; | ||
99 | } | ||
100 | } | ||
101 | |||
102 | m_log.DebugFormat("[SIMIAN ACTIVITY DETECTOR]: Detected client logout {0} in {1}", client.AgentId, client.Scene.RegionInfo.RegionName); | ||
103 | m_GridUserService.LoggedOut(client.AgentId.ToString(), client.Scene.RegionInfo.RegionID, position, lookat); | ||
104 | } | ||
105 | |||
106 | } | ||
107 | |||
108 | void OnEnteringNewParcel(ScenePresence sp, int localLandID, UUID regionID) | ||
109 | { | ||
110 | m_GridUserService.SetLastPosition(sp.UUID.ToString(), sp.ControllingClient.SessionId, sp.Scene.RegionInfo.RegionID, sp.AbsolutePosition, sp.Lookat); | ||
111 | } | ||
112 | } | ||
113 | } | ||
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs index b86c45c..6f17931 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs | |||
@@ -58,6 +58,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
58 | MethodBase.GetCurrentMethod().DeclaringType); | 58 | MethodBase.GetCurrentMethod().DeclaringType); |
59 | 59 | ||
60 | private string m_serverUrl = String.Empty; | 60 | private string m_serverUrl = String.Empty; |
61 | private SimianActivityDetector m_activityDetector; | ||
61 | 62 | ||
62 | #region ISharedRegionModule | 63 | #region ISharedRegionModule |
63 | 64 | ||
@@ -66,7 +67,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
66 | public void PostInitialise() { } | 67 | public void PostInitialise() { } |
67 | public void Close() { } | 68 | public void Close() { } |
68 | 69 | ||
69 | public SimianPresenceServiceConnector() { } | 70 | public SimianPresenceServiceConnector() { m_activityDetector = new SimianActivityDetector(this); } |
70 | public string Name { get { return "SimianPresenceServiceConnector"; } } | 71 | public string Name { get { return "SimianPresenceServiceConnector"; } } |
71 | public void AddRegion(Scene scene) | 72 | public void AddRegion(Scene scene) |
72 | { | 73 | { |
@@ -75,9 +76,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
75 | scene.RegisterModuleInterface<IPresenceService>(this); | 76 | scene.RegisterModuleInterface<IPresenceService>(this); |
76 | scene.RegisterModuleInterface<IGridUserService>(this); | 77 | scene.RegisterModuleInterface<IGridUserService>(this); |
77 | 78 | ||
78 | scene.EventManager.OnMakeRootAgent += MakeRootAgentHandler; | 79 | m_activityDetector.AddRegion(scene); |
79 | scene.EventManager.OnNewClient += NewClientHandler; | ||
80 | scene.EventManager.OnSignificantClientMovement += SignificantClientMovementHandler; | ||
81 | 80 | ||
82 | LogoutRegionAgents(scene.RegionInfo.RegionID); | 81 | LogoutRegionAgents(scene.RegionInfo.RegionID); |
83 | } | 82 | } |
@@ -89,9 +88,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
89 | scene.UnregisterModuleInterface<IPresenceService>(this); | 88 | scene.UnregisterModuleInterface<IPresenceService>(this); |
90 | scene.UnregisterModuleInterface<IGridUserService>(this); | 89 | scene.UnregisterModuleInterface<IGridUserService>(this); |
91 | 90 | ||
92 | scene.EventManager.OnMakeRootAgent -= MakeRootAgentHandler; | 91 | m_activityDetector.RemoveRegion(scene); |
93 | scene.EventManager.OnNewClient -= NewClientHandler; | ||
94 | scene.EventManager.OnSignificantClientMovement -= SignificantClientMovementHandler; | ||
95 | 92 | ||
96 | LogoutRegionAgents(scene.RegionInfo.RegionID); | 93 | LogoutRegionAgents(scene.RegionInfo.RegionID); |
97 | } | 94 | } |
@@ -193,29 +190,8 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
193 | 190 | ||
194 | public bool ReportAgent(UUID sessionID, UUID regionID) | 191 | public bool ReportAgent(UUID sessionID, UUID regionID) |
195 | { | 192 | { |
196 | return ReportAgent(sessionID, regionID, Vector3.Zero, Vector3.Zero); | 193 | // Not needed for SimianGrid |
197 | } | 194 | return true; |
198 | |||
199 | protected bool ReportAgent(UUID sessionID, UUID regionID, Vector3 position, Vector3 lookAt) | ||
200 | { | ||
201 | //m_log.DebugFormat("[SIMIAN PRESENCE CONNECTOR]: Updating session data for agent with sessionID " + sessionID); | ||
202 | |||
203 | NameValueCollection requestArgs = new NameValueCollection | ||
204 | { | ||
205 | { "RequestMethod", "UpdateSession" }, | ||
206 | { "SessionID", sessionID.ToString() }, | ||
207 | { "SceneID", regionID.ToString() }, | ||
208 | { "ScenePosition", position.ToString() }, | ||
209 | { "SceneLookAt", lookAt.ToString() } | ||
210 | }; | ||
211 | |||
212 | OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs); | ||
213 | bool success = response["Success"].AsBoolean(); | ||
214 | |||
215 | if (!success) | ||
216 | m_log.Warn("[SIMIAN PRESENCE CONNECTOR]: Failed to update agent session " + sessionID + ": " + response["Message"].AsString()); | ||
217 | |||
218 | return success; | ||
219 | } | 195 | } |
220 | 196 | ||
221 | public PresenceInfo GetAgent(UUID sessionID) | 197 | public PresenceInfo GetAgent(UUID sessionID) |
@@ -274,14 +250,27 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
274 | 250 | ||
275 | public GridUserInfo LoggedIn(string userID) | 251 | public GridUserInfo LoggedIn(string userID) |
276 | { | 252 | { |
277 | // never implemented at the sim | 253 | // Never implemented at the sim |
278 | return null; | 254 | return null; |
279 | } | 255 | } |
280 | 256 | ||
281 | public bool LoggedOut(string userID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt) | 257 | public bool LoggedOut(string userID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt) |
282 | { | 258 | { |
283 | // Not needed for simian grid, event handler is doing it | 259 | // Save our last position as user data |
284 | return true; | 260 | NameValueCollection requestArgs = new NameValueCollection |
261 | { | ||
262 | { "RequestMethod", "AddUserData" }, | ||
263 | { "UserID", userID.ToString() }, | ||
264 | { "LastLocation", SerializeLocation(regionID, lastPosition, lastLookAt) } | ||
265 | }; | ||
266 | |||
267 | OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs); | ||
268 | bool success = response["Success"].AsBoolean(); | ||
269 | |||
270 | if (!success) | ||
271 | m_log.Warn("[SIMIAN PRESENCE CONNECTOR]: Failed to set last location for " + userID + ": " + response["Message"].AsString()); | ||
272 | |||
273 | return success; | ||
285 | } | 274 | } |
286 | 275 | ||
287 | public bool SetHome(string userID, UUID regionID, Vector3 position, Vector3 lookAt) | 276 | public bool SetHome(string userID, UUID regionID, Vector3 position, Vector3 lookAt) |
@@ -304,10 +293,15 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
304 | return success; | 293 | return success; |
305 | } | 294 | } |
306 | 295 | ||
296 | public bool SetLastPosition(string userID, UUID sessionID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt) | ||
297 | { | ||
298 | return UpdateSession(sessionID, regionID, lastPosition, lastLookAt); | ||
299 | } | ||
300 | |||
307 | public bool SetLastPosition(string userID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt) | 301 | public bool SetLastPosition(string userID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt) |
308 | { | 302 | { |
309 | // Not needed for simian grid, presence detection is doing it | 303 | // Never called |
310 | return true; | 304 | return false; |
311 | } | 305 | } |
312 | 306 | ||
313 | public GridUserInfo GetGridUserInfo(string user) | 307 | public GridUserInfo GetGridUserInfo(string user) |
@@ -334,54 +328,6 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
334 | 328 | ||
335 | #endregion | 329 | #endregion |
336 | 330 | ||
337 | #region Presence Detection | ||
338 | |||
339 | private void MakeRootAgentHandler(ScenePresence sp) | ||
340 | { | ||
341 | m_log.DebugFormat("[PRESENCE DETECTOR]: Detected root presence {0} in {1}", sp.UUID, sp.Scene.RegionInfo.RegionName); | ||
342 | |||
343 | ReportAgent(sp.ControllingClient.SessionId, sp.Scene.RegionInfo.RegionID, sp.AbsolutePosition, sp.Lookat); | ||
344 | SetLastLocation(sp.UUID, sp.Scene.RegionInfo.RegionID, sp.AbsolutePosition, sp.Lookat); | ||
345 | } | ||
346 | |||
347 | private void NewClientHandler(IClientAPI client) | ||
348 | { | ||
349 | client.OnConnectionClosed += LogoutHandler; | ||
350 | } | ||
351 | |||
352 | private void SignificantClientMovementHandler(IClientAPI client) | ||
353 | { | ||
354 | ScenePresence sp; | ||
355 | if (client.Scene is Scene && ((Scene)client.Scene).TryGetScenePresence(client.AgentId, out sp)) | ||
356 | ReportAgent(sp.ControllingClient.SessionId, sp.Scene.RegionInfo.RegionID, sp.AbsolutePosition, sp.Lookat); | ||
357 | } | ||
358 | |||
359 | private void LogoutHandler(IClientAPI client) | ||
360 | { | ||
361 | if (client.IsLoggingOut) | ||
362 | { | ||
363 | client.OnConnectionClosed -= LogoutHandler; | ||
364 | |||
365 | object obj; | ||
366 | if (client.Scene.TryGetScenePresence(client.AgentId, out obj) && obj is ScenePresence) | ||
367 | { | ||
368 | // The avatar is still in the scene, we can get the exact logout position | ||
369 | ScenePresence sp = (ScenePresence)obj; | ||
370 | SetLastLocation(client.AgentId, client.Scene.RegionInfo.RegionID, sp.AbsolutePosition, sp.Lookat); | ||
371 | } | ||
372 | else | ||
373 | { | ||
374 | // The avatar was already removed from the scene, store LastLocation using the most recent session data | ||
375 | m_log.Warn("[PRESENCE]: " + client.Name + " has already been removed from the scene, storing approximate LastLocation"); | ||
376 | SetLastLocation(client.SessionId); | ||
377 | } | ||
378 | |||
379 | LogoutAgent(client.SessionId); | ||
380 | } | ||
381 | } | ||
382 | |||
383 | #endregion Presence Detection | ||
384 | |||
385 | #region Helpers | 331 | #region Helpers |
386 | 332 | ||
387 | private OSDMap GetUserData(UUID userID) | 333 | private OSDMap GetUserData(UUID userID) |
@@ -453,57 +399,60 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
453 | return presences; | 399 | return presences; |
454 | } | 400 | } |
455 | 401 | ||
456 | /// <summary> | 402 | private bool UpdateSession(UUID sessionID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt) |
457 | /// Fetch the last known avatar location with GetSession and persist it | ||
458 | /// as user data with AddUserData | ||
459 | /// </summary> | ||
460 | private bool SetLastLocation(UUID sessionID) | ||
461 | { | 403 | { |
404 | // Save our current location as session data | ||
462 | NameValueCollection requestArgs = new NameValueCollection | 405 | NameValueCollection requestArgs = new NameValueCollection |
463 | { | 406 | { |
464 | { "RequestMethod", "GetSession" }, | 407 | { "RequestMethod", "UpdateSession" }, |
465 | { "SessionID", sessionID.ToString() } | 408 | { "SessionID", sessionID.ToString() }, |
409 | { "SceneID", regionID.ToString() }, | ||
410 | { "ScenePosition", lastPosition.ToString() }, | ||
411 | { "SceneLookAt", lastLookAt.ToString() } | ||
466 | }; | 412 | }; |
467 | 413 | ||
468 | OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs); | 414 | OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs); |
469 | bool success = response["Success"].AsBoolean(); | 415 | bool success = response["Success"].AsBoolean(); |
470 | 416 | ||
471 | if (success) | ||
472 | { | ||
473 | UUID userID = response["UserID"].AsUUID(); | ||
474 | UUID sceneID = response["SceneID"].AsUUID(); | ||
475 | Vector3 position = response["ScenePosition"].AsVector3(); | ||
476 | Vector3 lookAt = response["SceneLookAt"].AsVector3(); | ||
477 | |||
478 | return SetLastLocation(userID, sceneID, position, lookAt); | ||
479 | } | ||
480 | else | ||
481 | { | ||
482 | m_log.Warn("[SIMIAN PRESENCE CONNECTOR]: Failed to retrieve presence information for session " + sessionID + | ||
483 | " while saving last location: " + response["Message"].AsString()); | ||
484 | } | ||
485 | |||
486 | return success; | ||
487 | } | ||
488 | |||
489 | private bool SetLastLocation(UUID userID, UUID sceneID, Vector3 position, Vector3 lookAt) | ||
490 | { | ||
491 | NameValueCollection requestArgs = new NameValueCollection | ||
492 | { | ||
493 | { "RequestMethod", "AddUserData" }, | ||
494 | { "UserID", userID.ToString() }, | ||
495 | { "LastLocation", SerializeLocation(sceneID, position, lookAt) } | ||
496 | }; | ||
497 | |||
498 | OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs); | ||
499 | bool success = response["Success"].AsBoolean(); | ||
500 | |||
501 | if (!success) | 417 | if (!success) |
502 | m_log.Warn("[SIMIAN PRESENCE CONNECTOR]: Failed to set last location for " + userID + ": " + response["Message"].AsString()); | 418 | m_log.Warn("[SIMIAN PRESENCE CONNECTOR]: Failed to update agent session " + sessionID + ": " + response["Message"].AsString()); |
503 | 419 | ||
504 | return success; | 420 | return success; |
505 | } | 421 | } |
506 | 422 | ||
423 | ///// <summary> | ||
424 | ///// Fetch the last known avatar location with GetSession and persist it | ||
425 | ///// as user data with AddUserData | ||
426 | ///// </summary> | ||
427 | //private bool SetLastLocation(UUID sessionID) | ||
428 | //{ | ||
429 | // NameValueCollection requestArgs = new NameValueCollection | ||
430 | // { | ||
431 | // { "RequestMethod", "GetSession" }, | ||
432 | // { "SessionID", sessionID.ToString() } | ||
433 | // }; | ||
434 | |||
435 | // OSDMap response = WebUtil.PostToService(m_serverUrl, requestArgs); | ||
436 | // bool success = response["Success"].AsBoolean(); | ||
437 | |||
438 | // if (success) | ||
439 | // { | ||
440 | // UUID userID = response["UserID"].AsUUID(); | ||
441 | // UUID sceneID = response["SceneID"].AsUUID(); | ||
442 | // Vector3 position = response["ScenePosition"].AsVector3(); | ||
443 | // Vector3 lookAt = response["SceneLookAt"].AsVector3(); | ||
444 | |||
445 | // return SetLastLocation(userID, sceneID, position, lookAt); | ||
446 | // } | ||
447 | // else | ||
448 | // { | ||
449 | // m_log.Warn("[SIMIAN PRESENCE CONNECTOR]: Failed to retrieve presence information for session " + sessionID + | ||
450 | // " while saving last location: " + response["Message"].AsString()); | ||
451 | // } | ||
452 | |||
453 | // return success; | ||
454 | //} | ||
455 | |||
507 | private PresenceInfo ResponseToPresenceInfo(OSDMap sessionResponse, OSDMap userResponse) | 456 | private PresenceInfo ResponseToPresenceInfo(OSDMap sessionResponse, OSDMap userResponse) |
508 | { | 457 | { |
509 | if (sessionResponse == null) | 458 | if (sessionResponse == null) |
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs index 815816a..c059969 100644 --- a/OpenSim/Tests/Common/Mock/TestClient.cs +++ b/OpenSim/Tests/Common/Mock/TestClient.cs | |||
@@ -621,14 +621,6 @@ namespace OpenSim.Tests.Common.Mock | |||
621 | { | 621 | { |
622 | } | 622 | } |
623 | 623 | ||
624 | public virtual void SendAvatarData(SendAvatarData data) | ||
625 | { | ||
626 | } | ||
627 | |||
628 | public virtual void SendAvatarTerseUpdate(SendAvatarTerseData data) | ||
629 | { | ||
630 | } | ||
631 | |||
632 | public virtual void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations) | 624 | public virtual void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations) |
633 | { | 625 | { |
634 | } | 626 | } |
@@ -641,15 +633,15 @@ namespace OpenSim.Tests.Common.Mock | |||
641 | { | 633 | { |
642 | } | 634 | } |
643 | 635 | ||
644 | public virtual void SendPrimitiveToClient(SendPrimitiveData data) | 636 | public void SendAvatarDataImmediate(ISceneEntity avatar) |
645 | { | 637 | { |
646 | } | 638 | } |
647 | 639 | ||
648 | public virtual void SendPrimTerseUpdate(SendPrimitiveTerseData data) | 640 | public void SendPrimUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags) |
649 | { | 641 | { |
650 | } | 642 | } |
651 | 643 | ||
652 | public virtual void ReprioritizeUpdates(StateUpdateTypes type, UpdatePriorityHandler handler) | 644 | public void ReprioritizeUpdates(UpdatePriorityHandler handler) |
653 | { | 645 | { |
654 | } | 646 | } |
655 | 647 | ||
diff --git a/OpenSim/Tests/Common/Mock/TestLandChannel.cs b/OpenSim/Tests/Common/Mock/TestLandChannel.cs index be28c27..159764c 100644 --- a/OpenSim/Tests/Common/Mock/TestLandChannel.cs +++ b/OpenSim/Tests/Common/Mock/TestLandChannel.cs | |||
@@ -85,5 +85,9 @@ namespace OpenSim.Tests.Common.Mock | |||
85 | public void setParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel) {} | 85 | public void setParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel) {} |
86 | public void setSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel) {} | 86 | public void setSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel) {} |
87 | public void SetParcelOtherCleanTime(IClientAPI remoteClient, int localID, int otherCleanTime) {} | 87 | public void SetParcelOtherCleanTime(IClientAPI remoteClient, int localID, int otherCleanTime) {} |
88 | |||
89 | public void Join(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id) {} | ||
90 | public void Subdivide(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id) {} | ||
91 | |||
88 | } | 92 | } |
89 | } | 93 | } |