aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/SQLite
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/SQLite/Resources/XInventoryStore.migrations4
-rw-r--r--OpenSim/Data/SQLite/SQLiteAssetData.cs8
-rw-r--r--OpenSim/Data/SQLite/SQLiteAuthenticationData.cs7
-rw-r--r--OpenSim/Data/SQLite/SQLiteEstateData.cs8
-rw-r--r--OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs10
-rw-r--r--OpenSim/Data/SQLite/SQLiteSimulationData.cs8
-rw-r--r--OpenSim/Data/SQLite/SQLiteXInventoryData.cs2
7 files changed, 33 insertions, 14 deletions
diff --git a/OpenSim/Data/SQLite/Resources/XInventoryStore.migrations b/OpenSim/Data/SQLite/Resources/XInventoryStore.migrations
index d5b3019..de44982 100644
--- a/OpenSim/Data/SQLite/Resources/XInventoryStore.migrations
+++ b/OpenSim/Data/SQLite/Resources/XInventoryStore.migrations
@@ -41,11 +41,9 @@ COMMIT;
41 41
42:VERSION 2 42:VERSION 2
43 43
44ATTACH 'inventoryStore.db' AS old;
45
46BEGIN TRANSACTION; 44BEGIN TRANSACTION;
47 45
48INSERT INTO inventoryfolders (folderName, type, version, folderID, agentID, parentFolderID) SELECT `name` AS folderName, `type` AS type, `version` AS version, `UUID` AS folderID, `agentID` AS agentID, `parentID` AS parentFolderID from old.inventoryfolders; 46INSERT INTO inventoryfolders (folderName, type, version, folderID, agentID, parentFolderID) SELECT `name` AS folderName, `type` AS type, `version` AS version, `UUID` AS folderID, `agentID` AS agentID, `parentID` AS parentFolderID from old.inventoryfolders;
49INSERT INTO inventoryitems (assetID, assetType, inventoryName, inventoryDescription, inventoryNextPermissions, inventoryCurrentPermissions, invType, creatorID, inventoryBasePermissions, inventoryEveryOnePermissions, salePrice, saleType, creationDate, groupID, groupOwned, flags, inventoryID, parentFolderID, avatarID, inventoryGroupPermissions) SELECT `assetID`, `assetType` AS assetType, `inventoryName` AS inventoryName, `inventoryDescription` AS inventoryDescription, `inventoryNextPermissions` AS inventoryNextPermissions, `inventoryCurrentPermissions` AS inventoryCurrentPermissions, `invType` AS invType, `creatorsID` AS creatorID, `inventoryBasePermissions` AS inventoryBasePermissions, `inventoryEveryOnePermissions` AS inventoryEveryOnePermissions, `salePrice` AS salePrice, `saleType` AS saleType, `creationDate` AS creationDate, `groupID` AS groupID, `groupOwned` AS groupOwned, `flags` AS flags, `UUID` AS inventoryID, `parentFolderID` AS parentFolderID, `avatarID` AS avatarID, `inventoryGroupPermissions` AS inventoryGroupPermissions FROM old.inventoryitems; 47INSERT INTO inventoryitems (assetID, assetType, inventoryName, inventoryDescription, inventoryNextPermissions, inventoryCurrentPermissions, invType, creatorID, inventoryBasePermissions, inventoryEveryOnePermissions, salePrice, saleType, creationDate, groupID, groupOwned, flags, inventoryID, parentFolderID, avatarID, inventoryGroupPermissions) SELECT `assetID`, `assetType` AS assetType, `inventoryName` AS inventoryName, `inventoryDescription` AS inventoryDescription, `inventoryNextPermissions` AS inventoryNextPermissions, `inventoryCurrentPermissions` AS inventoryCurrentPermissions, `invType` AS invType, `creatorsID` AS creatorID, `inventoryBasePermissions` AS inventoryBasePermissions, `inventoryEveryOnePermissions` AS inventoryEveryOnePermissions, `salePrice` AS salePrice, `saleType` AS saleType, `creationDate` AS creationDate, `groupID` AS groupID, `groupOwned` AS groupOwned, `flags` AS flags, `UUID` AS inventoryID, `parentFolderID` AS parentFolderID, `avatarID` AS avatarID, `inventoryGroupPermissions` AS inventoryGroupPermissions FROM old.inventoryitems;
50 48
51COMMIT; \ No newline at end of file 49COMMIT;
diff --git a/OpenSim/Data/SQLite/SQLiteAssetData.cs b/OpenSim/Data/SQLite/SQLiteAssetData.cs
index 9a4eb76..723544a 100644
--- a/OpenSim/Data/SQLite/SQLiteAssetData.cs
+++ b/OpenSim/Data/SQLite/SQLiteAssetData.cs
@@ -57,6 +57,11 @@ namespace OpenSim.Data.SQLite
57 57
58 private SqliteConnection m_conn; 58 private SqliteConnection m_conn;
59 59
60 protected virtual Assembly Assembly
61 {
62 get { return GetType().Assembly; }
63 }
64
60 override public void Dispose() 65 override public void Dispose()
61 { 66 {
62 if (m_conn != null) 67 if (m_conn != null)
@@ -83,8 +88,7 @@ namespace OpenSim.Data.SQLite
83 m_conn = new SqliteConnection(dbconnect); 88 m_conn = new SqliteConnection(dbconnect);
84 m_conn.Open(); 89 m_conn.Open();
85 90
86 Assembly assem = GetType().Assembly; 91 Migration m = new Migration(m_conn, Assembly, "AssetStore");
87 Migration m = new Migration(m_conn, assem, "AssetStore");
88 m.Update(); 92 m.Update();
89 93
90 return; 94 return;
diff --git a/OpenSim/Data/SQLite/SQLiteAuthenticationData.cs b/OpenSim/Data/SQLite/SQLiteAuthenticationData.cs
index c3b65bb..f51aa28 100644
--- a/OpenSim/Data/SQLite/SQLiteAuthenticationData.cs
+++ b/OpenSim/Data/SQLite/SQLiteAuthenticationData.cs
@@ -53,6 +53,11 @@ namespace OpenSim.Data.SQLite
53 protected static SqliteConnection m_Connection; 53 protected static SqliteConnection m_Connection;
54 private static bool m_initialized = false; 54 private static bool m_initialized = false;
55 55
56 protected virtual Assembly Assembly
57 {
58 get { return GetType().Assembly; }
59 }
60
56 public SQLiteAuthenticationData(string connectionString, string realm) 61 public SQLiteAuthenticationData(string connectionString, string realm)
57 : base(connectionString) 62 : base(connectionString)
58 { 63 {
@@ -63,7 +68,7 @@ namespace OpenSim.Data.SQLite
63 m_Connection = new SqliteConnection(connectionString); 68 m_Connection = new SqliteConnection(connectionString);
64 m_Connection.Open(); 69 m_Connection.Open();
65 70
66 Migration m = new Migration(m_Connection, GetType().Assembly, "AuthStore"); 71 Migration m = new Migration(m_Connection, Assembly, "AuthStore");
67 m.Update(); 72 m.Update();
68 73
69 m_initialized = true; 74 m_initialized = true;
diff --git a/OpenSim/Data/SQLite/SQLiteEstateData.cs b/OpenSim/Data/SQLite/SQLiteEstateData.cs
index 2f05a6e..65719a6 100644
--- a/OpenSim/Data/SQLite/SQLiteEstateData.cs
+++ b/OpenSim/Data/SQLite/SQLiteEstateData.cs
@@ -53,6 +53,11 @@ namespace OpenSim.Data.SQLite
53 private Dictionary<string, FieldInfo> m_FieldMap = 53 private Dictionary<string, FieldInfo> m_FieldMap =
54 new Dictionary<string, FieldInfo>(); 54 new Dictionary<string, FieldInfo>();
55 55
56 protected virtual Assembly Assembly
57 {
58 get { return GetType().Assembly; }
59 }
60
56 public SQLiteEstateStore() 61 public SQLiteEstateStore()
57 { 62 {
58 } 63 }
@@ -71,8 +76,7 @@ namespace OpenSim.Data.SQLite
71 m_connection = new SqliteConnection(m_connectionString); 76 m_connection = new SqliteConnection(m_connectionString);
72 m_connection.Open(); 77 m_connection.Open();
73 78
74 Assembly assem = GetType().Assembly; 79 Migration m = new Migration(m_connection, Assembly, "EstateStore");
75 Migration m = new Migration(m_connection, assem, "EstateStore");
76 m.Update(); 80 m.Update();
77 81
78 //m_connection.Close(); 82 //m_connection.Close();
diff --git a/OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs b/OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs
index 0d7ae1f..4f977a8 100644
--- a/OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs
+++ b/OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs
@@ -55,6 +55,11 @@ namespace OpenSim.Data.SQLite
55 protected static SqliteConnection m_Connection; 55 protected static SqliteConnection m_Connection;
56 private static bool m_initialized; 56 private static bool m_initialized;
57 57
58 protected virtual Assembly Assembly
59 {
60 get { return GetType().Assembly; }
61 }
62
58 public SQLiteGenericTableHandler(string connectionString, 63 public SQLiteGenericTableHandler(string connectionString,
59 string realm, string storeName) : base(connectionString) 64 string realm, string storeName) : base(connectionString)
60 { 65 {
@@ -68,13 +73,12 @@ namespace OpenSim.Data.SQLite
68 73
69 if (storeName != String.Empty) 74 if (storeName != String.Empty)
70 { 75 {
71 Assembly assem = GetType().Assembly;
72 //SqliteConnection newConnection = 76 //SqliteConnection newConnection =
73 // (SqliteConnection)((ICloneable)m_Connection).Clone(); 77 // (SqliteConnection)((ICloneable)m_Connection).Clone();
74 //newConnection.Open(); 78 //newConnection.Open();
75 79
76 //Migration m = new Migration(newConnection, assem, storeName); 80 //Migration m = new Migration(newConnection, Assembly, storeName);
77 Migration m = new Migration(m_Connection, assem, storeName); 81 Migration m = new Migration(m_Connection, Assembly, storeName);
78 m.Update(); 82 m.Update();
79 //newConnection.Close(); 83 //newConnection.Close();
80 //newConnection.Dispose(); 84 //newConnection.Dispose();
diff --git a/OpenSim/Data/SQLite/SQLiteSimulationData.cs b/OpenSim/Data/SQLite/SQLiteSimulationData.cs
index 377c680..5618772 100644
--- a/OpenSim/Data/SQLite/SQLiteSimulationData.cs
+++ b/OpenSim/Data/SQLite/SQLiteSimulationData.cs
@@ -74,6 +74,11 @@ namespace OpenSim.Data.SQLite
74 74
75 private String m_connectionString; 75 private String m_connectionString;
76 76
77 protected virtual Assembly Assembly
78 {
79 get { return GetType().Assembly; }
80 }
81
77 public SQLiteSimulationData() 82 public SQLiteSimulationData()
78 { 83 {
79 } 84 }
@@ -132,8 +137,7 @@ namespace OpenSim.Data.SQLite
132 SqliteCommand regionSettingsSelectCmd = new SqliteCommand(regionSettingsSelect, m_conn); 137 SqliteCommand regionSettingsSelectCmd = new SqliteCommand(regionSettingsSelect, m_conn);
133 regionSettingsDa = new SqliteDataAdapter(regionSettingsSelectCmd); 138 regionSettingsDa = new SqliteDataAdapter(regionSettingsSelectCmd);
134 // This actually does the roll forward assembly stuff 139 // This actually does the roll forward assembly stuff
135 Assembly assem = GetType().Assembly; 140 Migration m = new Migration(m_conn, Assembly, "RegionStore");
136 Migration m = new Migration(m_conn, assem, "RegionStore");
137 m.Update(); 141 m.Update();
138 142
139 lock (ds) 143 lock (ds)
diff --git a/OpenSim/Data/SQLite/SQLiteXInventoryData.cs b/OpenSim/Data/SQLite/SQLiteXInventoryData.cs
index 02edc30..16f9046 100644
--- a/OpenSim/Data/SQLite/SQLiteXInventoryData.cs
+++ b/OpenSim/Data/SQLite/SQLiteXInventoryData.cs
@@ -41,7 +41,7 @@ using OpenSim.Framework;
41namespace OpenSim.Data.SQLite 41namespace OpenSim.Data.SQLite
42{ 42{
43 /// <summary> 43 /// <summary>
44 /// A MySQL Interface for the Asset Server 44 /// A SQLite Interface for the Asset Server
45 /// </summary> 45 /// </summary>
46 public class SQLiteXInventoryData : IXInventoryData 46 public class SQLiteXInventoryData : IXInventoryData
47 { 47 {