aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Data.SQLite/SQLiteUserData.cs')
-rw-r--r--OpenSim/Framework/Data.SQLite/SQLiteUserData.cs21
1 files changed, 21 insertions, 0 deletions
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs b/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs
index e9a8eca..cbbb349 100644
--- a/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs
+++ b/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs
@@ -549,6 +549,7 @@ namespace OpenSim.Framework.Data.SQLite
549 createCol(users, "profileFirstText", typeof (String)); 549 createCol(users, "profileFirstText", typeof (String));
550 createCol(users, "profileImage", typeof (String)); 550 createCol(users, "profileImage", typeof (String));
551 createCol(users, "profileFirstImage", typeof (String)); 551 createCol(users, "profileFirstImage", typeof (String));
552 createCol(users, "webLoginKey", typeof(String));
552 // Add in contraints 553 // Add in contraints
553 users.PrimaryKey = new DataColumn[] {users.Columns["UUID"]}; 554 users.PrimaryKey = new DataColumn[] {users.Columns["UUID"]};
554 return users; 555 return users;
@@ -635,6 +636,8 @@ namespace OpenSim.Framework.Data.SQLite
635 user.profileFirstText = (String) row["profileFirstText"]; 636 user.profileFirstText = (String) row["profileFirstText"];
636 user.profileImage = new LLUUID((String) row["profileImage"]); 637 user.profileImage = new LLUUID((String) row["profileImage"]);
637 user.profileFirstImage = new LLUUID((String) row["profileFirstImage"]); 638 user.profileFirstImage = new LLUUID((String) row["profileFirstImage"]);
639 user.webLoginKey = new LLUUID((String) row["webLoginKey"]);
640
638 return user; 641 return user;
639 } 642 }
640 643
@@ -681,6 +684,7 @@ namespace OpenSim.Framework.Data.SQLite
681 row["profileFirstText"] = user.profileFirstText; 684 row["profileFirstText"] = user.profileFirstText;
682 row["profileImage"] = user.profileImage; 685 row["profileImage"] = user.profileImage;
683 row["profileFirstImage"] = user.profileFirstImage; 686 row["profileFirstImage"] = user.profileFirstImage;
687 row["webLoginKey"] = user.webLoginKey;
684 688
685 // ADO.NET doesn't handle NULL very well 689 // ADO.NET doesn't handle NULL very well
686 foreach (DataColumn col in ds.Tables["users"].Columns) 690 foreach (DataColumn col in ds.Tables["users"].Columns)
@@ -825,6 +829,23 @@ namespace OpenSim.Framework.Data.SQLite
825 MainLog.Instance.Verbose("DATASTORE", "SQLite Database doesn't exist... creating"); 829 MainLog.Instance.Verbose("DATASTORE", "SQLite Database doesn't exist... creating");
826 InitDB(conn); 830 InitDB(conn);
827 } 831 }
832 conn.Open();
833 try
834 {
835 cmd = new SqliteCommand("select webLoginKey from users limit 1;", conn);
836 cmd.ExecuteNonQuery();
837 }
838 catch (SqliteSyntaxException)
839 {
840 cmd = new SqliteCommand("alter table users add column webLoginKey text default '00000000-0000-0000-0000-000000000000';", conn);
841 cmd.ExecuteNonQuery();
842 pDa.Fill(tmpDS, "users");
843 }
844 finally
845 {
846 conn.Close();
847 }
848
828 return true; 849 return true;
829 } 850 }
830 } 851 }