From 6c1fce61473b8d3faf9ee4602b9d0a392f148b7c Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Wed, 11 Jun 2008 21:01:33 +0000 Subject: 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. --- OpenSim/Data/Migration.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'OpenSim/Data/Migration.cs') 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 public int Version { get { return FindVersion(_type); } - set { UpdateVersion(_type, value); } + set { + if (Version < 1) { + InsertVersion(_type, value); + } else { + UpdateVersion(_type, value); + } + } } private int FindVersion(string type) -- cgit v1.1