Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor

This commit is contained in:
Melanie
2011-06-20 03:08:56 +02:00
146 changed files with 8245 additions and 4443 deletions

View File

@@ -43,6 +43,11 @@ namespace OpenSim.Data.MySQL
}
public bool Delete(UUID principalID, string friend)
{
return Delete(principalID.ToString(), friend);
}
public bool Delete(string principalID, string friend)
{
MySqlCommand cmd = new MySqlCommand();
@@ -64,5 +69,14 @@ namespace OpenSim.Data.MySQL
return DoQuery(cmd);
}
public FriendsData[] GetFriends(string principalID)
{
MySqlCommand cmd = new MySqlCommand();
cmd.CommandText = String.Format("select a.*,case when b.Flags is null then -1 else b.Flags end as TheirFlags from {0} as a left join {0} as b on a.PrincipalID = b.Friend and a.Friend = b.PrincipalID where a.PrincipalID LIKE ?PrincipalID", m_Realm);
cmd.Parameters.AddWithValue("?PrincipalID", principalID.ToString() + '%');
return DoQuery(cmd);
}
}
}

View File

@@ -21,5 +21,12 @@ INSERT INTO `Friends` SELECT `ownerID`, `friendID`, `friendPerms`, 0 FROM `userf
COMMIT;
:VERSION 3 # -------------------------
BEGIN;
ALTER TABLE `Friends` MODIFY COLUMN PrincipalID varchar(255) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000';
ALTER TABLE `Friends` DROP PRIMARY KEY;
ALTER TABLE `Friends` ADD PRIMARY KEY(PrincipalID(36), Friend(36));
COMMIT;

View File

@@ -826,3 +826,19 @@ ALTER TABLE `prims` MODIFY COLUMN `CreatorID` VARCHAR(255) NOT NULL DEFAULT '';
ALTER TABLE `primitems` MODIFY COLUMN `CreatorID` VARCHAR(255) NOT NULL DEFAULT '';
COMMIT;
:VERSION 38 #---------------------
BEGIN;
alter table land ENGINE = MyISAM;
alter table landaccesslist ENGINE = MyISAM;
alter table migrations ENGINE = MyISAM;
alter table primitems ENGINE = MyISAM;
alter table prims ENGINE = MyISAM;
alter table primshapes ENGINE = MyISAM;
alter table regionban ENGINE = MyISAM;
alter table regionsettings ENGINE = MyISAM;
alter table terrain ENGINE = MyISAM;
COMMIT;