Thank you, StrawberryFride, for a patch that adds group permission support
to MSSQL. Contains a migration, back up your database.
0.6.1-post-fixes
Melanie Thielker 2008-11-14 19:36:29 +00:00
parent 1bd0721dbe
commit 5214d39e7c
3 changed files with 10 additions and 2 deletions

View File

@ -488,11 +488,11 @@ namespace OpenSim.Data.MSSQL
string sql = "INSERT INTO inventoryitems";
sql += "([inventoryID], [assetID], [assetType], [parentFolderID], [avatarID], [inventoryName]"
+ ", [inventoryDescription], [inventoryNextPermissions], [inventoryCurrentPermissions]"
+ ", [invType], [creatorID], [inventoryBasePermissions], [inventoryEveryOnePermissions]"
+ ", [invType], [creatorID], [inventoryBasePermissions], [inventoryEveryOnePermissions], [inventoryGroupPermissions]"
+ ", [salePrice], [saleType], [creationDate], [groupID], [groupOwned], [flags]) VALUES ";
sql += "(@inventoryID, @assetID, @assetType, @parentFolderID, @avatarID, @inventoryName, @inventoryDescription"
+ ", @inventoryNextPermissions, @inventoryCurrentPermissions, @invType, @creatorID"
+ ", @inventoryBasePermissions, @inventoryEveryOnePermissions, @salePrice, @saleType"
+ ", @inventoryBasePermissions, @inventoryEveryOnePermissions, @inventoryGroupPermissions, @salePrice, @saleType"
+ ", @creationDate, @groupID, @groupOwned, @flags);";
using (AutoClosingSqlCommand command = database.Query(sql))
@ -510,6 +510,7 @@ namespace OpenSim.Data.MSSQL
command.Parameters.Add(database.CreateParameter("creatorID", item.Creator));
command.Parameters.Add(database.CreateParameter("inventoryBasePermissions", item.BasePermissions));
command.Parameters.Add(database.CreateParameter("inventoryEveryOnePermissions", item.EveryOnePermissions));
command.Parameters.Add(database.CreateParameter("inventoryGroupPermissions", item.GroupPermissions));
command.Parameters.Add(database.CreateParameter("salePrice", item.SalePrice));
command.Parameters.Add(database.CreateParameter("saleType", item.SaleType));
command.Parameters.Add(database.CreateParameter("creationDate", item.CreationDate));
@ -786,6 +787,7 @@ namespace OpenSim.Data.MSSQL
item.Creator = new UUID(reader["creatorID"].ToString());
item.BasePermissions = Convert.ToUInt32(reader["inventoryBasePermissions"]);
item.EveryOnePermissions = Convert.ToUInt32(reader["inventoryEveryOnePermissions"]);
item.GroupPermissions = Convert.ToUInt32(reader["inventoryGroupPermissions"]);
item.SalePrice = Convert.ToInt32(reader["salePrice"]);
item.SaleType = Convert.ToByte(reader["saleType"]);
item.CreationDate = Convert.ToInt32(reader["creationDate"]);

View File

@ -679,6 +679,7 @@ namespace OpenSim.Data.MSSQL
/// <param name="appearance">the appearence</param>
override public void UpdateUserAppearance(UUID user, AvatarAppearance appearance)
{
m_log.Error("[USER DB] updating user appearance for user ID " + user.Guid.ToString());
string sql = String.Empty;
sql += "DELETE FROM avatarappearance WHERE owner=@owner ";
sql += "INSERT INTO avatarappearance ";

View File

@ -0,0 +1,5 @@
BEGIN TRANSACTION
ALTER TABLE inventoryitems ADD inventoryGroupPermissions INTEGER NOT NULL default 0
COMMIT