aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/MySQLLogData.cs
diff options
context:
space:
mode:
authorSean Dague2008-06-19 15:42:57 +0000
committerSean Dague2008-06-19 15:42:57 +0000
commitd28a5a4de78f79d2730d09d20a8284caef5339bf (patch)
treebb8591c996283ffa6127ce2896771a75ac017fa9 /OpenSim/Data/MySQL/MySQLLogData.cs
parentfix an edge case with migrations in the region store. (diff)
downloadopensim-SC-d28a5a4de78f79d2730d09d20a8284caef5339bf.zip
opensim-SC-d28a5a4de78f79d2730d09d20a8284caef5339bf.tar.gz
opensim-SC-d28a5a4de78f79d2730d09d20a8284caef5339bf.tar.bz2
opensim-SC-d28a5a4de78f79d2730d09d20a8284caef5339bf.tar.xz
add migrations support for mysql log store. This should complete
all the mysql bits for migration.
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLLogData.cs')
-rw-r--r--OpenSim/Data/MySQL/MySQLLogData.cs30
1 files changed, 30 insertions, 0 deletions
diff --git a/OpenSim/Data/MySQL/MySQLLogData.cs b/OpenSim/Data/MySQL/MySQLLogData.cs
index 2bd246a..2e6de7c 100644
--- a/OpenSim/Data/MySQL/MySQLLogData.cs
+++ b/OpenSim/Data/MySQL/MySQLLogData.cs
@@ -65,6 +65,36 @@ namespace OpenSim.Data.MySQL
65 database = new MySQLManager(settingHostname, settingDatabase, settingUsername, settingPassword, 65 database = new MySQLManager(settingHostname, settingDatabase, settingUsername, settingPassword,
66 settingPooling, settingPort); 66 settingPooling, settingPort);
67 } 67 }
68
69 // This actually does the roll forward assembly stuff
70 Assembly assem = GetType().Assembly;
71 Migration m = new Migration(database.Connection, assem, "LogStore");
72
73 // TODO: After rev 6000, remove this. People should have
74 // been rolled onto the new migration code by then.
75 TestTables(m);
76
77 m.Update();
78
79 }
80
81 private void TestTables(Migration m)
82 {
83 // under migrations, bail
84 if (m.Version > 0)
85 return;
86
87 Dictionary<string, string> tableList = new Dictionary<string, string>();
88 tableList["logs"] = null;
89 database.GetTableVersion(tableList);
90
91 // migrations will handle it
92 if (tableList["logs"] == null)
93 return;
94
95 // we have the table, so pretend like we did the first migration in the past
96 if (m.Version == 0)
97 m.Version = 1;
68 } 98 }
69 99
70 /// <summary> 100 /// <summary>