* Remove unused prims.ParentID field from SQLite and MySQL
* Since this is a db change, as always I strongly recommend that you backup your database before updating to this revision * Haven't touched MSSQL in case I get it wrong - looking for some kind soul to take care of this.0.6.3-post-fixes
parent
92e6bbcd63
commit
0828c28501
|
@ -934,7 +934,6 @@ VALUES
|
|||
prim.UUID = new UUID((String)primRow["UUID"]);
|
||||
// explicit conversion of integers is required, which sort
|
||||
// of sucks. No idea if there is a shortcut here or not.
|
||||
//prim.ParentID = (uint)Convert.ToInt32(primRow["ParentID"]);
|
||||
prim.CreationDate = Convert.ToInt32(primRow["CreationDate"]);
|
||||
prim.Name = (String)primRow["Name"];
|
||||
// various text fields
|
||||
|
@ -1315,7 +1314,6 @@ VALUES
|
|||
|
||||
parameters.Add(_Database.CreateParameter("UUID", prim.UUID));
|
||||
parameters.Add(_Database.CreateParameter("RegionUUID", regionUUID));
|
||||
//parameters.Add(_Database.CreateParameter("ParentID", (int)prim.ParentID));
|
||||
parameters.Add(_Database.CreateParameter("CreationDate", prim.CreationDate));
|
||||
parameters.Add(_Database.CreateParameter("Name", prim.Name));
|
||||
parameters.Add(_Database.CreateParameter("SceneGroupID", sceneGroupID));
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
BEGIN;
|
||||
|
||||
ALTER TABLE prims DROP COLUMN ParentID;
|
||||
|
||||
COMMIT;
|
|
@ -0,0 +1,8 @@
|
|||
BEGIN;
|
||||
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);
|
||||
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;
|
||||
DROP TABLE prims;
|
||||
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);
|
||||
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;
|
||||
DROP TABLE prims_backup;
|
||||
COMMIT;
|
|
@ -404,13 +404,12 @@ namespace OpenSim.Data.SQLite
|
|||
DataTable shapes = ds.Tables["primshapes"];
|
||||
|
||||
string byRegion = "RegionUUID = '" + Util.ToRawUuidString(regionUUID) + "'";
|
||||
string orderByParent = "ParentID ASC";
|
||||
|
||||
lock (ds)
|
||||
{
|
||||
DataRow[] primsForRegion = prims.Select(byRegion, orderByParent);
|
||||
m_log.Info("[REGION DB]: " +
|
||||
"Loaded " + primsForRegion.Length + " prims for region: " + regionUUID);
|
||||
DataRow[] primsForRegion = prims.Select(byRegion);
|
||||
m_log.Info("[REGION DB]: Loaded " + primsForRegion.Length + " prims for region: " + regionUUID);
|
||||
|
||||
// First, create all groups
|
||||
foreach (DataRow primRow in primsForRegion)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue