From 3465a5772a1cecc322685c71f5cf97e81371517c Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Wed, 27 Aug 2008 19:24:48 +0000 Subject: cleaning out cruft from pre-Migration days --- OpenSim/Data/SQLite/SQLiteUserData.cs | 104 +--------------------------------- 1 file changed, 1 insertion(+), 103 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Data/SQLite/SQLiteUserData.cs b/OpenSim/Data/SQLite/SQLiteUserData.cs index 0fddc42..ae3cb72 100644 --- a/OpenSim/Data/SQLite/SQLiteUserData.cs +++ b/OpenSim/Data/SQLite/SQLiteUserData.cs @@ -93,10 +93,6 @@ namespace OpenSim.Data.SQLite Assembly assem = GetType().Assembly; Migration m = new Migration(g_conn, assem, "UserStore"); - - // TODO: remove this after rev 6000 - TestTables(conn, m); - m.Update(); @@ -114,17 +110,7 @@ namespace OpenSim.Data.SQLite da.Fill(ds.Tables["users"]); setupUserFriendsCommands(daf, conn); - try - { - daf.Fill(ds.Tables["userfriends"]); - } - catch (SqliteSyntaxException) - { - m_log.Info("[USER DB]: userfriends table not found, creating.... "); - InitDB(conn); - daf.Fill(ds.Tables["userfriends"]); - } - + daf.Fill(ds.Tables["userfriends"]); } return; @@ -920,94 +906,6 @@ namespace OpenSim.Data.SQLite } - /// - /// - /// - /// - private static void InitDB(SqliteConnection conn) - { - string createUsers = SQLiteUtil.defineTable(createUsersTable()); - string createFriends = SQLiteUtil.defineTable(createUserFriendsTable()); - - SqliteCommand pcmd = new SqliteCommand(createUsers, conn); - SqliteCommand fcmd = new SqliteCommand(createFriends, conn); - - conn.Open(); - - try - { - - pcmd.ExecuteNonQuery(); - } - catch (Exception) - { - m_log.Info("[USER DB]: users table already exists"); - } - - try - { - fcmd.ExecuteNonQuery(); - } - catch (Exception) - { - m_log.Info("[USER DB]: userfriends table already exists"); - } - - conn.Close(); - } - - /// - /// - /// - /// - /// - /// - private static bool TestTables(SqliteConnection conn, Migration m) - { - SqliteCommand cmd = new SqliteCommand(userSelect, conn); - // SqliteCommand fcmd = new SqliteCommand(userFriendsSelect, conn); - SqliteDataAdapter pDa = new SqliteDataAdapter(cmd); - SqliteDataAdapter fDa = new SqliteDataAdapter(cmd); - - DataSet tmpDS = new DataSet(); - DataSet tmpDS2 = new DataSet(); - - try - { - pDa.Fill(tmpDS, "users"); - fDa.Fill(tmpDS2, "userfriends"); - } - catch (SqliteSyntaxException) - { - m_log.Info("[USER DB]: SQLite Database doesn't exist... creating"); - return false; - } - - if (m.Version == 0) - m.Version = 1; - - return true; - - // conn.Open(); - // try - // { - // cmd = new SqliteCommand("select webLoginKey from users limit 1;", conn); - // cmd.ExecuteNonQuery(); - // } - // catch (SqliteSyntaxException) - // { - // cmd = new SqliteCommand("alter table users add column webLoginKey text default '00000000-0000-0000-0000-000000000000';", conn); - // cmd.ExecuteNonQuery(); - // pDa.Fill(tmpDS, "users"); - // } - // finally - // { - // conn.Close(); - // } - - // return true; - } - override public void ResetAttachments(LLUUID userID) { } -- cgit v1.1