aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/SQLite
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/SQLite')
-rw-r--r--OpenSim/Data/SQLite/Resources/003_UserStore.sql6
-rw-r--r--OpenSim/Data/SQLite/SQLiteUserData.cs6
2 files changed, 12 insertions, 0 deletions
diff --git a/OpenSim/Data/SQLite/Resources/003_UserStore.sql b/OpenSim/Data/SQLite/Resources/003_UserStore.sql
new file mode 100644
index 0000000..6f890ee
--- /dev/null
+++ b/OpenSim/Data/SQLite/Resources/003_UserStore.sql
@@ -0,0 +1,6 @@
1BEGIN;
2
3ALTER TABLE users add userFlags integer NOT NULL default 0;
4ALTER TABLE users add godLevel integer NOT NULL default 0;
5
6COMMIT;
diff --git a/OpenSim/Data/SQLite/SQLiteUserData.cs b/OpenSim/Data/SQLite/SQLiteUserData.cs
index 21c9dbc..c55eee8 100644
--- a/OpenSim/Data/SQLite/SQLiteUserData.cs
+++ b/OpenSim/Data/SQLite/SQLiteUserData.cs
@@ -681,6 +681,8 @@ namespace OpenSim.Data.SQLite
681 SQLiteUtil.createCol(users, "profileImage", typeof (String)); 681 SQLiteUtil.createCol(users, "profileImage", typeof (String));
682 SQLiteUtil.createCol(users, "profileFirstImage", typeof (String)); 682 SQLiteUtil.createCol(users, "profileFirstImage", typeof (String));
683 SQLiteUtil.createCol(users, "webLoginKey", typeof(String)); 683 SQLiteUtil.createCol(users, "webLoginKey", typeof(String));
684 SQLiteUtil.createCol(users, "userFlags", typeof (Int32));
685 SQLiteUtil.createCol(users, "godLevel", typeof (Int32));
684 // Add in contraints 686 // Add in contraints
685 users.PrimaryKey = new DataColumn[] {users.Columns["UUID"]}; 687 users.PrimaryKey = new DataColumn[] {users.Columns["UUID"]};
686 return users; 688 return users;
@@ -789,6 +791,8 @@ namespace OpenSim.Data.SQLite
789 LLUUID.TryParse((String)row["profileFirstImage"], out tmp); 791 LLUUID.TryParse((String)row["profileFirstImage"], out tmp);
790 user.FirstLifeImage = tmp; 792 user.FirstLifeImage = tmp;
791 user.WebLoginKey = new LLUUID((String) row["webLoginKey"]); 793 user.WebLoginKey = new LLUUID((String) row["webLoginKey"]);
794 user.UserFlags = Convert.ToInt32(row["userFlags"]);
795 user.GodLevel = Convert.ToInt32(row["godLevel"]);
792 796
793 return user; 797 return user;
794 } 798 }
@@ -829,6 +833,8 @@ namespace OpenSim.Data.SQLite
829 row["profileImage"] = user.Image; 833 row["profileImage"] = user.Image;
830 row["profileFirstImage"] = user.FirstLifeImage; 834 row["profileFirstImage"] = user.FirstLifeImage;
831 row["webLoginKey"] = user.WebLoginKey; 835 row["webLoginKey"] = user.WebLoginKey;
836 row["userFlags"] = user.UserFlags;
837 row["godLevel"] = user.GodLevel;
832 838
833 // ADO.NET doesn't handle NULL very well 839 // ADO.NET doesn't handle NULL very well
834 foreach (DataColumn col in ds.Tables["users"].Columns) 840 foreach (DataColumn col in ds.Tables["users"].Columns)