Update svn properties, clean up formatting, refactor out duplicate hard-coded port numbers.

This commit is contained in:
Jeff Ames
2008-06-13 00:21:53 +00:00
parent 1451d6fb9a
commit 64f01ade04
11 changed files with 74 additions and 94 deletions

View File

@@ -129,9 +129,12 @@ namespace OpenSim.Data
cmd.CommandText = kvp.Value;
cmd.ExecuteNonQuery();
if (version == 0) {
if (version == 0)
{
InsertVersion(_type, newversion);
} else {
}
else
{
UpdateVersion(_type, newversion);
}
version = newversion;
@@ -149,7 +152,7 @@ namespace OpenSim.Data
if (m.Success)
{
int MigrationVersion = int.Parse(m.Groups[1].ToString());
if ( MigrationVersion > max )
if (MigrationVersion > max)
max = MigrationVersion;
}
}
@@ -160,9 +163,12 @@ namespace OpenSim.Data
{
get { return FindVersion(_type); }
set {
if (Version < 1) {
if (Version < 1)
{
InsertVersion(_type, value);
} else {
}
else
{
UpdateVersion(_type, value);
}
}
@@ -172,7 +178,8 @@ namespace OpenSim.Data
{
int version = 0;
DbCommand cmd = _conn.CreateCommand();
try {
try
{
cmd.CommandText = "select version from migrations where name='" + type + "' limit 1";
using (IDataReader reader = cmd.ExecuteReader())
{
@@ -182,7 +189,9 @@ namespace OpenSim.Data
}
reader.Close();
}
} catch {
}
catch
{
// Something went wrong, so we're version 0
}
return version;

View File

@@ -132,7 +132,7 @@ namespace OpenSim.Data.MySQL
// if there are no tables, get out of here and let
// migrations do their job
if(
if (
tableList["inventoryfolders"] == null &&
tableList["inventoryitems"] == null
)

View File

@@ -138,7 +138,7 @@ namespace OpenSim.Data.MySQL
// if there are no tables, get out of here and let
// migrations do their job
if(
if (
tableList[m_agentsTableName] == null &&
tableList[m_usersTableName] == null &&
tableList[m_userFriendsTableName] == null &&