From b6bb5f944f19b330656105ff79cd5ca3f2d5c242 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Mon, 1 Sep 2008 17:10:01 +0000 Subject: 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. --- OpenSim/Data/Migration.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'OpenSim/Data/Migration.cs') 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 private void Initialize() { // clever, eh, we figure out which migrations version we are - int migration_version = FindVersion("migrations"); + int migration_version = FindVersion(_conn, "migrations"); if (migration_version > 0) return; @@ -119,7 +119,7 @@ namespace OpenSim.Data public void Update() { int version = 0; - version = FindVersion(_type); + version = FindVersion(_conn, _type); SortedList migrations = GetMigrationsAfter(version); if (migrations.Count < 1) @@ -170,7 +170,7 @@ namespace OpenSim.Data public int Version { - get { return FindVersion(_type); } + get { return FindVersion(_conn, _type); } set { if (Version < 1) { @@ -183,10 +183,10 @@ namespace OpenSim.Data } } - private int FindVersion(string type) + protected virtual int FindVersion(DbConnection conn, string type) { int version = 0; - DbCommand cmd = _conn.CreateCommand(); + DbCommand cmd = conn.CreateCommand(); try { cmd.CommandText = "select version from migrations where name='" + type + "' limit 1"; -- cgit v1.1