aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/Migration.cs
diff options
context:
space:
mode:
authorMelanie Thielker2008-09-01 17:10:01 +0000
committerMelanie Thielker2008-09-01 17:10:01 +0000
commitb6bb5f944f19b330656105ff79cd5ca3f2d5c242 (patch)
tree433ee8a24136ac10ed63dc3cf715b16ba786b8a8 /OpenSim/Data/Migration.cs
parentMantis #2072 (diff)
downloadopensim-SC-b6bb5f944f19b330656105ff79cd5ca3f2d5c242.zip
opensim-SC-b6bb5f944f19b330656105ff79cd5ca3f2d5c242.tar.gz
opensim-SC-b6bb5f944f19b330656105ff79cd5ca3f2d5c242.tar.bz2
opensim-SC-b6bb5f944f19b330656105ff79cd5ca3f2d5c242.tar.xz
Mantis #2095
Thank you, RuudL, for a complete adaptation of migration and estate data to MSSQL, and the updating of the RegionData handling in MSSQL.
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/Migration.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/OpenSim/Data/Migration.cs b/OpenSim/Data/Migration.cs
index ecd18ae..8e4cba3 100644
--- a/OpenSim/Data/Migration.cs
+++ b/OpenSim/Data/Migration.cs
@@ -103,7 +103,7 @@ namespace OpenSim.Data
103 private void Initialize() 103 private void Initialize()
104 { 104 {
105 // clever, eh, we figure out which migrations version we are 105 // clever, eh, we figure out which migrations version we are
106 int migration_version = FindVersion("migrations"); 106 int migration_version = FindVersion(_conn, "migrations");
107 107
108 if (migration_version > 0) 108 if (migration_version > 0)
109 return; 109 return;
@@ -119,7 +119,7 @@ namespace OpenSim.Data
119 public void Update() 119 public void Update()
120 { 120 {
121 int version = 0; 121 int version = 0;
122 version = FindVersion(_type); 122 version = FindVersion(_conn, _type);
123 123
124 SortedList<int, string> migrations = GetMigrationsAfter(version); 124 SortedList<int, string> migrations = GetMigrationsAfter(version);
125 if (migrations.Count < 1) 125 if (migrations.Count < 1)
@@ -170,7 +170,7 @@ namespace OpenSim.Data
170 170
171 public int Version 171 public int Version
172 { 172 {
173 get { return FindVersion(_type); } 173 get { return FindVersion(_conn, _type); }
174 set { 174 set {
175 if (Version < 1) 175 if (Version < 1)
176 { 176 {
@@ -183,10 +183,10 @@ namespace OpenSim.Data
183 } 183 }
184 } 184 }
185 185
186 private int FindVersion(string type) 186 protected virtual int FindVersion(DbConnection conn, string type)
187 { 187 {
188 int version = 0; 188 int version = 0;
189 DbCommand cmd = _conn.CreateCommand(); 189 DbCommand cmd = conn.CreateCommand();
190 try 190 try
191 { 191 {
192 cmd.CommandText = "select version from migrations where name='" + type + "' limit 1"; 192 cmd.CommandText = "select version from migrations where name='" + type + "' limit 1";