diff options
author | Sean Dague | 2009-02-18 12:56:28 +0000 |
---|---|---|
committer | Sean Dague | 2009-02-18 12:56:28 +0000 |
commit | 8d23d97084394202f46a377ff4e1a5d160c21c98 (patch) | |
tree | a3596d5df95683d58ad99203de76cef90d89d74c /OpenSim/Data/MySQL | |
parent | Improved log message. (diff) | |
download | opensim-SC-8d23d97084394202f46a377ff4e1a5d160c21c98.zip opensim-SC-8d23d97084394202f46a377ff4e1a5d160c21c98.tar.gz opensim-SC-8d23d97084394202f46a377ff4e1a5d160c21c98.tar.bz2 opensim-SC-8d23d97084394202f46a377ff4e1a5d160c21c98.tar.xz |
remove legacy pre-migration code for mysql grid adapter, who knew this
was still in there.
Diffstat (limited to 'OpenSim/Data/MySQL')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLGridData.cs | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/OpenSim/Data/MySQL/MySQLGridData.cs b/OpenSim/Data/MySQL/MySQLGridData.cs index 5c00330..75901b2 100644 --- a/OpenSim/Data/MySQL/MySQLGridData.cs +++ b/OpenSim/Data/MySQL/MySQLGridData.cs | |||
@@ -148,64 +148,9 @@ namespace OpenSim.Data.MySQL | |||
148 | // This actually does the roll forward assembly stuff | 148 | // This actually does the roll forward assembly stuff |
149 | Assembly assem = GetType().Assembly; | 149 | Assembly assem = GetType().Assembly; |
150 | Migration m = new Migration(database.Connection, assem, "GridStore"); | 150 | Migration m = new Migration(database.Connection, assem, "GridStore"); |
151 | |||
152 | // TODO: After rev 6000, remove this. People should have | ||
153 | // been rolled onto the new migration code by then. | ||
154 | TestTables(m); | ||
155 | |||
156 | m.Update(); | 151 | m.Update(); |
157 | } | 152 | } |
158 | 153 | ||
159 | #region Test and initialization code | ||
160 | |||
161 | /// <summary> | ||
162 | /// Ensure that the user related tables exists and are at the latest version | ||
163 | /// </summary> | ||
164 | private void TestTables(Migration m) | ||
165 | { | ||
166 | // we already have migrations, get out of here | ||
167 | if (m.Version > 0) | ||
168 | return; | ||
169 | |||
170 | Dictionary<string, string> tableList = new Dictionary<string, string>(); | ||
171 | |||
172 | tableList["regions"] = null; | ||
173 | database.GetTableVersion(tableList); | ||
174 | |||
175 | UpgradeRegionsTable(tableList["regions"]); | ||
176 | |||
177 | // we have tables, but not a migration model yet | ||
178 | if (m.Version == 0) | ||
179 | m.Version = 1; | ||
180 | } | ||
181 | |||
182 | /// <summary> | ||
183 | /// Create or upgrade the table if necessary | ||
184 | /// </summary> | ||
185 | /// <param name="oldVersion">A null indicates that the table does not | ||
186 | /// currently exist</param> | ||
187 | private void UpgradeRegionsTable(string oldVersion) | ||
188 | { | ||
189 | // null as the version, indicates that the table didn't exist | ||
190 | if (oldVersion == null) | ||
191 | { | ||
192 | database.ExecuteResourceSql("CreateRegionsTable.sql"); | ||
193 | return; | ||
194 | } | ||
195 | if (oldVersion.Contains("Rev. 1")) | ||
196 | { | ||
197 | database.ExecuteResourceSql("UpgradeRegionsTableToVersion2.sql"); | ||
198 | return; | ||
199 | } | ||
200 | if (oldVersion.Contains("Rev. 2")) | ||
201 | { | ||
202 | database.ExecuteResourceSql("UpgradeRegionsTableToVersion3.sql"); | ||
203 | return; | ||
204 | } | ||
205 | } | ||
206 | |||
207 | #endregion | ||
208 | |||
209 | /// <summary> | 154 | /// <summary> |
210 | /// Shuts down the grid interface | 155 | /// Shuts down the grid interface |
211 | /// </summary> | 156 | /// </summary> |