diff --git a/OpenSim/Data/Tests/BasicDataServiceTest.cs b/OpenSim/Data/Tests/BasicDataServiceTest.cs
index 82f29d6a02..e91a45d8bb 100644
--- a/OpenSim/Data/Tests/BasicDataServiceTest.cs
+++ b/OpenSim/Data/Tests/BasicDataServiceTest.cs
@@ -167,5 +167,46 @@ namespace OpenSim.Data.Tests
}
}
}
+
+ /// Clear tables listed as parameters (without dropping them).
+ ///
+ ///
+ protected virtual void ResetMigrations(params string[] stores)
+ {
+ string lst = "";
+ foreach (string store in stores)
+ {
+ string s = "'" + store + "'";
+ if (lst == "")
+ lst = s;
+ else
+ lst += ", " + s;
+ }
+
+ try
+ {
+ ExecuteSql("DELETE FROM `migrations` where name in (" + lst + ");");
+ }
+ catch
+ {
+ }
+ }
+
+ /// Clear tables listed as parameters (without dropping them).
+ ///
+ ///
+ protected virtual void ClearTables(params string[] tables)
+ {
+ foreach (string tbl in tables)
+ {
+ try
+ {
+ ExecuteSql("DELETE FROM " + tbl + ";");
+ }
+ catch
+ {
+ }
+ }
+ }
}
}