aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/Migration.cs
diff options
context:
space:
mode:
authorSean Dague2008-06-11 21:01:33 +0000
committerSean Dague2008-06-11 21:01:33 +0000
commit6c1fce61473b8d3faf9ee4602b9d0a392f148b7c (patch)
tree0cb0091493f725c0b06c2ceba493220eb85d507d /OpenSim/Data/Migration.cs
parentupdated resources for current sqlite schema for migrations (diff)
downloadopensim-SC_OLD-6c1fce61473b8d3faf9ee4602b9d0a392f148b7c.zip
opensim-SC_OLD-6c1fce61473b8d3faf9ee4602b9d0a392f148b7c.tar.gz
opensim-SC_OLD-6c1fce61473b8d3faf9ee4602b9d0a392f148b7c.tar.bz2
opensim-SC_OLD-6c1fce61473b8d3faf9ee4602b9d0a392f148b7c.tar.xz
check in working migration code fore SQLite. This
is now using migrations instead of the old model to create tables. Tested for existing old tables, and for creating new ones.
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/Migration.cs8
1 files changed, 7 insertions, 1 deletions
diff --git a/OpenSim/Data/Migration.cs b/OpenSim/Data/Migration.cs
index 83f4c3d..54d4970 100644
--- a/OpenSim/Data/Migration.cs
+++ b/OpenSim/Data/Migration.cs
@@ -159,7 +159,13 @@ namespace OpenSim.Data
159 public int Version 159 public int Version
160 { 160 {
161 get { return FindVersion(_type); } 161 get { return FindVersion(_type); }
162 set { UpdateVersion(_type, value); } 162 set {
163 if (Version < 1) {
164 InsertVersion(_type, value);
165 } else {
166 UpdateVersion(_type, value);
167 }
168 }
163 } 169 }
164 170
165 private int FindVersion(string type) 171 private int FindVersion(string type)