diff options
Diffstat (limited to 'OpenSim/Data/PGSQL')
-rw-r--r-- | OpenSim/Data/PGSQL/PGSQLEstateData.cs | 10 | ||||
-rw-r--r-- | OpenSim/Data/PGSQL/PGSQLGenericTableHandler.cs | 49 | ||||
-rw-r--r-- | OpenSim/Data/PGSQL/PGSQLGroupsData.cs | 4 | ||||
-rw-r--r-- | OpenSim/Data/PGSQL/PGSQLRegionData.cs | 21 | ||||
-rw-r--r-- | OpenSim/Data/PGSQL/PGSQLSimulationData.cs | 39 | ||||
-rw-r--r-- | OpenSim/Data/PGSQL/PGSQLUserProfilesData.cs | 2 | ||||
-rw-r--r-- | OpenSim/Data/PGSQL/Resources/EstateStore.migrations | 8 | ||||
-rw-r--r-- | OpenSim/Data/PGSQL/Resources/RegionStore.migrations | 7 |
8 files changed, 121 insertions, 19 deletions
diff --git a/OpenSim/Data/PGSQL/PGSQLEstateData.cs b/OpenSim/Data/PGSQL/PGSQLEstateData.cs index 9489d6c..16e56fa 100644 --- a/OpenSim/Data/PGSQL/PGSQLEstateData.cs +++ b/OpenSim/Data/PGSQL/PGSQLEstateData.cs | |||
@@ -286,7 +286,7 @@ namespace OpenSim.Data.PGSQL | |||
286 | { | 286 | { |
287 | es.ClearBans(); | 287 | es.ClearBans(); |
288 | 288 | ||
289 | string sql = "select \"bannedUUID\" from estateban where \"EstateID\" = :EstateID"; | 289 | string sql = "select * from estateban where \"EstateID\" = :EstateID"; |
290 | 290 | ||
291 | using (NpgsqlConnection conn = new NpgsqlConnection(m_connectionString)) | 291 | using (NpgsqlConnection conn = new NpgsqlConnection(m_connectionString)) |
292 | using (NpgsqlCommand cmd = new NpgsqlCommand(sql, conn)) | 292 | using (NpgsqlCommand cmd = new NpgsqlCommand(sql, conn)) |
@@ -302,6 +302,8 @@ namespace OpenSim.Data.PGSQL | |||
302 | EstateBan eb = new EstateBan(); | 302 | EstateBan eb = new EstateBan(); |
303 | 303 | ||
304 | eb.BannedUserID = new UUID((Guid)reader["bannedUUID"]); //uuid; | 304 | eb.BannedUserID = new UUID((Guid)reader["bannedUUID"]); //uuid; |
305 | eb.BanningUserID = new UUID((Guid)reader["banningUUID"]); //uuid; | ||
306 | eb.BanTime = Convert.ToInt32(reader["banTime"]); | ||
305 | eb.BannedHostAddress = "0.0.0.0"; | 307 | eb.BannedHostAddress = "0.0.0.0"; |
306 | eb.BannedHostIPMask = "0.0.0.0"; | 308 | eb.BannedHostIPMask = "0.0.0.0"; |
307 | es.AddBan(eb); | 309 | es.AddBan(eb); |
@@ -346,11 +348,15 @@ namespace OpenSim.Data.PGSQL | |||
346 | cmd.ExecuteNonQuery(); | 348 | cmd.ExecuteNonQuery(); |
347 | 349 | ||
348 | //Insert after | 350 | //Insert after |
349 | cmd.CommandText = "insert into estateban (\"EstateID\", \"bannedUUID\",\"bannedIp\", \"bannedIpHostMask\", \"bannedNameMask\") values ( :EstateID, :bannedUUID, '','','' )"; | 351 | cmd.CommandText = "insert into estateban (\"EstateID\", \"bannedUUID\",\"bannedIp\", \"bannedIpHostMask\", \"bannedNameMask\", \"banningUUID\",\"banTime\" ) values ( :EstateID, :bannedUUID, '','','', :banningUUID, :banTime )"; |
350 | cmd.Parameters.AddWithValue("bannedUUID", Guid.Empty); | 352 | cmd.Parameters.AddWithValue("bannedUUID", Guid.Empty); |
351 | foreach (EstateBan b in es.EstateBans) | 353 | foreach (EstateBan b in es.EstateBans) |
352 | { | 354 | { |
355 | cmd.Parameters["EstateID"].Value = b.EstateID; | ||
353 | cmd.Parameters["bannedUUID"].Value = b.BannedUserID.Guid; | 356 | cmd.Parameters["bannedUUID"].Value = b.BannedUserID.Guid; |
357 | cmd.Parameters["banningUUID"].Value = b.BanningUserID.Guid; | ||
358 | cmd.Parameters["banTime"].Value = b.BanTime; | ||
359 | |||
354 | cmd.ExecuteNonQuery(); | 360 | cmd.ExecuteNonQuery(); |
355 | } | 361 | } |
356 | } | 362 | } |
diff --git a/OpenSim/Data/PGSQL/PGSQLGenericTableHandler.cs b/OpenSim/Data/PGSQL/PGSQLGenericTableHandler.cs index 5b24720..a89183b 100644 --- a/OpenSim/Data/PGSQL/PGSQLGenericTableHandler.cs +++ b/OpenSim/Data/PGSQL/PGSQLGenericTableHandler.cs | |||
@@ -180,7 +180,54 @@ namespace OpenSim.Data.PGSQL | |||
180 | 180 | ||
181 | public virtual T[] Get(string field, string key) | 181 | public virtual T[] Get(string field, string key) |
182 | { | 182 | { |
183 | return Get(new string[] { field }, new string[] { key }); | 183 | using (NpgsqlConnection conn = new NpgsqlConnection(m_ConnectionString)) |
184 | using (NpgsqlCommand cmd = new NpgsqlCommand()) | ||
185 | { | ||
186 | if ( m_FieldTypes.ContainsKey(field) ) | ||
187 | cmd.Parameters.Add(m_database.CreateParameter(field, key, m_FieldTypes[field])); | ||
188 | else | ||
189 | cmd.Parameters.Add(m_database.CreateParameter(field, key)); | ||
190 | |||
191 | string query = String.Format("SELECT * FROM {0} WHERE \"{1}\" = :{1}", m_Realm, field, field); | ||
192 | |||
193 | cmd.Connection = conn; | ||
194 | cmd.CommandText = query; | ||
195 | conn.Open(); | ||
196 | return DoQuery(cmd); | ||
197 | } | ||
198 | } | ||
199 | |||
200 | public virtual T[] Get(string field, string[] keys) | ||
201 | { | ||
202 | |||
203 | int flen = keys.Length; | ||
204 | if(flen == 0) | ||
205 | return new T[0]; | ||
206 | |||
207 | int flast = flen - 1; | ||
208 | StringBuilder sb = new StringBuilder(1024); | ||
209 | sb.AppendFormat("select * from {0} where {1} IN ('", m_Realm, field); | ||
210 | |||
211 | using (NpgsqlConnection conn = new NpgsqlConnection(m_ConnectionString)) | ||
212 | using (NpgsqlCommand cmd = new NpgsqlCommand()) | ||
213 | { | ||
214 | |||
215 | for (int i = 0 ; i < flen ; i++) | ||
216 | { | ||
217 | sb.Append(keys[i]); | ||
218 | if(i < flast) | ||
219 | sb.Append("','"); | ||
220 | else | ||
221 | sb.Append("')"); | ||
222 | } | ||
223 | |||
224 | string query = sb.ToString(); | ||
225 | |||
226 | cmd.Connection = conn; | ||
227 | cmd.CommandText = query; | ||
228 | conn.Open(); | ||
229 | return DoQuery(cmd); | ||
230 | } | ||
184 | } | 231 | } |
185 | 232 | ||
186 | public virtual T[] Get(string[] fields, string[] keys) | 233 | public virtual T[] Get(string[] fields, string[] keys) |
diff --git a/OpenSim/Data/PGSQL/PGSQLGroupsData.cs b/OpenSim/Data/PGSQL/PGSQLGroupsData.cs index f398256..04e2f69 100644 --- a/OpenSim/Data/PGSQL/PGSQLGroupsData.cs +++ b/OpenSim/Data/PGSQL/PGSQLGroupsData.cs | |||
@@ -86,13 +86,13 @@ namespace OpenSim.Data.PGSQL | |||
86 | 86 | ||
87 | if (string.IsNullOrEmpty(pattern)) // True for where clause | 87 | if (string.IsNullOrEmpty(pattern)) // True for where clause |
88 | { | 88 | { |
89 | pattern = " 1 ORDER BY lower(\"Name\") LIMIT 100"; | 89 | pattern = "1"; |
90 | 90 | ||
91 | return m_Groups.Get(pattern); | 91 | return m_Groups.Get(pattern); |
92 | } | 92 | } |
93 | else | 93 | else |
94 | { | 94 | { |
95 | pattern = " \"ShowInList\" = 1 AND lower(\"Name\") LIKE lower('%" + pattern + "%') ORDER BY lower(\"Name\") LIMIT 100"; | 95 | pattern = " \"ShowInList\" = 1 AND lower(\"Name\") LIKE lower('%" + pattern + "%')"; |
96 | 96 | ||
97 | return m_Groups.Get(pattern, new NpgsqlParameter("pattern", pattern)); | 97 | return m_Groups.Get(pattern, new NpgsqlParameter("pattern", pattern)); |
98 | } | 98 | } |
diff --git a/OpenSim/Data/PGSQL/PGSQLRegionData.cs b/OpenSim/Data/PGSQL/PGSQLRegionData.cs index 1272e37..a58fc8a 100644 --- a/OpenSim/Data/PGSQL/PGSQLRegionData.cs +++ b/OpenSim/Data/PGSQL/PGSQLRegionData.cs | |||
@@ -114,6 +114,27 @@ namespace OpenSim.Data.PGSQL | |||
114 | } | 114 | } |
115 | } | 115 | } |
116 | 116 | ||
117 | public RegionData GetSpecific(string regionName, UUID scopeID) | ||
118 | { | ||
119 | string sql = "select * from " + m_Realm + " where lower(\"regionName\") = lower(:regionName) "; | ||
120 | if (scopeID != UUID.Zero) | ||
121 | sql += " and \"ScopeID\" = :scopeID"; | ||
122 | |||
123 | using (NpgsqlConnection conn = new NpgsqlConnection(m_ConnectionString)) | ||
124 | using (NpgsqlCommand cmd = new NpgsqlCommand(sql, conn)) | ||
125 | { | ||
126 | cmd.Parameters.Add(m_database.CreateParameter("regionName", regionName)); | ||
127 | if (scopeID != UUID.Zero) | ||
128 | cmd.Parameters.Add(m_database.CreateParameter("scopeID", scopeID)); | ||
129 | conn.Open(); | ||
130 | List<RegionData> ret = RunCommand(cmd); | ||
131 | if (ret.Count == 0) | ||
132 | return null; | ||
133 | |||
134 | return ret[0]; | ||
135 | } | ||
136 | } | ||
137 | |||
117 | public RegionData Get(int posX, int posY, UUID scopeID) | 138 | public RegionData Get(int posX, int posY, UUID scopeID) |
118 | { | 139 | { |
119 | // extend database search for maximum region size area | 140 | // extend database search for maximum region size area |
diff --git a/OpenSim/Data/PGSQL/PGSQLSimulationData.cs b/OpenSim/Data/PGSQL/PGSQLSimulationData.cs index f4af40b..99ceb91 100644 --- a/OpenSim/Data/PGSQL/PGSQLSimulationData.cs +++ b/OpenSim/Data/PGSQL/PGSQLSimulationData.cs | |||
@@ -353,7 +353,7 @@ namespace OpenSim.Data.PGSQL | |||
353 | ""PhysicsShapeType"" = :PhysicsShapeType, ""Density"" = :Density, ""GravityModifier"" = :GravityModifier, ""Friction"" = :Friction, ""Restitution"" = :Restitution, | 353 | ""PhysicsShapeType"" = :PhysicsShapeType, ""Density"" = :Density, ""GravityModifier"" = :GravityModifier, ""Friction"" = :Friction, ""Restitution"" = :Restitution, |
354 | ""PassCollisions"" = :PassCollisions, ""RotationAxisLocks"" = :RotationAxisLocks, ""RezzerID"" = :RezzerID, | 354 | ""PassCollisions"" = :PassCollisions, ""RotationAxisLocks"" = :RotationAxisLocks, ""RezzerID"" = :RezzerID, |
355 | ""ClickAction"" = :ClickAction, ""Material"" = :Material, ""CollisionSound"" = :CollisionSound, ""CollisionSoundVolume"" = :CollisionSoundVolume, ""PassTouches"" = :PassTouches, | 355 | ""ClickAction"" = :ClickAction, ""Material"" = :Material, ""CollisionSound"" = :CollisionSound, ""CollisionSoundVolume"" = :CollisionSoundVolume, ""PassTouches"" = :PassTouches, |
356 | ""LinkNumber"" = :LinkNumber, ""MediaURL"" = :MediaURL, ""DynAttrs"" = :DynAttrs, | 356 | ""LinkNumber"" = :LinkNumber, ""MediaURL"" = :MediaURL, ""DynAttrs"" = :DynAttrs, ""Vehicle"" = :Vehicle, |
357 | ""PhysInertia"" = :PhysInertia | 357 | ""PhysInertia"" = :PhysInertia |
358 | WHERE ""UUID"" = :UUID ; | 358 | WHERE ""UUID"" = :UUID ; |
359 | 359 | ||
@@ -368,7 +368,7 @@ namespace OpenSim.Data.PGSQL | |||
368 | ""OmegaY"", ""OmegaZ"", ""CameraEyeOffsetX"", ""CameraEyeOffsetY"", ""CameraEyeOffsetZ"", ""CameraAtOffsetX"", ""CameraAtOffsetY"", ""CameraAtOffsetZ"", | 368 | ""OmegaY"", ""OmegaZ"", ""CameraEyeOffsetX"", ""CameraEyeOffsetY"", ""CameraEyeOffsetZ"", ""CameraAtOffsetX"", ""CameraAtOffsetY"", ""CameraAtOffsetZ"", |
369 | ""ForceMouselook"", ""ScriptAccessPin"", ""AllowedDrop"", ""DieAtEdge"", ""SalePrice"", ""SaleType"", ""ColorR"", ""ColorG"", ""ColorB"", ""ColorA"", | 369 | ""ForceMouselook"", ""ScriptAccessPin"", ""AllowedDrop"", ""DieAtEdge"", ""SalePrice"", ""SaleType"", ""ColorR"", ""ColorG"", ""ColorB"", ""ColorA"", |
370 | ""ParticleSystem"", ""ClickAction"", ""Material"", ""CollisionSound"", ""CollisionSoundVolume"", ""PassTouches"", ""LinkNumber"", ""MediaURL"", ""DynAttrs"", | 370 | ""ParticleSystem"", ""ClickAction"", ""Material"", ""CollisionSound"", ""CollisionSoundVolume"", ""PassTouches"", ""LinkNumber"", ""MediaURL"", ""DynAttrs"", |
371 | ""PhysicsShapeType"", ""Density"", ""GravityModifier"", ""Friction"", ""Restitution"", ""PassCollisions"", ""RotationAxisLocks"", ""RezzerID"" , ""PhysInertia"" | 371 | ""PhysicsShapeType"", ""Density"", ""GravityModifier"", ""Friction"", ""Restitution"", ""PassCollisions"", ""RotationAxisLocks"", ""RezzerID"" , ""Vehicle"", ""PhysInertia"" |
372 | ) Select | 372 | ) Select |
373 | :UUID, :CreationDate, :Name, :Text, :Description, :SitName, :TouchName, :ObjectFlags, :OwnerMask, :NextOwnerMask, :GroupMask, | 373 | :UUID, :CreationDate, :Name, :Text, :Description, :SitName, :TouchName, :ObjectFlags, :OwnerMask, :NextOwnerMask, :GroupMask, |
374 | :EveryoneMask, :BaseMask, :PositionX, :PositionY, :PositionZ, :GroupPositionX, :GroupPositionY, :GroupPositionZ, :VelocityX, | 374 | :EveryoneMask, :BaseMask, :PositionX, :PositionY, :PositionZ, :GroupPositionX, :GroupPositionY, :GroupPositionZ, :VelocityX, |
@@ -379,7 +379,7 @@ namespace OpenSim.Data.PGSQL | |||
379 | :OmegaY, :OmegaZ, :CameraEyeOffsetX, :CameraEyeOffsetY, :CameraEyeOffsetZ, :CameraAtOffsetX, :CameraAtOffsetY, :CameraAtOffsetZ, | 379 | :OmegaY, :OmegaZ, :CameraEyeOffsetX, :CameraEyeOffsetY, :CameraEyeOffsetZ, :CameraAtOffsetX, :CameraAtOffsetY, :CameraAtOffsetZ, |
380 | :ForceMouselook, :ScriptAccessPin, :AllowedDrop, :DieAtEdge, :SalePrice, :SaleType, :ColorR, :ColorG, :ColorB, :ColorA, | 380 | :ForceMouselook, :ScriptAccessPin, :AllowedDrop, :DieAtEdge, :SalePrice, :SaleType, :ColorR, :ColorG, :ColorB, :ColorA, |
381 | :ParticleSystem, :ClickAction, :Material, :CollisionSound, :CollisionSoundVolume, :PassTouches, :LinkNumber, :MediaURL, :DynAttrs, | 381 | :ParticleSystem, :ClickAction, :Material, :CollisionSound, :CollisionSoundVolume, :PassTouches, :LinkNumber, :MediaURL, :DynAttrs, |
382 | :PhysicsShapeType, :Density, :GravityModifier, :Friction, :Restitution, :PassCollisions, :RotationAxisLocks, :RezzerID, :PhysInertia | 382 | :PhysicsShapeType, :Density, :GravityModifier, :Friction, :Restitution, :PassCollisions, :RotationAxisLocks, :RezzerID, :Vehicle, :PhysInertia |
383 | where not EXISTS (SELECT ""UUID"" FROM prims WHERE ""UUID"" = :UUID); | 383 | where not EXISTS (SELECT ""UUID"" FROM prims WHERE ""UUID"" = :UUID); |
384 | "; | 384 | "; |
385 | 385 | ||
@@ -610,7 +610,7 @@ namespace OpenSim.Data.PGSQL | |||
610 | // Legacy entry point for when terrain was always a 256x256 heightmap | 610 | // Legacy entry point for when terrain was always a 256x256 heightmap |
611 | public void StoreTerrain(double[,] terrain, UUID regionID) | 611 | public void StoreTerrain(double[,] terrain, UUID regionID) |
612 | { | 612 | { |
613 | StoreTerrain(new HeightmapTerrainData(terrain), regionID); | 613 | StoreTerrain(new TerrainData(terrain), regionID); |
614 | } | 614 | } |
615 | 615 | ||
616 | /// <summary> | 616 | /// <summary> |
@@ -1742,7 +1742,10 @@ namespace OpenSim.Data.PGSQL | |||
1742 | 1742 | ||
1743 | prim.Sound = new UUID((Guid)primRow["LoopedSound"]); | 1743 | prim.Sound = new UUID((Guid)primRow["LoopedSound"]); |
1744 | prim.SoundGain = Convert.ToSingle(primRow["LoopedSoundGain"]); | 1744 | prim.SoundGain = Convert.ToSingle(primRow["LoopedSoundGain"]); |
1745 | prim.SoundFlags = 1; // If it's persisted at all, it's looped | 1745 | if (prim.Sound != UUID.Zero) |
1746 | prim.SoundFlags = 1; // If it's persisted at all, it's looped | ||
1747 | else | ||
1748 | prim.SoundFlags = 0; | ||
1746 | 1749 | ||
1747 | if (!(primRow["TextureAnimation"] is DBNull)) | 1750 | if (!(primRow["TextureAnimation"] is DBNull)) |
1748 | prim.TextureAnimation = (Byte[])primRow["TextureAnimation"]; | 1751 | prim.TextureAnimation = (Byte[])primRow["TextureAnimation"]; |
@@ -1797,7 +1800,7 @@ namespace OpenSim.Data.PGSQL | |||
1797 | if (!(primRow["DynAttrs"] is System.DBNull) && (string)primRow["DynAttrs"] != "") | 1800 | if (!(primRow["DynAttrs"] is System.DBNull) && (string)primRow["DynAttrs"] != "") |
1798 | prim.DynAttrs = DAMap.FromXml((string)primRow["DynAttrs"]); | 1801 | prim.DynAttrs = DAMap.FromXml((string)primRow["DynAttrs"]); |
1799 | else | 1802 | else |
1800 | prim.DynAttrs = new DAMap(); | 1803 | prim.DynAttrs = null; |
1801 | 1804 | ||
1802 | prim.PhysicsShapeType = Convert.ToByte(primRow["PhysicsShapeType"]); | 1805 | prim.PhysicsShapeType = Convert.ToByte(primRow["PhysicsShapeType"]); |
1803 | prim.Density = Convert.ToSingle(primRow["Density"]); | 1806 | prim.Density = Convert.ToSingle(primRow["Density"]); |
@@ -1805,8 +1808,15 @@ namespace OpenSim.Data.PGSQL | |||
1805 | prim.Friction = Convert.ToSingle(primRow["Friction"]); | 1808 | prim.Friction = Convert.ToSingle(primRow["Friction"]); |
1806 | prim.Restitution = Convert.ToSingle(primRow["Restitution"]); | 1809 | prim.Restitution = Convert.ToSingle(primRow["Restitution"]); |
1807 | prim.RotationAxisLocks = Convert.ToByte(primRow["RotationAxisLocks"]); | 1810 | prim.RotationAxisLocks = Convert.ToByte(primRow["RotationAxisLocks"]); |
1808 | 1811 | ||
1809 | 1812 | SOPVehicle vehicle = null; | |
1813 | if (!(primRow["Vehicle"] is System.DBNull)) | ||
1814 | { | ||
1815 | vehicle = SOPVehicle.FromXml2(primRow["Vehicle"].ToString()); | ||
1816 | if (vehicle != null) | ||
1817 | prim.VehicleParams = vehicle; | ||
1818 | } | ||
1819 | |||
1810 | PhysicsInertiaData pdata = null; | 1820 | PhysicsInertiaData pdata = null; |
1811 | if (!(primRow["PhysInertia"] is System.DBNull)) | 1821 | if (!(primRow["PhysInertia"] is System.DBNull)) |
1812 | pdata = PhysicsInertiaData.FromXml2(primRow["PhysInertia"].ToString()); | 1822 | pdata = PhysicsInertiaData.FromXml2(primRow["PhysInertia"].ToString()); |
@@ -2214,8 +2224,7 @@ namespace OpenSim.Data.PGSQL | |||
2214 | 2224 | ||
2215 | parameters.Add(_Database.CreateParameter("PassTouches", (bool)prim.PassTouches)); | 2225 | parameters.Add(_Database.CreateParameter("PassTouches", (bool)prim.PassTouches)); |
2216 | parameters.Add(_Database.CreateParameter("PassCollisions", (bool)prim.PassCollisions)); | 2226 | parameters.Add(_Database.CreateParameter("PassCollisions", (bool)prim.PassCollisions)); |
2217 | 2227 | ||
2218 | |||
2219 | if (prim.PassTouches) | 2228 | if (prim.PassTouches) |
2220 | parameters.Add(_Database.CreateParameter("PassTouches", true)); | 2229 | parameters.Add(_Database.CreateParameter("PassTouches", true)); |
2221 | else | 2230 | else |
@@ -2228,14 +2237,18 @@ namespace OpenSim.Data.PGSQL | |||
2228 | 2237 | ||
2229 | parameters.Add(_Database.CreateParameter("LinkNumber", prim.LinkNum)); | 2238 | parameters.Add(_Database.CreateParameter("LinkNumber", prim.LinkNum)); |
2230 | parameters.Add(_Database.CreateParameter("MediaURL", prim.MediaUrl)); | 2239 | parameters.Add(_Database.CreateParameter("MediaURL", prim.MediaUrl)); |
2231 | 2240 | ||
2241 | if (prim.VehicleParams != null) | ||
2242 | parameters.Add(_Database.CreateParameter("Vehicle", prim.VehicleParams.ToXml2())); | ||
2243 | else | ||
2244 | parameters.Add(_Database.CreateParameter("Vehicle", String.Empty)); | ||
2245 | |||
2232 | if (prim.PhysicsInertia != null) | 2246 | if (prim.PhysicsInertia != null) |
2233 | parameters.Add(_Database.CreateParameter("PhysInertia", prim.PhysicsInertia.ToXml2())); | 2247 | parameters.Add(_Database.CreateParameter("PhysInertia", prim.PhysicsInertia.ToXml2())); |
2234 | else | 2248 | else |
2235 | parameters.Add(_Database.CreateParameter("PhysInertia", String.Empty)); | 2249 | parameters.Add(_Database.CreateParameter("PhysInertia", String.Empty)); |
2236 | 2250 | ||
2237 | 2251 | if (prim.DynAttrs != null && prim.DynAttrs.CountNamespaces > 0) | |
2238 | if (prim.DynAttrs.CountNamespaces > 0) | ||
2239 | parameters.Add(_Database.CreateParameter("DynAttrs", prim.DynAttrs.ToXml())); | 2252 | parameters.Add(_Database.CreateParameter("DynAttrs", prim.DynAttrs.ToXml())); |
2240 | else | 2253 | else |
2241 | parameters.Add(_Database.CreateParameter("DynAttrs", null)); | 2254 | parameters.Add(_Database.CreateParameter("DynAttrs", null)); |
diff --git a/OpenSim/Data/PGSQL/PGSQLUserProfilesData.cs b/OpenSim/Data/PGSQL/PGSQLUserProfilesData.cs index 75a51e2..5800de9 100644 --- a/OpenSim/Data/PGSQL/PGSQLUserProfilesData.cs +++ b/OpenSim/Data/PGSQL/PGSQLUserProfilesData.cs | |||
@@ -845,7 +845,7 @@ namespace OpenSim.Data.PGSQL | |||
845 | 845 | ||
846 | query = "SELECT \"profileImage\", \"profileFirstImage\" FROM \"userprofile\" WHERE \"useruuid\" = :Id"; | 846 | query = "SELECT \"profileImage\", \"profileFirstImage\" FROM \"userprofile\" WHERE \"useruuid\" = :Id"; |
847 | 847 | ||
848 | using (NpgsqlCommand cmd = new NpgsqlCommand(string.Format(query, "\"userpicks\""), dbcon)) | 848 | using (NpgsqlCommand cmd = new NpgsqlCommand(query, dbcon)) |
849 | { | 849 | { |
850 | cmd.Parameters.Add(m_database.CreateParameter("Id", avatarId)); | 850 | cmd.Parameters.Add(m_database.CreateParameter("Id", avatarId)); |
851 | 851 | ||
diff --git a/OpenSim/Data/PGSQL/Resources/EstateStore.migrations b/OpenSim/Data/PGSQL/Resources/EstateStore.migrations index 5b450aa..d0730bb 100644 --- a/OpenSim/Data/PGSQL/Resources/EstateStore.migrations +++ b/OpenSim/Data/PGSQL/Resources/EstateStore.migrations | |||
@@ -125,3 +125,11 @@ CREATE SEQUENCE IF NOT EXISTS "public"."estate_settings_id" | |||
125 | CACHE 1; | 125 | CACHE 1; |
126 | 126 | ||
127 | COMMIT; | 127 | COMMIT; |
128 | |||
129 | :VERSION 14 | ||
130 | BEGIN TRANSACTION; | ||
131 | |||
132 | ALTER TABLE "public"."estateban" | ||
133 | ADD COLUMN "banningUUID" uuid NOT NULL, | ||
134 | ADD COLUMN "banTime" int4 NOT NULL DEFAULT 0; | ||
135 | COMMIT; | ||
diff --git a/OpenSim/Data/PGSQL/Resources/RegionStore.migrations b/OpenSim/Data/PGSQL/Resources/RegionStore.migrations index fcefb6b..58e84f7 100644 --- a/OpenSim/Data/PGSQL/Resources/RegionStore.migrations +++ b/OpenSim/Data/PGSQL/Resources/RegionStore.migrations | |||
@@ -1225,3 +1225,10 @@ ALTER TABLE "public"."prims" | |||
1225 | ELSE NULL | 1225 | ELSE NULL |
1226 | END; | 1226 | END; |
1227 | COMMIT; | 1227 | COMMIT; |
1228 | |||
1229 | :VERSION 48 #---- field Vehicle to table prims | ||
1230 | |||
1231 | BEGIN TRANSACTION; | ||
1232 | |||
1233 | ALTER TABLE prims ADD "Vehicle" TEXT; | ||
1234 | COMMIT; | ||