From f272a023e2ba3d8b44852819b79ce7af1341a695 Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Mon, 21 Sep 2015 12:07:17 +0100
Subject: SQLite db migration update
---
.../Data/SQLite/Resources/RegionStore.migrations | 14 ++++++++
.../Data/SQLite/Resources/UserAccount.migrations | 8 +++++
OpenSim/Data/SQLite/SQLiteSimulationData.cs | 41 ++++++++++++++++++----
3 files changed, 57 insertions(+), 6 deletions(-)
(limited to 'OpenSim/Data')
diff --git a/OpenSim/Data/SQLite/Resources/RegionStore.migrations b/OpenSim/Data/SQLite/Resources/RegionStore.migrations
index 901068f..81c868a 100644
--- a/OpenSim/Data/SQLite/Resources/RegionStore.migrations
+++ b/OpenSim/Data/SQLite/Resources/RegionStore.migrations
@@ -612,3 +612,17 @@ ALTER TABLE primshapes ADD COLUMN LastAttachPoint int not null default '0';
COMMIT;
+:VERSION 31 #---- avination fields plus a few others
+
+BEGIN;
+
+ALTER TABLE `prims` ADD COLUMN `PassTouches` BOOLEAN NOT NULL DEFAULT FALSE;
+ALTER TABLE `prims` ADD COLUMN `PassCollisions`BOOLEAN NOT NULL DEFAULT FALSE;
+ALTER TABLE `prims` ADD COLUMN `Vehicle` TEXT default NULL;
+ALTER TABLE `regionsettings` ADD COLUMN `block_search` BOOLEAN NOT NULL DEFAULT FALSE;;
+ALTER TABLE `regionsettings` ADD COLUMN `casino` BOOLEAN NOT NULL DEFAULT FALSE;;
+ALTER TABLE `land` ADD COLUMN `SeeAVs` BOOLEAN NOT NULL DEFAULT TRUE;
+ALTER TABLE `land` ADD COLUMN `AnyAVSounds` BOOLEAN NOT NULL DEFAULT TRUE;
+ALTER TABLE `land` ADD COLUMN `GroupAVSounds` BOOLEAN NOT NULL DEFAULT TRUE;
+
+COMMIT;
\ No newline at end of file
diff --git a/OpenSim/Data/SQLite/Resources/UserAccount.migrations b/OpenSim/Data/SQLite/Resources/UserAccount.migrations
index 854fe69..f37a222 100644
--- a/OpenSim/Data/SQLite/Resources/UserAccount.migrations
+++ b/OpenSim/Data/SQLite/Resources/UserAccount.migrations
@@ -25,3 +25,11 @@ BEGIN TRANSACTION;
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;
COMMIT;
+
+:VERSION 3 # -------------------------
+
+BEGIN;
+
+ALTER TABLE `UserAccounts` ADD `active` BOOLEAN NOT NULL DEFAULT TRUE;
+
+COMMIT;
\ No newline at end of file
diff --git a/OpenSim/Data/SQLite/SQLiteSimulationData.cs b/OpenSim/Data/SQLite/SQLiteSimulationData.cs
index 70267de..9055218 100644
--- a/OpenSim/Data/SQLite/SQLiteSimulationData.cs
+++ b/OpenSim/Data/SQLite/SQLiteSimulationData.cs
@@ -1246,6 +1246,7 @@ namespace OpenSim.Data.SQLite
createCol(prims, "Restitution", typeof(Double));
createCol(prims, "KeyframeMotion", typeof(Byte[]));
+
// Add in contraints
prims.PrimaryKey = new DataColumn[] { prims.Columns["UUID"] };
@@ -1760,7 +1761,17 @@ namespace OpenSim.Data.SQLite
{
prim.KeyframeMotion = null;
}
-
+
+ prim.PassCollisions = Convert.ToBoolean(row["PassCollisions"]);
+ prim.PassTouches = Convert.ToBoolean(row["PassTouches"]);
+
+ SOPVehicle vehicle = null;
+ if (!(row["Vehicle"] is DBNull) && row["Vehicle"].ToString() != String.Empty)
+ {
+ vehicle = SOPVehicle.FromXml2(row["Vehicle"].ToString());
+ if (vehicle != null)
+ prim.VehicleParams = vehicle;
+ }
return prim;
}
@@ -1845,6 +1856,10 @@ namespace OpenSim.Data.SQLite
newData.MediaLoop = Convert.ToBoolean(row["MediaLoop"]);
newData.ObscureMedia = Convert.ToBoolean(row["ObscureMedia"]);
newData.ObscureMusic = Convert.ToBoolean(row["ObscureMusic"]);
+ newData.SeeAVs = Convert.ToBoolean(row["SeeAVs"]);
+ newData.AnyAVSounds = Convert.ToBoolean(row["AnyAVSounds"]);
+ newData.GroupAVSounds = Convert.ToBoolean(row["GroupAVSounds"]);
+
try
{
newData.UserLocation =
@@ -1918,7 +1933,8 @@ namespace OpenSim.Data.SQLite
newSettings.TerrainImageID = new UUID((String)row["map_tile_ID"]);
newSettings.TelehubObject = new UUID((String)row["TelehubObject"]);
newSettings.ParcelImageID = new UUID((String)row["parcel_tile_ID"]);
-
+ newSettings.GodBlockSearch = Convert.ToBoolean(row["block_search"]);
+ newSettings.Casino = Convert.ToBoolean(row["casino"]);
return newSettings;
}
@@ -2013,7 +2029,7 @@ namespace OpenSim.Data.SQLite
return entry;
}
-
+
///
///
///
@@ -2138,7 +2154,6 @@ namespace OpenSim.Data.SQLite
// click action
row["ClickAction"] = prim.ClickAction;
- row["SalePrice"] = prim.SalePrice;
row["Material"] = prim.Material;
row["CollisionSound"] = prim.CollisionSound.ToString();
@@ -2169,8 +2184,16 @@ namespace OpenSim.Data.SQLite
row["KeyframeMotion"] = prim.KeyframeMotion.Serialize();
else
row["KeyframeMotion"] = new Byte[0];
-
-
+
+
+ row["PassTouches"] = prim.PassTouches;
+ row["PassCollisions"] = prim.PassCollisions;
+
+ if (prim.VehicleParams != null)
+ row["Vehicle"] = prim.VehicleParams.ToXml2();
+ else
+ row["Vehicle"] = String.Empty;
+
}
///
@@ -2254,6 +2277,10 @@ namespace OpenSim.Data.SQLite
row["MediaLoop"] = land.MediaLoop;
row["ObscureMusic"] = land.ObscureMusic;
row["ObscureMedia"] = land.ObscureMedia;
+ row["SeeAVs"] = land.SeeAVs;
+ row["AnyAVSounds"] = land.AnyAVSounds;
+ row["GroupAVSounds"] = land.GroupAVSounds;
+
}
///
@@ -2312,6 +2339,8 @@ namespace OpenSim.Data.SQLite
row["map_tile_ID"] = settings.TerrainImageID.ToString();
row["TelehubObject"] = settings.TelehubObject.ToString();
row["parcel_tile_ID"] = settings.ParcelImageID.ToString();
+ row["block_search"] = settings.GodBlockSearch;
+ row["casino"] = settings.Casino;
}
///
--
cgit v1.1