aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/SQLite
diff options
context:
space:
mode:
authorUbitUmarov2015-09-21 12:07:17 +0100
committerUbitUmarov2015-09-21 12:07:17 +0100
commitf272a023e2ba3d8b44852819b79ce7af1341a695 (patch)
treeacf8faabb1acd8b10b8b4ad04f6687152d753084 /OpenSim/Data/SQLite
parent revert my change to the range of greyscale image maps, setting it back to 0 ... (diff)
downloadopensim-SC-f272a023e2ba3d8b44852819b79ce7af1341a695.zip
opensim-SC-f272a023e2ba3d8b44852819b79ce7af1341a695.tar.gz
opensim-SC-f272a023e2ba3d8b44852819b79ce7af1341a695.tar.bz2
opensim-SC-f272a023e2ba3d8b44852819b79ce7af1341a695.tar.xz
SQLite db migration update
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/SQLite/Resources/RegionStore.migrations14
-rw-r--r--OpenSim/Data/SQLite/Resources/UserAccount.migrations8
-rw-r--r--OpenSim/Data/SQLite/SQLiteSimulationData.cs41
3 files changed, 57 insertions, 6 deletions
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';
612 612
613COMMIT; 613COMMIT;
614 614
615:VERSION 31 #---- avination fields plus a few others
616
617BEGIN;
618
619ALTER TABLE `prims` ADD COLUMN `PassTouches` BOOLEAN NOT NULL DEFAULT FALSE;
620ALTER TABLE `prims` ADD COLUMN `PassCollisions`BOOLEAN NOT NULL DEFAULT FALSE;
621ALTER TABLE `prims` ADD COLUMN `Vehicle` TEXT default NULL;
622ALTER TABLE `regionsettings` ADD COLUMN `block_search` BOOLEAN NOT NULL DEFAULT FALSE;;
623ALTER TABLE `regionsettings` ADD COLUMN `casino` BOOLEAN NOT NULL DEFAULT FALSE;;
624ALTER TABLE `land` ADD COLUMN `SeeAVs` BOOLEAN NOT NULL DEFAULT TRUE;
625ALTER TABLE `land` ADD COLUMN `AnyAVSounds` BOOLEAN NOT NULL DEFAULT TRUE;
626ALTER TABLE `land` ADD COLUMN `GroupAVSounds` BOOLEAN NOT NULL DEFAULT TRUE;
627
628COMMIT; \ 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;
25INSERT 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; 25INSERT 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 26
27COMMIT; 27COMMIT;
28
29:VERSION 3 # -------------------------
30
31BEGIN;
32
33ALTER TABLE `UserAccounts` ADD `active` BOOLEAN NOT NULL DEFAULT TRUE;
34
35COMMIT; \ 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
1246 createCol(prims, "Restitution", typeof(Double)); 1246 createCol(prims, "Restitution", typeof(Double));
1247 1247
1248 createCol(prims, "KeyframeMotion", typeof(Byte[])); 1248 createCol(prims, "KeyframeMotion", typeof(Byte[]));
1249
1249 // Add in contraints 1250 // Add in contraints
1250 prims.PrimaryKey = new DataColumn[] { prims.Columns["UUID"] }; 1251 prims.PrimaryKey = new DataColumn[] { prims.Columns["UUID"] };
1251 1252
@@ -1760,7 +1761,17 @@ namespace OpenSim.Data.SQLite
1760 { 1761 {
1761 prim.KeyframeMotion = null; 1762 prim.KeyframeMotion = null;
1762 } 1763 }
1763 1764
1765 prim.PassCollisions = Convert.ToBoolean(row["PassCollisions"]);
1766 prim.PassTouches = Convert.ToBoolean(row["PassTouches"]);
1767
1768 SOPVehicle vehicle = null;
1769 if (!(row["Vehicle"] is DBNull) && row["Vehicle"].ToString() != String.Empty)
1770 {
1771 vehicle = SOPVehicle.FromXml2(row["Vehicle"].ToString());
1772 if (vehicle != null)
1773 prim.VehicleParams = vehicle;
1774 }
1764 return prim; 1775 return prim;
1765 } 1776 }
1766 1777
@@ -1845,6 +1856,10 @@ namespace OpenSim.Data.SQLite
1845 newData.MediaLoop = Convert.ToBoolean(row["MediaLoop"]); 1856 newData.MediaLoop = Convert.ToBoolean(row["MediaLoop"]);
1846 newData.ObscureMedia = Convert.ToBoolean(row["ObscureMedia"]); 1857 newData.ObscureMedia = Convert.ToBoolean(row["ObscureMedia"]);
1847 newData.ObscureMusic = Convert.ToBoolean(row["ObscureMusic"]); 1858 newData.ObscureMusic = Convert.ToBoolean(row["ObscureMusic"]);
1859 newData.SeeAVs = Convert.ToBoolean(row["SeeAVs"]);
1860 newData.AnyAVSounds = Convert.ToBoolean(row["AnyAVSounds"]);
1861 newData.GroupAVSounds = Convert.ToBoolean(row["GroupAVSounds"]);
1862
1848 try 1863 try
1849 { 1864 {
1850 newData.UserLocation = 1865 newData.UserLocation =
@@ -1918,7 +1933,8 @@ namespace OpenSim.Data.SQLite
1918 newSettings.TerrainImageID = new UUID((String)row["map_tile_ID"]); 1933 newSettings.TerrainImageID = new UUID((String)row["map_tile_ID"]);
1919 newSettings.TelehubObject = new UUID((String)row["TelehubObject"]); 1934 newSettings.TelehubObject = new UUID((String)row["TelehubObject"]);
1920 newSettings.ParcelImageID = new UUID((String)row["parcel_tile_ID"]); 1935 newSettings.ParcelImageID = new UUID((String)row["parcel_tile_ID"]);
1921 1936 newSettings.GodBlockSearch = Convert.ToBoolean(row["block_search"]);
1937 newSettings.Casino = Convert.ToBoolean(row["casino"]);
1922 return newSettings; 1938 return newSettings;
1923 } 1939 }
1924 1940
@@ -2013,7 +2029,7 @@ namespace OpenSim.Data.SQLite
2013 return entry; 2029 return entry;
2014 } 2030 }
2015 2031
2016 2032
2017 /// <summary> 2033 /// <summary>
2018 /// 2034 ///
2019 /// </summary> 2035 /// </summary>
@@ -2138,7 +2154,6 @@ namespace OpenSim.Data.SQLite
2138 // click action 2154 // click action
2139 row["ClickAction"] = prim.ClickAction; 2155 row["ClickAction"] = prim.ClickAction;
2140 2156
2141 row["SalePrice"] = prim.SalePrice;
2142 row["Material"] = prim.Material; 2157 row["Material"] = prim.Material;
2143 2158
2144 row["CollisionSound"] = prim.CollisionSound.ToString(); 2159 row["CollisionSound"] = prim.CollisionSound.ToString();
@@ -2169,8 +2184,16 @@ namespace OpenSim.Data.SQLite
2169 row["KeyframeMotion"] = prim.KeyframeMotion.Serialize(); 2184 row["KeyframeMotion"] = prim.KeyframeMotion.Serialize();
2170 else 2185 else
2171 row["KeyframeMotion"] = new Byte[0]; 2186 row["KeyframeMotion"] = new Byte[0];
2172 2187
2173 2188
2189 row["PassTouches"] = prim.PassTouches;
2190 row["PassCollisions"] = prim.PassCollisions;
2191
2192 if (prim.VehicleParams != null)
2193 row["Vehicle"] = prim.VehicleParams.ToXml2();
2194 else
2195 row["Vehicle"] = String.Empty;
2196
2174 } 2197 }
2175 2198
2176 /// <summary> 2199 /// <summary>
@@ -2254,6 +2277,10 @@ namespace OpenSim.Data.SQLite
2254 row["MediaLoop"] = land.MediaLoop; 2277 row["MediaLoop"] = land.MediaLoop;
2255 row["ObscureMusic"] = land.ObscureMusic; 2278 row["ObscureMusic"] = land.ObscureMusic;
2256 row["ObscureMedia"] = land.ObscureMedia; 2279 row["ObscureMedia"] = land.ObscureMedia;
2280 row["SeeAVs"] = land.SeeAVs;
2281 row["AnyAVSounds"] = land.AnyAVSounds;
2282 row["GroupAVSounds"] = land.GroupAVSounds;
2283
2257 } 2284 }
2258 2285
2259 /// <summary> 2286 /// <summary>
@@ -2312,6 +2339,8 @@ namespace OpenSim.Data.SQLite
2312 row["map_tile_ID"] = settings.TerrainImageID.ToString(); 2339 row["map_tile_ID"] = settings.TerrainImageID.ToString();
2313 row["TelehubObject"] = settings.TelehubObject.ToString(); 2340 row["TelehubObject"] = settings.TelehubObject.ToString();
2314 row["parcel_tile_ID"] = settings.ParcelImageID.ToString(); 2341 row["parcel_tile_ID"] = settings.ParcelImageID.ToString();
2342 row["block_search"] = settings.GodBlockSearch;
2343 row["casino"] = settings.Casino;
2315 } 2344 }
2316 2345
2317 /// <summary> 2346 /// <summary>