Merge branch 'master' of git://opensimulator.org/git/opensim
commit
7f9bb06b03
|
@ -9,6 +9,14 @@
|
|||
*.pdb
|
||||
*.pidb
|
||||
*.dll.build
|
||||
*.dll
|
||||
*.VisualState.xml
|
||||
*/*/obj
|
||||
*/*/*/obj
|
||||
*/*/*/*/obj
|
||||
*/*/*/*/*/obj
|
||||
*/*/*/*/*/*/obj
|
||||
*/*/*/*/*/*/*/obj
|
||||
*/*/bin
|
||||
*/*/*/bin
|
||||
*/*/*/*/bin
|
||||
|
@ -45,6 +53,7 @@ bin/OpenSim.Grid.InventoryServer.log
|
|||
bin/OpenSim.Grid.MessagingServer.log
|
||||
bin/OpenSim.Grid.UserServer.log
|
||||
bin/OpenSim.log
|
||||
bin/*.manifest
|
||||
bin/crashes/
|
||||
Examples/*.dll
|
||||
OpenSim.build
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
<property name="distbindir" value="distbin" />
|
||||
<target name="distbin">
|
||||
<copy file="bin/OpenSim.ini.example" tofile="bin/OpenSim.ini"/>
|
||||
<copy file="bin/config-include/StandaloneCommon.ini.example" tofile="bin/config-include/StandaloneCommon.ini"/>
|
||||
<delete dir="${distbindir}"/>
|
||||
<!-- <copy file="*" todir="${distbindir}"/> -->
|
||||
<copy todir="${distbindir}">
|
||||
<fileset>
|
||||
<include name="**"/>
|
||||
|
@ -20,6 +20,7 @@
|
|||
<delete dir="${distbindir}/.nant"/>
|
||||
<delete>
|
||||
<fileset basedir="${distbindir}">
|
||||
<include name="BUILDING.txt"/>
|
||||
<include name="Makefile"/>
|
||||
<include name="nant-color"/>
|
||||
<include name="OpenSim.*"/>
|
||||
|
@ -126,15 +127,10 @@
|
|||
</exec>
|
||||
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.framework.tests)==0}" />
|
||||
|
||||
<exec program="${nunitcmd}" failonerror="true" resultproperty="testresult.opensim.data.sqlite.tests">
|
||||
<arg value="./bin/OpenSim.Data.SQLite.Tests.dll" />
|
||||
<exec program="${nunitcmd}" failonerror="true" resultproperty="testresult.opensim.data.tests">
|
||||
<arg value="./bin/OpenSim.Data.Tests.dll" />
|
||||
</exec>
|
||||
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.data.sqlite.tests)==0}" />
|
||||
|
||||
<exec program="${nunitcmd}" failonerror="true" resultproperty="testresult.opensim.data.mysql.tests">
|
||||
<arg value="./bin/OpenSim.Data.MySQL.Tests.dll" />
|
||||
</exec>
|
||||
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.data.mysql.tests)==0}" />
|
||||
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.data.tests)==0}" />
|
||||
|
||||
<delete dir="%temp%"/>
|
||||
|
||||
|
@ -296,14 +292,9 @@
|
|||
<arg value="-xml=test-results/OpenSim.Region.Framework.Tests.dll-Results.xml" />
|
||||
</exec>
|
||||
|
||||
<exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.data.sqlite.tests">
|
||||
<arg value="./bin/OpenSim.Data.SQLite.Tests.dll" />
|
||||
<arg value="-xml=test-results/OpenSim.Data.SQLite.Tests.dll-Results.xml" />
|
||||
</exec>
|
||||
|
||||
<exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.data.mysql.tests">
|
||||
<arg value="./bin/OpenSim.Data.MySQL.Tests.dll" />
|
||||
<arg value="-xml=test-results/OpenSim.Data.MySQL.Tests.dll-Results.xml" />
|
||||
<exec program="${nunitcmd}" failonerror="false" resultproperty="testresult.opensim.data.tests">
|
||||
<arg value="./bin/OpenSim.Data.Tests.dll" />
|
||||
<arg value="-xml=test-results/OpenSim.Data.Tests.dll-Results.xml" />
|
||||
</exec>
|
||||
|
||||
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.framework.tests)==0}" />
|
||||
|
@ -312,8 +303,7 @@
|
|||
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.scriptengine.tests)==0}" />
|
||||
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.coremodules.tests)==0}" />
|
||||
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.region.framework.tests)==0}" />
|
||||
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.data.sqlite.tests)==0}" />
|
||||
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.data.mysql.tests)==0}" />
|
||||
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.data.tests)==0}" />
|
||||
|
||||
</target>
|
||||
<!-- <exec program="nunit-console.exe" failonerror="false" resultproperty="testresult.acceptancetestassembly"> -->
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
== Building OpenSim ==
|
||||
=== Building OpenSim ===
|
||||
|
||||
=== Building on Windows ===
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
|||
private static Object SOLock = new Object();
|
||||
|
||||
private OpenSimBase m_app;
|
||||
private BaseHttpServer m_httpd;
|
||||
private IHttpServer m_httpd;
|
||||
private IConfig m_config;
|
||||
private IConfigSource m_configSource;
|
||||
private string m_requiredPassword = String.Empty;
|
||||
|
@ -113,9 +113,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
|||
m_config = m_configSource.Configs["RemoteAdmin"];
|
||||
m_log.Info("[RADMIN]: Remote Admin Plugin Enabled");
|
||||
m_requiredPassword = m_config.GetString("access_password", String.Empty);
|
||||
int port = m_config.GetInt("port", 0);
|
||||
|
||||
m_app = openSim;
|
||||
m_httpd = openSim.HttpServer;
|
||||
m_httpd = MainServer.GetHttpServer((uint)port);
|
||||
|
||||
Dictionary<string, XmlRpcMethod> availableMethods = new Dictionary<string, XmlRpcMethod>();
|
||||
availableMethods["admin_create_region"] = XmlRpcCreateRegionMethod;
|
||||
|
@ -1119,9 +1120,9 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
|||
}
|
||||
else
|
||||
{
|
||||
PresenceInfo[] pinfos = m_app.SceneManager.CurrentOrFirstScene.PresenceService.GetAgents(new string[] { account.PrincipalID.ToString() });
|
||||
if (pinfos != null && pinfos.Length >= 1)
|
||||
responseData["lastlogin"] = pinfos[0].Login;
|
||||
GridUserInfo guinfo = m_app.SceneManager.CurrentOrFirstScene.GridUserService.GetGridUserInfo(account.PrincipalID.ToString());
|
||||
if (guinfo != null)
|
||||
responseData["lastlogin"] = guinfo.Login;
|
||||
else
|
||||
responseData["lastlogin"] = 0;
|
||||
|
||||
|
@ -1611,7 +1612,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
|||
GridRegion home = m_app.SceneManager.CurrentOrFirstScene.GridService.GetRegionByPosition(scopeID,
|
||||
(int)(regX * Constants.RegionSize), (int)(regY * Constants.RegionSize));
|
||||
if (home != null)
|
||||
m_app.SceneManager.CurrentOrFirstScene.PresenceService.SetHomeLocation(account.PrincipalID.ToString(), home.RegionID, new Vector3(128, 128, 0), new Vector3(0, 1, 0));
|
||||
m_app.SceneManager.CurrentOrFirstScene.GridUserService.SetHome(account.PrincipalID.ToString(), home.RegionID, new Vector3(128, 128, 0), new Vector3(0, 1, 0));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -39,8 +39,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
|
||||
public class RestAppearanceServices : IRest
|
||||
{
|
||||
|
||||
private static readonly int PARM_USERID = 0;
|
||||
// private static readonly int PARM_USERID = 0;
|
||||
|
||||
// private static readonly int PARM_PATH = 1;
|
||||
|
||||
|
@ -64,6 +63,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
{
|
||||
Rest.Log.InfoFormat("{0} Domain is relative, adding absolute prefix", MsgId);
|
||||
qPrefix = String.Format("{0}{1}{2}", Rest.Prefix, Rest.UrlPathSeparator, qPrefix);
|
||||
qPrefix = String.Format("{0}{1}{2}", Rest.Prefix, Rest.UrlPathSeparator, qPrefix);
|
||||
Rest.Log.InfoFormat("{0} Domain is now <{1}>", MsgId, qPrefix);
|
||||
}
|
||||
|
||||
|
@ -294,31 +294,31 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
/// </summary>
|
||||
/// <param name=rdata>HTTP service request work area</param>
|
||||
|
||||
private void DoGet(AppearanceRequestData rdata)
|
||||
{
|
||||
AvatarData adata = Rest.AvatarServices.GetAvatar(rdata.userProfile.ID);
|
||||
|
||||
if (adata == null)
|
||||
{
|
||||
rdata.Fail(Rest.HttpStatusCodeNoContent,
|
||||
String.Format("appearance data not found for user {0} {1}",
|
||||
rdata.userProfile.FirstName, rdata.userProfile.SurName));
|
||||
}
|
||||
rdata.userAppearance = adata.ToAvatarAppearance(rdata.userProfile.ID);
|
||||
|
||||
rdata.initXmlWriter();
|
||||
|
||||
FormatUserAppearance(rdata);
|
||||
|
||||
// Indicate a successful request
|
||||
|
||||
rdata.Complete();
|
||||
|
||||
// Send the response to the user. The body will be implicitly
|
||||
// constructed from the result of the XML writer.
|
||||
|
||||
rdata.Respond(String.Format("Appearance {0} Normal completion", rdata.method));
|
||||
}
|
||||
// private void DoGet(AppearanceRequestData rdata)
|
||||
// {
|
||||
// AvatarData adata = Rest.AvatarServices.GetAvatar(rdata.userProfile.ID);
|
||||
//
|
||||
// if (adata == null)
|
||||
// {
|
||||
// rdata.Fail(Rest.HttpStatusCodeNoContent,
|
||||
// String.Format("appearance data not found for user {0} {1}",
|
||||
// rdata.userProfile.FirstName, rdata.userProfile.SurName));
|
||||
// }
|
||||
// rdata.userAppearance = adata.ToAvatarAppearance(rdata.userProfile.ID);
|
||||
//
|
||||
// rdata.initXmlWriter();
|
||||
//
|
||||
// FormatUserAppearance(rdata);
|
||||
//
|
||||
// // Indicate a successful request
|
||||
//
|
||||
// rdata.Complete();
|
||||
//
|
||||
// // Send the response to the user. The body will be implicitly
|
||||
// // constructed from the result of the XML writer.
|
||||
//
|
||||
// rdata.Respond(String.Format("Appearance {0} Normal completion", rdata.method));
|
||||
// }
|
||||
|
||||
/// <summary>
|
||||
/// POST adds NEW information to the user profile database.
|
||||
|
@ -326,112 +326,112 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
/// characteristics supplied in the request.
|
||||
/// </summary>
|
||||
|
||||
private void DoExtend(AppearanceRequestData rdata)
|
||||
{
|
||||
|
||||
bool created = false;
|
||||
bool modified = false;
|
||||
string newnode = String.Empty;
|
||||
|
||||
Rest.Log.DebugFormat("{0} POST ENTRY", MsgId);
|
||||
|
||||
//AvatarAppearance old = Rest.AvatarServices.GetUserAppearance(rdata.userProfile.ID);
|
||||
|
||||
rdata.userAppearance = new AvatarAppearance();
|
||||
|
||||
// Although the following behavior is admitted by HTTP I am becoming
|
||||
// increasingly doubtful that it is appropriate for REST. If I attempt to
|
||||
// add a new record, and it already exists, then it seems to me that the
|
||||
// attempt should fail, rather than update the existing record.
|
||||
AvatarData adata = null;
|
||||
if (GetUserAppearance(rdata))
|
||||
{
|
||||
modified = rdata.userAppearance != null;
|
||||
created = !modified;
|
||||
adata = new AvatarData(rdata.userAppearance);
|
||||
Rest.AvatarServices.SetAvatar(rdata.userProfile.ID, adata);
|
||||
// Rest.UserServices.UpdateUserProfile(rdata.userProfile);
|
||||
}
|
||||
else
|
||||
{
|
||||
created = true;
|
||||
adata = new AvatarData(rdata.userAppearance);
|
||||
Rest.AvatarServices.SetAvatar(rdata.userProfile.ID, adata);
|
||||
// Rest.UserServices.UpdateUserProfile(rdata.userProfile);
|
||||
}
|
||||
|
||||
if (created)
|
||||
{
|
||||
newnode = String.Format("{0} {1}", rdata.userProfile.FirstName,
|
||||
rdata.userProfile.SurName);
|
||||
// Must include a location header with a URI that identifies the new resource.
|
||||
|
||||
rdata.AddHeader(Rest.HttpHeaderLocation,String.Format("http://{0}{1}:{2}{3}{4}",
|
||||
rdata.hostname,rdata.port,rdata.path,Rest.UrlPathSeparator, newnode));
|
||||
rdata.Complete(Rest.HttpStatusCodeCreated);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if (modified)
|
||||
{
|
||||
rdata.Complete(Rest.HttpStatusCodeOK);
|
||||
}
|
||||
else
|
||||
{
|
||||
rdata.Complete(Rest.HttpStatusCodeNoContent);
|
||||
}
|
||||
}
|
||||
|
||||
rdata.Respond(String.Format("Appearance {0} : Normal completion", rdata.method));
|
||||
|
||||
}
|
||||
// private void DoExtend(AppearanceRequestData rdata)
|
||||
// {
|
||||
//
|
||||
// bool created = false;
|
||||
// bool modified = false;
|
||||
// string newnode = String.Empty;
|
||||
//
|
||||
// Rest.Log.DebugFormat("{0} POST ENTRY", MsgId);
|
||||
//
|
||||
// //AvatarAppearance old = Rest.AvatarServices.GetUserAppearance(rdata.userProfile.ID);
|
||||
//
|
||||
// rdata.userAppearance = new AvatarAppearance();
|
||||
//
|
||||
// // Although the following behavior is admitted by HTTP I am becoming
|
||||
// // increasingly doubtful that it is appropriate for REST. If I attempt to
|
||||
// // add a new record, and it already exists, then it seems to me that the
|
||||
// // attempt should fail, rather than update the existing record.
|
||||
// AvatarData adata = null;
|
||||
// if (GetUserAppearance(rdata))
|
||||
// {
|
||||
// modified = rdata.userAppearance != null;
|
||||
// created = !modified;
|
||||
// adata = new AvatarData(rdata.userAppearance);
|
||||
// Rest.AvatarServices.SetAvatar(rdata.userProfile.ID, adata);
|
||||
// // Rest.UserServices.UpdateUserProfile(rdata.userProfile);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// created = true;
|
||||
// adata = new AvatarData(rdata.userAppearance);
|
||||
// Rest.AvatarServices.SetAvatar(rdata.userProfile.ID, adata);
|
||||
// // Rest.UserServices.UpdateUserProfile(rdata.userProfile);
|
||||
// }
|
||||
//
|
||||
// if (created)
|
||||
// {
|
||||
// newnode = String.Format("{0} {1}", rdata.userProfile.FirstName,
|
||||
// rdata.userProfile.SurName);
|
||||
// // Must include a location header with a URI that identifies the new resource.
|
||||
//
|
||||
// rdata.AddHeader(Rest.HttpHeaderLocation,String.Format("http://{0}{1}:{2}{3}{4}",
|
||||
// rdata.hostname,rdata.port,rdata.path,Rest.UrlPathSeparator, newnode));
|
||||
// rdata.Complete(Rest.HttpStatusCodeCreated);
|
||||
//
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// if (modified)
|
||||
// {
|
||||
// rdata.Complete(Rest.HttpStatusCodeOK);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// rdata.Complete(Rest.HttpStatusCodeNoContent);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// rdata.Respond(String.Format("Appearance {0} : Normal completion", rdata.method));
|
||||
//
|
||||
// }
|
||||
|
||||
/// <summary>
|
||||
/// This updates the user's appearance. not all aspects need to be provided,
|
||||
/// only those supplied will be changed.
|
||||
/// </summary>
|
||||
|
||||
private void DoUpdate(AppearanceRequestData rdata)
|
||||
{
|
||||
|
||||
// REFACTORING PROBLEM This was commented out. It doesn't work for 0.7
|
||||
|
||||
//bool created = false;
|
||||
//bool modified = false;
|
||||
|
||||
|
||||
//rdata.userAppearance = Rest.AvatarServices.GetUserAppearance(rdata.userProfile.ID);
|
||||
|
||||
//// If the user exists then this is considered a modification regardless
|
||||
//// of what may, or may not be, specified in the payload.
|
||||
|
||||
//if (rdata.userAppearance != null)
|
||||
//{
|
||||
// modified = true;
|
||||
// Rest.AvatarServices.UpdateUserAppearance(rdata.userProfile.ID, rdata.userAppearance);
|
||||
// Rest.UserServices.UpdateUserProfile(rdata.userProfile);
|
||||
//}
|
||||
|
||||
//if (created)
|
||||
//{
|
||||
// rdata.Complete(Rest.HttpStatusCodeCreated);
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// if (modified)
|
||||
// {
|
||||
// rdata.Complete(Rest.HttpStatusCodeOK);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// rdata.Complete(Rest.HttpStatusCodeNoContent);
|
||||
// }
|
||||
//}
|
||||
|
||||
rdata.Respond(String.Format("Appearance {0} : Normal completion", rdata.method));
|
||||
|
||||
}
|
||||
// private void DoUpdate(AppearanceRequestData rdata)
|
||||
// {
|
||||
//
|
||||
// // REFACTORING PROBLEM This was commented out. It doesn't work for 0.7
|
||||
//
|
||||
// //bool created = false;
|
||||
// //bool modified = false;
|
||||
//
|
||||
//
|
||||
// //rdata.userAppearance = Rest.AvatarServices.GetUserAppearance(rdata.userProfile.ID);
|
||||
//
|
||||
// //// If the user exists then this is considered a modification regardless
|
||||
// //// of what may, or may not be, specified in the payload.
|
||||
//
|
||||
// //if (rdata.userAppearance != null)
|
||||
// //{
|
||||
// // modified = true;
|
||||
// // Rest.AvatarServices.UpdateUserAppearance(rdata.userProfile.ID, rdata.userAppearance);
|
||||
// // Rest.UserServices.UpdateUserProfile(rdata.userProfile);
|
||||
// //}
|
||||
//
|
||||
// //if (created)
|
||||
// //{
|
||||
// // rdata.Complete(Rest.HttpStatusCodeCreated);
|
||||
// //}
|
||||
// //else
|
||||
// //{
|
||||
// // if (modified)
|
||||
// // {
|
||||
// // rdata.Complete(Rest.HttpStatusCodeOK);
|
||||
// // }
|
||||
// // else
|
||||
// // {
|
||||
// // rdata.Complete(Rest.HttpStatusCodeNoContent);
|
||||
// // }
|
||||
// //}
|
||||
//
|
||||
// rdata.Respond(String.Format("Appearance {0} : Normal completion", rdata.method));
|
||||
//
|
||||
// }
|
||||
|
||||
/// <summary>
|
||||
/// Delete the specified user's appearance. This actually performs a reset
|
||||
|
@ -439,31 +439,29 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
|||
/// Existing ownership is preserved. All prior updates are lost and can not
|
||||
/// be recovered.
|
||||
/// </summary>
|
||||
|
||||
private void DoDelete(AppearanceRequestData rdata)
|
||||
{
|
||||
AvatarData adata = Rest.AvatarServices.GetAvatar(rdata.userProfile.ID);
|
||||
|
||||
if (adata != null)
|
||||
{
|
||||
AvatarAppearance old = adata.ToAvatarAppearance(rdata.userProfile.ID);
|
||||
rdata.userAppearance = new AvatarAppearance();
|
||||
rdata.userAppearance.Owner = old.Owner;
|
||||
adata = new AvatarData(rdata.userAppearance);
|
||||
|
||||
Rest.AvatarServices.SetAvatar(rdata.userProfile.ID, adata);
|
||||
|
||||
rdata.Complete();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
rdata.Complete(Rest.HttpStatusCodeNoContent);
|
||||
}
|
||||
|
||||
rdata.Respond(String.Format("Appearance {0} : Normal completion", rdata.method));
|
||||
|
||||
}
|
||||
// private void DoDelete(AppearanceRequestData rdata)
|
||||
// {
|
||||
// AvatarData adata = Rest.AvatarServices.GetAvatar(rdata.userProfile.ID);
|
||||
//
|
||||
// if (adata != null)
|
||||
// {
|
||||
// AvatarAppearance old = adata.ToAvatarAppearance(rdata.userProfile.ID);
|
||||
// rdata.userAppearance = new AvatarAppearance();
|
||||
// rdata.userAppearance.Owner = old.Owner;
|
||||
// adata = new AvatarData(rdata.userAppearance);
|
||||
//
|
||||
// Rest.AvatarServices.SetAvatar(rdata.userProfile.ID, adata);
|
||||
//
|
||||
// rdata.Complete();
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
//
|
||||
// rdata.Complete(Rest.HttpStatusCodeNoContent);
|
||||
// }
|
||||
//
|
||||
// rdata.Respond(String.Format("Appearance {0} : Normal completion", rdata.method));
|
||||
// }
|
||||
|
||||
#endregion method-specific processing
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -931,6 +931,10 @@ namespace OpenSim.Client.MXP.ClientStack
|
|||
// Need to translate to MXP somehow
|
||||
}
|
||||
|
||||
public void SendGenericMessage(string method, List<string> message)
|
||||
{
|
||||
}
|
||||
|
||||
public void SendGenericMessage(string method, List<byte[]> message)
|
||||
{
|
||||
// Need to translate to MXP somehow
|
||||
|
@ -1026,23 +1030,6 @@ namespace OpenSim.Client.MXP.ClientStack
|
|||
// Need to translate to MXP somehow
|
||||
}
|
||||
|
||||
public void SendAvatarData(SendAvatarData data)
|
||||
{
|
||||
//ScenePresence presence=((Scene)this.Scene).GetScenePresence(avatarID);
|
||||
UUID ownerID = data.AvatarID;
|
||||
MXPSendAvatarData(data.FirstName + " " + data.LastName, ownerID, UUID.Zero, data.AvatarID, data.AvatarLocalID, data.Position, data.Rotation);
|
||||
}
|
||||
|
||||
public void SendAvatarTerseUpdate(SendAvatarTerseData data)
|
||||
{
|
||||
MovementEventMessage me = new MovementEventMessage();
|
||||
me.ObjectIndex = data.LocalID;
|
||||
me.Location = ToOmVector(data.Position);
|
||||
me.Orientation = ToOmQuaternion(data.Rotation);
|
||||
|
||||
Session.Send(me);
|
||||
}
|
||||
|
||||
public void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations)
|
||||
{
|
||||
// Minimap function, not used.
|
||||
|
@ -1058,23 +1045,31 @@ namespace OpenSim.Client.MXP.ClientStack
|
|||
// Need to translate to MXP somehow
|
||||
}
|
||||
|
||||
public void SendPrimitiveToClient(SendPrimitiveData data)
|
||||
public void SendAvatarDataImmediate(ISceneEntity avatar)
|
||||
{
|
||||
MXPSendPrimitive(data.localID, data.ownerID, data.acc, data.rvel, data.primShape, data.pos, data.objectID, data.vel,
|
||||
data.rotation, (uint)data.flags, data.text, data.color, data.parentID, data.particleSystem, data.clickAction,
|
||||
data.material, data.textureanim);
|
||||
//ScenePresence presence=((Scene)this.Scene).GetScenePresence(avatarID);
|
||||
ScenePresence presence = (ScenePresence)avatar;
|
||||
UUID ownerID = presence.UUID;
|
||||
MXPSendAvatarData(presence.Firstname + " " + presence.Lastname, ownerID, UUID.Zero, presence.UUID, presence.LocalId, presence.AbsolutePosition, presence.Rotation);
|
||||
}
|
||||
|
||||
public void SendPrimTerseUpdate(SendPrimitiveTerseData data)
|
||||
public void SendPrimUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags)
|
||||
{
|
||||
MovementEventMessage me = new MovementEventMessage();
|
||||
me.ObjectIndex = data.LocalID;
|
||||
me.Location = ToOmVector(data.Position);
|
||||
me.Orientation = ToOmQuaternion(data.Rotation);
|
||||
Session.Send(me);
|
||||
//MovementEventMessage me = new MovementEventMessage();
|
||||
//me.ObjectIndex = data.LocalID;
|
||||
//me.Location = ToOmVector(data.Position);
|
||||
//me.Orientation = ToOmQuaternion(data.Rotation);
|
||||
|
||||
//MXPSendPrimitive(data.localID, data.ownerID, data.acc, data.rvel, data.primShape, data.pos, data.objectID, data.vel,
|
||||
// data.rotation, (uint)data.flags, data.text, data.color, data.parentID, data.particleSystem, data.clickAction,
|
||||
// data.material, data.textureanim);
|
||||
|
||||
//Session.Send(me);
|
||||
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public void ReprioritizeUpdates(StateUpdateTypes type, UpdatePriorityHandler handler)
|
||||
public void ReprioritizeUpdates()
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -504,6 +504,10 @@ namespace OpenSim.Client.Sirikata.ClientStack
|
|||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public void SendGenericMessage(string method, List<string> message)
|
||||
{
|
||||
}
|
||||
|
||||
public void SendGenericMessage(string method, List<byte[]> message)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
|
@ -584,16 +588,6 @@ namespace OpenSim.Client.Sirikata.ClientStack
|
|||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public void SendAvatarData(SendAvatarData data)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public void SendAvatarTerseUpdate(SendAvatarTerseData data)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
|
@ -609,22 +603,17 @@ namespace OpenSim.Client.Sirikata.ClientStack
|
|||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public void SendPrimitiveToClient(SendPrimitiveData data)
|
||||
public void SendAvatarDataImmediate(ISceneEntity avatar)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public void SendPrimTerseUpdate(SendPrimitiveTerseData data)
|
||||
public void SendPrimUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public void ReprioritizeUpdates(StateUpdateTypes type, UpdatePriorityHandler handler)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List<InventoryItemBase> items, List<InventoryFolderBase> folders, int version, bool fetchFolders, bool fetchItems)
|
||||
public void ReprioritizeUpdates()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
@ -634,6 +623,11 @@ namespace OpenSim.Client.Sirikata.ClientStack
|
|||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List<InventoryItemBase> items, List<InventoryFolderBase> folders, int version, bool fetchFolders, bool fetchItems)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public void SendInventoryItemDetails(UUID ownerID, InventoryItemBase item)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
|
|
|
@ -510,6 +510,10 @@ namespace OpenSim.Client.VWoHTTP.ClientStack
|
|||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public void SendGenericMessage(string method, List<string> message)
|
||||
{
|
||||
}
|
||||
|
||||
public void SendGenericMessage(string method, List<byte[]> message)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
|
@ -590,16 +594,6 @@ namespace OpenSim.Client.VWoHTTP.ClientStack
|
|||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public void SendAvatarData(SendAvatarData data)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public void SendAvatarTerseUpdate(SendAvatarTerseData data)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
|
@ -615,17 +609,17 @@ namespace OpenSim.Client.VWoHTTP.ClientStack
|
|||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public void SendPrimitiveToClient(SendPrimitiveData data)
|
||||
public void SendAvatarDataImmediate(ISceneEntity avatar)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public void SendPrimTerseUpdate(SendPrimitiveTerseData data)
|
||||
public void SendPrimUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags)
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
||||
public void ReprioritizeUpdates(StateUpdateTypes type, UpdatePriorityHandler handler)
|
||||
public void ReprioritizeUpdates()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
|
|
|
@ -48,5 +48,6 @@ namespace OpenSim.Data
|
|||
public abstract void Initialise(string connect);
|
||||
public abstract void Initialise();
|
||||
public abstract void Dispose();
|
||||
public abstract bool Delete(string id);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using OpenMetaverse;
|
||||
|
||||
namespace OpenSim.Data
|
||||
{
|
||||
|
||||
public static class DBGuid
|
||||
{
|
||||
/// <summary>This function converts a value returned from the database in one of the
|
||||
/// supported formats into a UUID. This function is not actually DBMS-specific right
|
||||
/// now
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
public static UUID FromDB(object id)
|
||||
{
|
||||
if( (id == null) || (id == DBNull.Value))
|
||||
return UUID.Zero;
|
||||
|
||||
if (id.GetType() == typeof(Guid))
|
||||
return new UUID((Guid)id);
|
||||
|
||||
if (id.GetType() == typeof(byte[]))
|
||||
{
|
||||
if (((byte[])id).Length == 0)
|
||||
return UUID.Zero;
|
||||
else if (((byte[])id).Length == 16)
|
||||
return new UUID((byte[])id, 0);
|
||||
}
|
||||
else if (id.GetType() == typeof(string))
|
||||
{
|
||||
if (((string)id).Length == 0)
|
||||
return UUID.Zero;
|
||||
else if (((string)id).Length == 36)
|
||||
return new UUID((string)id);
|
||||
}
|
||||
|
||||
throw new Exception("Failed to convert db value to UUID: " + id.ToString());
|
||||
}
|
||||
}
|
||||
}
|
|
@ -38,6 +38,7 @@ namespace OpenSim.Data
|
|||
bool ExistsAsset(UUID uuid);
|
||||
List<AssetMetadata> FetchAssetMetadataSet(int start, int count);
|
||||
void Initialise(string connect);
|
||||
bool Delete(string id);
|
||||
}
|
||||
|
||||
public class AssetDataInitialiser : PluginInitialiserBase
|
||||
|
|
|
@ -37,6 +37,11 @@ namespace OpenSim.Data
|
|||
{
|
||||
public string UserID;
|
||||
public Dictionary<string, string> Data;
|
||||
|
||||
public GridUserData()
|
||||
{
|
||||
Data = new Dictionary<string, string>();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -44,7 +49,7 @@ namespace OpenSim.Data
|
|||
/// </summary>
|
||||
public interface IGridUserData
|
||||
{
|
||||
GridUserData GetGridUserData(string userID);
|
||||
bool StoreGridUserData(GridUserData data);
|
||||
GridUserData Get(string userID);
|
||||
bool Store(GridUserData data);
|
||||
}
|
||||
}
|
|
@ -50,10 +50,8 @@ namespace OpenSim.Data
|
|||
|
||||
PresenceData Get(UUID sessionID);
|
||||
void LogoutRegionAgents(UUID regionID);
|
||||
bool ReportAgent(UUID sessionID, UUID regionID, string position, string lookAt);
|
||||
bool SetHomeLocation(string userID, UUID regionID, Vector3 position, Vector3 lookAt);
|
||||
bool ReportAgent(UUID sessionID, UUID regionID);
|
||||
PresenceData[] Get(string field, string data);
|
||||
void Prune(string userID);
|
||||
bool Delete(string field, string val);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -121,15 +121,16 @@ namespace OpenSim.Data.MSSQL
|
|||
if (reader.Read())
|
||||
{
|
||||
AssetBase asset = new AssetBase(
|
||||
new UUID((Guid)reader["id"]),
|
||||
DBGuid.FromDB(reader["id"]),
|
||||
(string)reader["name"],
|
||||
Convert.ToSByte(reader["assetType"]),
|
||||
String.Empty
|
||||
reader["creatorid"].ToString()
|
||||
);
|
||||
// Region Main
|
||||
asset.Description = (string)reader["description"];
|
||||
asset.Local = Convert.ToBoolean(reader["local"]);
|
||||
asset.Temporary = Convert.ToBoolean(reader["temporary"]);
|
||||
asset.Flags = (AssetFlags)(Convert.ToInt32(reader["asset_flags"]));
|
||||
asset.Data = (byte[])reader["data"];
|
||||
return asset;
|
||||
}
|
||||
|
@ -144,26 +145,19 @@ namespace OpenSim.Data.MSSQL
|
|||
/// <param name="asset">the asset</param>
|
||||
override public void StoreAsset(AssetBase asset)
|
||||
{
|
||||
if (ExistsAsset(asset.FullID))
|
||||
UpdateAsset(asset);
|
||||
else
|
||||
InsertAsset(asset);
|
||||
}
|
||||
|
||||
|
||||
private void InsertAsset(AssetBase asset)
|
||||
{
|
||||
if (ExistsAsset(asset.FullID))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
string sql = @"INSERT INTO assets
|
||||
string sql =
|
||||
@"IF EXISTS(SELECT * FROM assets WHERE id=@id)
|
||||
UPDATE assets set name = @name, description = @description, assetType = @assetType,
|
||||
local = @local, temporary = @temporary, creatorid = @creatorid, data = @data
|
||||
WHERE id=@id
|
||||
ELSE
|
||||
INSERT INTO assets
|
||||
([id], [name], [description], [assetType], [local],
|
||||
[temporary], [create_time], [access_time], [data])
|
||||
[temporary], [create_time], [access_time], [creatorid], [asset_flags], [data])
|
||||
VALUES
|
||||
(@id, @name, @description, @assetType, @local,
|
||||
@temporary, @create_time, @access_time, @data)";
|
||||
@temporary, @create_time, @access_time, @creatorid, @asset_flags, @data)";
|
||||
|
||||
string assetName = asset.Name;
|
||||
if (asset.Name.Length > 64)
|
||||
|
@ -191,6 +185,8 @@ namespace OpenSim.Data.MSSQL
|
|||
command.Parameters.Add(m_database.CreateParameter("temporary", asset.Temporary));
|
||||
command.Parameters.Add(m_database.CreateParameter("access_time", now));
|
||||
command.Parameters.Add(m_database.CreateParameter("create_time", now));
|
||||
command.Parameters.Add(m_database.CreateParameter("asset_flags", (int)asset.Flags));
|
||||
command.Parameters.Add(m_database.CreateParameter("creatorid", asset.Metadata.CreatorID));
|
||||
command.Parameters.Add(m_database.CreateParameter("data", asset.Data));
|
||||
conn.Open();
|
||||
try
|
||||
|
@ -199,57 +195,11 @@ namespace OpenSim.Data.MSSQL
|
|||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
m_log.Error("[ASSET DB]: Error inserting item :" + e.Message);
|
||||
m_log.Error("[ASSET DB]: Error storing item :" + e.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update asset in m_database
|
||||
/// </summary>
|
||||
/// <param name="asset">the asset</param>
|
||||
private void UpdateAsset(AssetBase asset)
|
||||
{
|
||||
string sql = @"UPDATE assets set id = @id, name = @name, description = @description, assetType = @assetType,
|
||||
local = @local, temporary = @temporary, data = @data
|
||||
WHERE id = @keyId;";
|
||||
|
||||
string assetName = asset.Name;
|
||||
if (asset.Name.Length > 64)
|
||||
{
|
||||
assetName = asset.Name.Substring(0, 64);
|
||||
m_log.Warn("[ASSET DB]: Name field truncated from " + asset.Name.Length + " to " + assetName.Length + " characters on update");
|
||||
}
|
||||
|
||||
string assetDescription = asset.Description;
|
||||
if (asset.Description.Length > 64)
|
||||
{
|
||||
assetDescription = asset.Description.Substring(0, 64);
|
||||
m_log.Warn("[ASSET DB]: Description field truncated from " + asset.Description.Length + " to " + assetDescription.Length + " characters on update");
|
||||
}
|
||||
|
||||
using (SqlConnection conn = new SqlConnection(m_connectionString))
|
||||
using (SqlCommand command = new SqlCommand(sql, conn))
|
||||
{
|
||||
command.Parameters.Add(m_database.CreateParameter("id", asset.FullID));
|
||||
command.Parameters.Add(m_database.CreateParameter("name", assetName));
|
||||
command.Parameters.Add(m_database.CreateParameter("description", assetDescription));
|
||||
command.Parameters.Add(m_database.CreateParameter("assetType", asset.Type));
|
||||
command.Parameters.Add(m_database.CreateParameter("local", asset.Local));
|
||||
command.Parameters.Add(m_database.CreateParameter("temporary", asset.Temporary));
|
||||
command.Parameters.Add(m_database.CreateParameter("data", asset.Data));
|
||||
command.Parameters.Add(m_database.CreateParameter("@keyId", asset.FullID));
|
||||
conn.Open();
|
||||
try
|
||||
{
|
||||
command.ExecuteNonQuery();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.Error(e.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Commented out since currently unused - this probably should be called in GetAsset()
|
||||
// private void UpdateAccessTime(AssetBase asset)
|
||||
|
@ -295,26 +245,34 @@ namespace OpenSim.Data.MSSQL
|
|||
public override List<AssetMetadata> FetchAssetMetadataSet(int start, int count)
|
||||
{
|
||||
List<AssetMetadata> retList = new List<AssetMetadata>(count);
|
||||
string sql = @"SELECT (name,description,assetType,temporary,id), Row = ROW_NUMBER()
|
||||
OVER (ORDER BY (some column to order by))
|
||||
WHERE Row >= @Start AND Row < @Start + @Count";
|
||||
string sql = @"WITH OrderedAssets AS
|
||||
(
|
||||
SELECT id, name, description, assetType, temporary, creatorid,
|
||||
RowNumber = ROW_NUMBER() OVER (ORDER BY id)
|
||||
FROM assets
|
||||
)
|
||||
SELECT *
|
||||
FROM OrderedAssets
|
||||
WHERE RowNumber BETWEEN @start AND @stop;";
|
||||
|
||||
using (SqlConnection conn = new SqlConnection(m_connectionString))
|
||||
using (SqlCommand cmd = new SqlCommand(sql, conn))
|
||||
{
|
||||
cmd.Parameters.Add(m_database.CreateParameter("start", start));
|
||||
cmd.Parameters.Add(m_database.CreateParameter("count", count));
|
||||
cmd.Parameters.Add(m_database.CreateParameter("stop", start + count - 1));
|
||||
conn.Open();
|
||||
using (SqlDataReader reader = cmd.ExecuteReader())
|
||||
{
|
||||
while (reader.Read())
|
||||
{
|
||||
AssetMetadata metadata = new AssetMetadata();
|
||||
metadata.FullID = new UUID((Guid)reader["id"]);
|
||||
metadata.FullID = DBGuid.FromDB(reader["id"]);
|
||||
metadata.Name = (string)reader["name"];
|
||||
metadata.Description = (string)reader["description"];
|
||||
metadata.Type = Convert.ToSByte(reader["assetType"]);
|
||||
metadata.Temporary = Convert.ToBoolean(reader["temporary"]);
|
||||
metadata.CreatorID = (string)reader["creatorid"];
|
||||
retList.Add(metadata);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -322,6 +280,10 @@ namespace OpenSim.Data.MSSQL
|
|||
return retList;
|
||||
}
|
||||
|
||||
public override bool Delete(string id)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ using OpenSim.Region.Framework.Interfaces;
|
|||
|
||||
namespace OpenSim.Data.MSSQL
|
||||
{
|
||||
public class MSSQLEstateData : IEstateDataStore
|
||||
public class MSSQLEstateStore : IEstateDataStore
|
||||
{
|
||||
private const string _migrationStore = "EstateStore";
|
||||
|
||||
|
@ -101,22 +101,30 @@ namespace OpenSim.Data.MSSQL
|
|||
{
|
||||
foreach (string name in FieldList)
|
||||
{
|
||||
if (_FieldMap[name].GetValue(es) is bool)
|
||||
FieldInfo f = _FieldMap[name];
|
||||
object v = reader[name];
|
||||
if (f.FieldType == typeof(bool) )
|
||||
{
|
||||
int v = Convert.ToInt32(reader[name]);
|
||||
if (v != 0)
|
||||
_FieldMap[name].SetValue(es, true);
|
||||
else
|
||||
_FieldMap[name].SetValue(es, false);
|
||||
f.SetValue(es, Convert.ToInt32(v) != 0);
|
||||
}
|
||||
else if (_FieldMap[name].GetValue(es) is UUID)
|
||||
else if (f.FieldType == typeof(UUID) )
|
||||
{
|
||||
_FieldMap[name].SetValue(es, new UUID((Guid)reader[name])); // uuid);
|
||||
f.SetValue(es, new UUID((Guid)v)); // uuid);
|
||||
}
|
||||
else if (f.FieldType == typeof(string))
|
||||
{
|
||||
f.SetValue(es, v.ToString());
|
||||
}
|
||||
else if (f.FieldType == typeof(UInt32))
|
||||
{
|
||||
f.SetValue(es, Convert.ToUInt32(v));
|
||||
}
|
||||
else if (f.FieldType == typeof(Single))
|
||||
{
|
||||
f.SetValue(es, Convert.ToSingle(v));
|
||||
}
|
||||
else
|
||||
{
|
||||
es.EstateID = Convert.ToUInt32(reader["EstateID"].ToString());
|
||||
}
|
||||
f.SetValue(es, v);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -288,64 +296,48 @@ namespace OpenSim.Data.MSSQL
|
|||
private void SaveBanList(EstateSettings es)
|
||||
{
|
||||
//Delete first
|
||||
string sql = "delete from estateban where EstateID = @EstateID";
|
||||
using (SqlConnection conn = new SqlConnection(m_connectionString))
|
||||
using (SqlCommand cmd = new SqlCommand(sql, conn))
|
||||
{
|
||||
cmd.Parameters.Add(_Database.CreateParameter("@EstateID", es.EstateID));
|
||||
conn.Open();
|
||||
using (SqlCommand cmd = conn.CreateCommand())
|
||||
{
|
||||
cmd.CommandText = "delete from estateban where EstateID = @EstateID";
|
||||
cmd.Parameters.AddWithValue("@EstateID", (int)es.EstateID);
|
||||
cmd.ExecuteNonQuery();
|
||||
}
|
||||
|
||||
//Insert after
|
||||
sql = "insert into estateban (EstateID, bannedUUID) values ( @EstateID, @bannedUUID )";
|
||||
using (SqlConnection conn = new SqlConnection(m_connectionString))
|
||||
using (SqlCommand cmd = new SqlCommand(sql, conn))
|
||||
{
|
||||
cmd.CommandText = "insert into estateban (EstateID, bannedUUID) values ( @EstateID, @bannedUUID )";
|
||||
cmd.Parameters.AddWithValue("@bannedUUID", Guid.Empty);
|
||||
foreach (EstateBan b in es.EstateBans)
|
||||
{
|
||||
cmd.Parameters.Add(_Database.CreateParameter("@EstateID", es.EstateID));
|
||||
cmd.Parameters.Add(_Database.CreateParameter("@bannedUUID", b.BannedUserID));
|
||||
conn.Open();
|
||||
cmd.Parameters["@bannedUUID"].Value = b.BannedUserID.Guid;
|
||||
cmd.ExecuteNonQuery();
|
||||
cmd.Parameters.Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void SaveUUIDList(uint estateID, string table, UUID[] data)
|
||||
{
|
||||
//Delete first
|
||||
string sql = string.Format("delete from {0} where EstateID = @EstateID", table);
|
||||
using (SqlConnection conn = new SqlConnection(m_connectionString))
|
||||
using (SqlCommand cmd = new SqlCommand(sql, conn))
|
||||
{
|
||||
cmd.Parameters.Add(_Database.CreateParameter("@EstateID", estateID));
|
||||
conn.Open();
|
||||
using (SqlCommand cmd = conn.CreateCommand())
|
||||
{
|
||||
cmd.Parameters.AddWithValue("@EstateID", (int)estateID);
|
||||
cmd.CommandText = string.Format("delete from {0} where EstateID = @EstateID", table);
|
||||
cmd.ExecuteNonQuery();
|
||||
}
|
||||
|
||||
sql = string.Format("insert into {0} (EstateID, uuid) values ( @EstateID, @uuid )", table);
|
||||
using (SqlConnection conn = new SqlConnection(m_connectionString))
|
||||
using (SqlCommand cmd = new SqlCommand(sql, conn))
|
||||
{
|
||||
cmd.Parameters.Add(_Database.CreateParameter("@EstateID", estateID));
|
||||
|
||||
bool createParamOnce = true;
|
||||
|
||||
cmd.CommandText = string.Format("insert into {0} (EstateID, uuid) values ( @EstateID, @uuid )", table);
|
||||
cmd.Parameters.AddWithValue("@uuid", Guid.Empty);
|
||||
foreach (UUID uuid in data)
|
||||
{
|
||||
if (createParamOnce)
|
||||
{
|
||||
cmd.Parameters.Add(_Database.CreateParameter("@uuid", uuid));
|
||||
createParamOnce = false;
|
||||
}
|
||||
else
|
||||
cmd.Parameters["@uuid"].Value = uuid.Guid; //.ToString(); //TODO check if this works
|
||||
conn.Open();
|
||||
cmd.ExecuteNonQuery();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public EstateSettings LoadEstateSettings(int estateID)
|
||||
{
|
||||
|
|
|
@ -46,11 +46,11 @@ namespace OpenSim.Data.MSSQL
|
|||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
public MSSQLGridUserData(string connectionString, string realm) :
|
||||
base(connectionString, realm, "UserGrid")
|
||||
base(connectionString, realm, "GridUserStore")
|
||||
{
|
||||
}
|
||||
|
||||
public GridUserData GetGridUserData(string userID)
|
||||
public GridUserData Get(string userID)
|
||||
{
|
||||
GridUserData[] ret = Get("UserID", userID);
|
||||
|
||||
|
@ -60,9 +60,5 @@ namespace OpenSim.Data.MSSQL
|
|||
return ret[0];
|
||||
}
|
||||
|
||||
public bool StoreGridUserData(GridUserData data)
|
||||
{
|
||||
return Store(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -111,6 +111,9 @@ namespace OpenSim.Data.MSSQL
|
|||
/// <returns>A list of folder objects</returns>
|
||||
public List<InventoryFolderBase> getUserRootFolders(UUID user)
|
||||
{
|
||||
if (user == UUID.Zero)
|
||||
return new List<InventoryFolderBase>();
|
||||
|
||||
return getInventoryFolders(UUID.Zero, user);
|
||||
}
|
||||
|
||||
|
@ -184,7 +187,19 @@ namespace OpenSim.Data.MSSQL
|
|||
//Note maybe change this to use a Dataset that loading in all folders of a user and then go throw it that way.
|
||||
//Note this is changed so it opens only one connection to the database and not everytime it wants to get data.
|
||||
|
||||
/* NOTE: the implementation below is very inefficient (makes a separate request to get subfolders for
|
||||
* every found folder, recursively). Inventory code for other DBs has been already rewritten to get ALL
|
||||
* inventory for a specific user at once.
|
||||
*
|
||||
* Meanwhile, one little thing is corrected: getFolderHierarchy(UUID.Zero) doesn't make sense and should never
|
||||
* be used, so check for that and return an empty list.
|
||||
*/
|
||||
|
||||
List<InventoryFolderBase> folders = new List<InventoryFolderBase>();
|
||||
|
||||
if (parentID == UUID.Zero)
|
||||
return folders;
|
||||
|
||||
string sql = "SELECT * FROM inventoryfolders WHERE parentFolderID = @parentID";
|
||||
using (SqlConnection conn = new SqlConnection(m_connectionString))
|
||||
using (SqlCommand cmd = new SqlCommand(sql, conn))
|
||||
|
@ -249,13 +264,12 @@ namespace OpenSim.Data.MSSQL
|
|||
/// <param name="folder">Folder to update</param>
|
||||
public void updateInventoryFolder(InventoryFolderBase folder)
|
||||
{
|
||||
string sql = @"UPDATE inventoryfolders SET folderID = @folderID,
|
||||
agentID = @agentID,
|
||||
string sql = @"UPDATE inventoryfolders SET agentID = @agentID,
|
||||
parentFolderID = @parentFolderID,
|
||||
folderName = @folderName,
|
||||
type = @type,
|
||||
version = @version
|
||||
WHERE folderID = @keyFolderID";
|
||||
WHERE folderID = @folderID";
|
||||
|
||||
string folderName = folder.Name;
|
||||
if (folderName.Length > 64)
|
||||
|
@ -272,7 +286,6 @@ namespace OpenSim.Data.MSSQL
|
|||
cmd.Parameters.Add(database.CreateParameter("folderName", folderName));
|
||||
cmd.Parameters.Add(database.CreateParameter("type", folder.Type));
|
||||
cmd.Parameters.Add(database.CreateParameter("version", folder.Version));
|
||||
cmd.Parameters.Add(database.CreateParameter("@keyFolderID", folder.ID));
|
||||
conn.Open();
|
||||
try
|
||||
{
|
||||
|
@ -296,7 +309,7 @@ namespace OpenSim.Data.MSSQL
|
|||
using (SqlCommand cmd = new SqlCommand(sql, conn))
|
||||
{
|
||||
cmd.Parameters.Add(database.CreateParameter("parentFolderID", folder.ParentID));
|
||||
cmd.Parameters.Add(database.CreateParameter("@folderID", folder.ID));
|
||||
cmd.Parameters.Add(database.CreateParameter("folderID", folder.ID));
|
||||
conn.Open();
|
||||
try
|
||||
{
|
||||
|
@ -489,8 +502,7 @@ namespace OpenSim.Data.MSSQL
|
|||
/// <param name="item">Inventory item to update</param>
|
||||
public void updateInventoryItem(InventoryItemBase item)
|
||||
{
|
||||
string sql = @"UPDATE inventoryitems SET inventoryID = @inventoryID,
|
||||
assetID = @assetID,
|
||||
string sql = @"UPDATE inventoryitems SET assetID = @assetID,
|
||||
assetType = @assetType,
|
||||
parentFolderID = @parentFolderID,
|
||||
avatarID = @avatarID,
|
||||
|
@ -502,13 +514,14 @@ namespace OpenSim.Data.MSSQL
|
|||
creatorID = @creatorID,
|
||||
inventoryBasePermissions = @inventoryBasePermissions,
|
||||
inventoryEveryOnePermissions = @inventoryEveryOnePermissions,
|
||||
inventoryGroupPermissions = @inventoryGroupPermissions,
|
||||
salePrice = @salePrice,
|
||||
saleType = @saleType,
|
||||
creationDate = @creationDate,
|
||||
groupID = @groupID,
|
||||
groupOwned = @groupOwned,
|
||||
flags = @flags
|
||||
WHERE inventoryID = @keyInventoryID";
|
||||
WHERE inventoryID = @inventoryID";
|
||||
|
||||
string itemName = item.Name;
|
||||
if (item.Name.Length > 64)
|
||||
|
@ -537,16 +550,16 @@ namespace OpenSim.Data.MSSQL
|
|||
command.Parameters.Add(database.CreateParameter("inventoryNextPermissions", item.NextPermissions));
|
||||
command.Parameters.Add(database.CreateParameter("inventoryCurrentPermissions", item.CurrentPermissions));
|
||||
command.Parameters.Add(database.CreateParameter("invType", item.InvType));
|
||||
command.Parameters.Add(database.CreateParameter("creatorID", item.CreatorIdAsUuid));
|
||||
command.Parameters.Add(database.CreateParameter("creatorID", item.CreatorId));
|
||||
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));
|
||||
command.Parameters.Add(database.CreateParameter("groupID", item.GroupID));
|
||||
command.Parameters.Add(database.CreateParameter("groupOwned", item.GroupOwned));
|
||||
command.Parameters.Add(database.CreateParameter("flags", item.Flags));
|
||||
command.Parameters.Add(database.CreateParameter("keyInventoryID", item.ID));
|
||||
conn.Open();
|
||||
try
|
||||
{
|
||||
|
@ -732,9 +745,9 @@ namespace OpenSim.Data.MSSQL
|
|||
try
|
||||
{
|
||||
InventoryFolderBase folder = new InventoryFolderBase();
|
||||
folder.Owner = new UUID((Guid)reader["agentID"]);
|
||||
folder.ParentID = new UUID((Guid)reader["parentFolderID"]);
|
||||
folder.ID = new UUID((Guid)reader["folderID"]);
|
||||
folder.Owner = DBGuid.FromDB(reader["agentID"]);
|
||||
folder.ParentID = DBGuid.FromDB(reader["parentFolderID"]);
|
||||
folder.ID = DBGuid.FromDB(reader["folderID"]);
|
||||
folder.Name = (string)reader["folderName"];
|
||||
folder.Type = (short)reader["type"];
|
||||
folder.Version = Convert.ToUInt16(reader["version"]);
|
||||
|
@ -760,24 +773,24 @@ namespace OpenSim.Data.MSSQL
|
|||
{
|
||||
InventoryItemBase item = new InventoryItemBase();
|
||||
|
||||
item.ID = new UUID((Guid)reader["inventoryID"]);
|
||||
item.AssetID = new UUID((Guid)reader["assetID"]);
|
||||
item.ID = DBGuid.FromDB(reader["inventoryID"]);
|
||||
item.AssetID = DBGuid.FromDB(reader["assetID"]);
|
||||
item.AssetType = Convert.ToInt32(reader["assetType"].ToString());
|
||||
item.Folder = new UUID((Guid)reader["parentFolderID"]);
|
||||
item.Owner = new UUID((Guid)reader["avatarID"]);
|
||||
item.Folder = DBGuid.FromDB(reader["parentFolderID"]);
|
||||
item.Owner = DBGuid.FromDB(reader["avatarID"]);
|
||||
item.Name = reader["inventoryName"].ToString();
|
||||
item.Description = reader["inventoryDescription"].ToString();
|
||||
item.NextPermissions = Convert.ToUInt32(reader["inventoryNextPermissions"]);
|
||||
item.CurrentPermissions = Convert.ToUInt32(reader["inventoryCurrentPermissions"]);
|
||||
item.InvType = Convert.ToInt32(reader["invType"].ToString());
|
||||
item.CreatorId = ((Guid)reader["creatorID"]).ToString();
|
||||
item.CreatorId = 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"]);
|
||||
item.GroupID = new UUID((Guid)reader["groupID"]);
|
||||
item.GroupID = DBGuid.FromDB(reader["groupID"]);
|
||||
item.GroupOwned = Convert.ToBoolean(reader["groupOwned"]);
|
||||
item.Flags = Convert.ToUInt32(reader["flags"]);
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ namespace OpenSim.Data.MSSQL
|
|||
using (SqlCommand cmd = new SqlCommand())
|
||||
{
|
||||
|
||||
cmd.CommandText = String.Format("UPDATE {0} SET Online='false' WHERE [RegionID]=@RegionID", m_Realm);
|
||||
cmd.CommandText = String.Format("DELETE FROM {0} WHERE [RegionID]=@RegionID", m_Realm);
|
||||
|
||||
cmd.Parameters.Add(m_database.CreateParameter("@RegionID", regionID.ToString()));
|
||||
cmd.Connection = conn;
|
||||
|
@ -76,8 +76,7 @@ namespace OpenSim.Data.MSSQL
|
|||
}
|
||||
}
|
||||
|
||||
public bool ReportAgent(UUID sessionID, UUID regionID, string position,
|
||||
string lookAt)
|
||||
public bool ReportAgent(UUID sessionID, UUID regionID)
|
||||
{
|
||||
PresenceData[] pd = Get("SessionID", sessionID.ToString());
|
||||
if (pd.Length == 0)
|
||||
|
@ -88,16 +87,11 @@ namespace OpenSim.Data.MSSQL
|
|||
{
|
||||
|
||||
cmd.CommandText = String.Format(@"UPDATE {0} SET
|
||||
[RegionID] = @RegionID,
|
||||
[Position] = @Position,
|
||||
[LookAt] = @LookAt,
|
||||
[Online] = 'true'
|
||||
[RegionID] = @RegionID
|
||||
WHERE [SessionID] = @SessionID", m_Realm);
|
||||
|
||||
cmd.Parameters.Add(m_database.CreateParameter("@SessionID", sessionID.ToString()));
|
||||
cmd.Parameters.Add(m_database.CreateParameter("@RegionID", regionID.ToString()));
|
||||
cmd.Parameters.Add(m_database.CreateParameter("@Position", position.ToString()));
|
||||
cmd.Parameters.Add(m_database.CreateParameter("@LookAt", lookAt.ToString()));
|
||||
cmd.Connection = conn;
|
||||
conn.Open();
|
||||
if (cmd.ExecuteNonQuery() == 0)
|
||||
|
@ -106,65 +100,5 @@ namespace OpenSim.Data.MSSQL
|
|||
return true;
|
||||
}
|
||||
|
||||
public bool SetHomeLocation(string userID, UUID regionID, Vector3 position, Vector3 lookAt)
|
||||
{
|
||||
PresenceData[] pd = Get("UserID", userID);
|
||||
if (pd.Length == 0)
|
||||
return false;
|
||||
|
||||
using (SqlConnection conn = new SqlConnection(m_ConnectionString))
|
||||
using (SqlCommand cmd = new SqlCommand())
|
||||
{
|
||||
|
||||
cmd.CommandText = String.Format(@"UPDATE {0} SET
|
||||
[HomeRegionID] = @HomeRegionID,
|
||||
[HomePosition] = @HomePosition,
|
||||
[HomeLookAt] = @HomeLookAt
|
||||
WHERE [UserID] = @UserID", m_Realm);
|
||||
|
||||
cmd.Parameters.Add(m_database.CreateParameter("@UserID", userID));
|
||||
cmd.Parameters.Add(m_database.CreateParameter("@HomeRegionID", regionID.ToString()));
|
||||
cmd.Parameters.Add(m_database.CreateParameter("@HomePosition", position));
|
||||
cmd.Parameters.Add(m_database.CreateParameter("@HomeLookAt", lookAt));
|
||||
cmd.Connection = conn;
|
||||
conn.Open();
|
||||
if (cmd.ExecuteNonQuery() == 0)
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public void Prune(string userID)
|
||||
{
|
||||
using (SqlConnection conn = new SqlConnection(m_ConnectionString))
|
||||
using (SqlCommand cmd = new SqlCommand())
|
||||
{
|
||||
cmd.CommandText = String.Format("SELECT * from {0} WHERE [UserID] = @UserID", m_Realm);
|
||||
|
||||
cmd.Parameters.Add(m_database.CreateParameter("@UserID", userID));
|
||||
cmd.Connection = conn;
|
||||
conn.Open();
|
||||
|
||||
using (SqlDataReader reader = cmd.ExecuteReader())
|
||||
{
|
||||
List<UUID> deleteSessions = new List<UUID>();
|
||||
int online = 0;
|
||||
|
||||
while (reader.Read())
|
||||
{
|
||||
if (bool.Parse(reader["Online"].ToString()))
|
||||
online++;
|
||||
else
|
||||
deleteSessions.Add(new UUID(reader["SessionID"].ToString()));
|
||||
}
|
||||
|
||||
if (online == 0 && deleteSessions.Count > 0)
|
||||
deleteSessions.RemoveAt(0);
|
||||
|
||||
foreach (UUID s in deleteSessions)
|
||||
Delete("SessionID", s.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
CREATE TABLE [assets] (
|
||||
[id] [varchar](36) NOT NULL,
|
||||
[name] [varchar](64) NOT NULL,
|
||||
[description] [varchar](64) NOT NULL,
|
||||
[assetType] [tinyint] NOT NULL,
|
||||
[local] [tinyint] NOT NULL,
|
||||
[temporary] [tinyint] NOT NULL,
|
||||
[data] [image] NOT NULL,
|
||||
PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[id] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
|
@ -1,85 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE [dbo].[estate_managers](
|
||||
[EstateID] [int] NOT NULL,
|
||||
[uuid] [varchar](36) NOT NULL,
|
||||
CONSTRAINT [PK_estate_managers] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[EstateID] ASC
|
||||
)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
|
||||
) ON [PRIMARY];
|
||||
|
||||
CREATE TABLE [dbo].[estate_groups](
|
||||
[EstateID] [int] NOT NULL,
|
||||
[uuid] [varchar](36) NOT NULL,
|
||||
CONSTRAINT [PK_estate_groups] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[EstateID] ASC
|
||||
)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
|
||||
) ON [PRIMARY];
|
||||
|
||||
|
||||
CREATE TABLE [dbo].[estate_users](
|
||||
[EstateID] [int] NOT NULL,
|
||||
[uuid] [varchar](36) NOT NULL,
|
||||
CONSTRAINT [PK_estate_users] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[EstateID] ASC
|
||||
)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
|
||||
) ON [PRIMARY];
|
||||
|
||||
|
||||
CREATE TABLE [dbo].[estateban](
|
||||
[EstateID] [int] NOT NULL,
|
||||
[bannedUUID] [varchar](36) NOT NULL,
|
||||
[bannedIp] [varchar](16) NOT NULL,
|
||||
[bannedIpHostMask] [varchar](16) NOT NULL,
|
||||
[bannedNameMask] [varchar](64) NULL DEFAULT (NULL),
|
||||
CONSTRAINT [PK_estateban] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[EstateID] ASC
|
||||
)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
|
||||
) ON [PRIMARY];
|
||||
|
||||
CREATE TABLE [dbo].[estate_settings](
|
||||
[EstateID] [int] IDENTITY(1,100) NOT NULL,
|
||||
[EstateName] [varchar](64) NULL DEFAULT (NULL),
|
||||
[AbuseEmailToEstateOwner] [bit] NOT NULL,
|
||||
[DenyAnonymous] [bit] NOT NULL,
|
||||
[ResetHomeOnTeleport] [bit] NOT NULL,
|
||||
[FixedSun] [bit] NOT NULL,
|
||||
[DenyTransacted] [bit] NOT NULL,
|
||||
[BlockDwell] [bit] NOT NULL,
|
||||
[DenyIdentified] [bit] NOT NULL,
|
||||
[AllowVoice] [bit] NOT NULL,
|
||||
[UseGlobalTime] [bit] NOT NULL,
|
||||
[PricePerMeter] [int] NOT NULL,
|
||||
[TaxFree] [bit] NOT NULL,
|
||||
[AllowDirectTeleport] [bit] NOT NULL,
|
||||
[RedirectGridX] [int] NOT NULL,
|
||||
[RedirectGridY] [int] NOT NULL,
|
||||
[ParentEstateID] [int] NOT NULL,
|
||||
[SunPosition] [float] NOT NULL,
|
||||
[EstateSkipScripts] [bit] NOT NULL,
|
||||
[BillableFactor] [float] NOT NULL,
|
||||
[PublicAccess] [bit] NOT NULL,
|
||||
[AbuseEmail] [varchar](255) NOT NULL,
|
||||
[EstateOwner] [varchar](36) NOT NULL,
|
||||
[DenyMinors] [bit] NOT NULL,
|
||||
CONSTRAINT [PK_estate_settings] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[EstateID] ASC
|
||||
)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
|
||||
) ON [PRIMARY];
|
||||
|
||||
|
||||
CREATE TABLE [dbo].[estate_map](
|
||||
[RegionID] [varchar](36) NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
|
||||
[EstateID] [int] NOT NULL,
|
||||
CONSTRAINT [PK_estate_map] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[RegionID] ASC
|
||||
)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
|
||||
) ON [PRIMARY];
|
||||
|
||||
COMMIT
|
|
@ -1,37 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE [dbo].[regions](
|
||||
[regionHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
|
||||
[regionName] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
|
||||
[uuid] [varchar](255) COLLATE Latin1_General_CI_AS NOT NULL,
|
||||
[regionRecvKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
|
||||
[regionSecret] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
|
||||
[regionSendKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
|
||||
[regionDataURI] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
|
||||
[serverIP] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
|
||||
[serverPort] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
|
||||
[serverURI] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
|
||||
[locX] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
|
||||
[locY] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
|
||||
[locZ] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
|
||||
[eastOverrideHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
|
||||
[westOverrideHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
|
||||
[southOverrideHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
|
||||
[northOverrideHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
|
||||
[regionAssetURI] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
|
||||
[regionAssetRecvKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
|
||||
[regionAssetSendKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
|
||||
[regionUserURI] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
|
||||
[regionUserRecvKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
|
||||
[regionUserSendKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
|
||||
[regionMapTexture] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
|
||||
[serverHttpPort] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
|
||||
[serverRemotingPort] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
|
||||
[owner_uuid] [varchar](36) COLLATE Latin1_General_CI_AS NULL,
|
||||
PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[uuid] ASC
|
||||
)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
|
||||
COMMIT
|
|
@ -1,64 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE [inventoryfolders] (
|
||||
[folderID] [varchar](36) NOT NULL default '',
|
||||
[agentID] [varchar](36) default NULL,
|
||||
[parentFolderID] [varchar](36) default NULL,
|
||||
[folderName] [varchar](64) default NULL,
|
||||
[type] [smallint] NOT NULL default 0,
|
||||
[version] [int] NOT NULL default 0,
|
||||
PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[folderID] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
|
||||
CREATE NONCLUSTERED INDEX [owner] ON [inventoryfolders]
|
||||
(
|
||||
[agentID] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
CREATE NONCLUSTERED INDEX [parent] ON [inventoryfolders]
|
||||
(
|
||||
[parentFolderID] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
|
||||
CREATE TABLE [inventoryitems] (
|
||||
[inventoryID] [varchar](36) NOT NULL default '',
|
||||
[assetID] [varchar](36) default NULL,
|
||||
[assetType] [int] default NULL,
|
||||
[parentFolderID] [varchar](36) default NULL,
|
||||
[avatarID] [varchar](36) default NULL,
|
||||
[inventoryName] [varchar](64) default NULL,
|
||||
[inventoryDescription] [varchar](128) default NULL,
|
||||
[inventoryNextPermissions] [int] default NULL,
|
||||
[inventoryCurrentPermissions] [int] default NULL,
|
||||
[invType] [int] default NULL,
|
||||
[creatorID] [varchar](36) default NULL,
|
||||
[inventoryBasePermissions] [int] NOT NULL default 0,
|
||||
[inventoryEveryOnePermissions] [int] NOT NULL default 0,
|
||||
[salePrice] [int] default NULL,
|
||||
[saleType] [tinyint] default NULL,
|
||||
[creationDate] [int] default NULL,
|
||||
[groupID] [varchar](36) default NULL,
|
||||
[groupOwned] [bit] default NULL,
|
||||
[flags] [int] default NULL,
|
||||
PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[inventoryID] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
|
||||
|
||||
CREATE NONCLUSTERED INDEX [owner] ON [inventoryitems]
|
||||
(
|
||||
[avatarID] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
CREATE NONCLUSTERED INDEX [folder] ON [inventoryitems]
|
||||
(
|
||||
[parentFolderID] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
COMMIT
|
|
@ -1,161 +0,0 @@
|
|||
CREATE TABLE [dbo].[prims](
|
||||
[UUID] [varchar](255) NOT NULL,
|
||||
[RegionUUID] [varchar](255) NULL,
|
||||
[ParentID] [int] NULL,
|
||||
[CreationDate] [int] NULL,
|
||||
[Name] [varchar](255) NULL,
|
||||
[SceneGroupID] [varchar](255) NULL,
|
||||
[Text] [varchar](255) NULL,
|
||||
[Description] [varchar](255) NULL,
|
||||
[SitName] [varchar](255) NULL,
|
||||
[TouchName] [varchar](255) NULL,
|
||||
[ObjectFlags] [int] NULL,
|
||||
[CreatorID] [varchar](255) NULL,
|
||||
[OwnerID] [varchar](255) NULL,
|
||||
[GroupID] [varchar](255) NULL,
|
||||
[LastOwnerID] [varchar](255) NULL,
|
||||
[OwnerMask] [int] NULL,
|
||||
[NextOwnerMask] [int] NULL,
|
||||
[GroupMask] [int] NULL,
|
||||
[EveryoneMask] [int] NULL,
|
||||
[BaseMask] [int] NULL,
|
||||
[PositionX] [float] NULL,
|
||||
[PositionY] [float] NULL,
|
||||
[PositionZ] [float] NULL,
|
||||
[GroupPositionX] [float] NULL,
|
||||
[GroupPositionY] [float] NULL,
|
||||
[GroupPositionZ] [float] NULL,
|
||||
[VelocityX] [float] NULL,
|
||||
[VelocityY] [float] NULL,
|
||||
[VelocityZ] [float] NULL,
|
||||
[AngularVelocityX] [float] NULL,
|
||||
[AngularVelocityY] [float] NULL,
|
||||
[AngularVelocityZ] [float] NULL,
|
||||
[AccelerationX] [float] NULL,
|
||||
[AccelerationY] [float] NULL,
|
||||
[AccelerationZ] [float] NULL,
|
||||
[RotationX] [float] NULL,
|
||||
[RotationY] [float] NULL,
|
||||
[RotationZ] [float] NULL,
|
||||
[RotationW] [float] NULL,
|
||||
[SitTargetOffsetX] [float] NULL,
|
||||
[SitTargetOffsetY] [float] NULL,
|
||||
[SitTargetOffsetZ] [float] NULL,
|
||||
[SitTargetOrientW] [float] NULL,
|
||||
[SitTargetOrientX] [float] NULL,
|
||||
[SitTargetOrientY] [float] NULL,
|
||||
[SitTargetOrientZ] [float] NULL,
|
||||
PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[UUID] ASC
|
||||
)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
|
||||
CREATE TABLE [dbo].[primshapes](
|
||||
[UUID] [varchar](255) NOT NULL,
|
||||
[Shape] [int] NULL,
|
||||
[ScaleX] [float] NULL,
|
||||
[ScaleY] [float] NULL,
|
||||
[ScaleZ] [float] NULL,
|
||||
[PCode] [int] NULL,
|
||||
[PathBegin] [int] NULL,
|
||||
[PathEnd] [int] NULL,
|
||||
[PathScaleX] [int] NULL,
|
||||
[PathScaleY] [int] NULL,
|
||||
[PathShearX] [int] NULL,
|
||||
[PathShearY] [int] NULL,
|
||||
[PathSkew] [int] NULL,
|
||||
[PathCurve] [int] NULL,
|
||||
[PathRadiusOffset] [int] NULL,
|
||||
[PathRevolutions] [int] NULL,
|
||||
[PathTaperX] [int] NULL,
|
||||
[PathTaperY] [int] NULL,
|
||||
[PathTwist] [int] NULL,
|
||||
[PathTwistBegin] [int] NULL,
|
||||
[ProfileBegin] [int] NULL,
|
||||
[ProfileEnd] [int] NULL,
|
||||
[ProfileCurve] [int] NULL,
|
||||
[ProfileHollow] [int] NULL,
|
||||
[State] [int] NULL,
|
||||
[Texture] [image] NULL,
|
||||
[ExtraParams] [image] NULL,
|
||||
PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[UUID] ASC
|
||||
)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
|
||||
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
|
||||
|
||||
CREATE TABLE [dbo].[primitems](
|
||||
[itemID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
|
||||
[primID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
|
||||
[assetID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
|
||||
[parentFolderID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
|
||||
[invType] [int] NULL,
|
||||
[assetType] [int] NULL,
|
||||
[name] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
|
||||
[description] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
|
||||
[creationDate] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
|
||||
[creatorID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
|
||||
[ownerID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
|
||||
[lastOwnerID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
|
||||
[groupID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
|
||||
[nextPermissions] [int] NULL,
|
||||
[currentPermissions] [int] NULL,
|
||||
[basePermissions] [int] NULL,
|
||||
[everyonePermissions] [int] NULL,
|
||||
[groupPermissions] [int] NULL,
|
||||
PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[itemID] ASC
|
||||
)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
|
||||
CREATE TABLE [dbo].[terrain](
|
||||
[RegionUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
|
||||
[Revision] [int] NULL,
|
||||
[Heightfield] [image] NULL
|
||||
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
|
||||
|
||||
CREATE TABLE [dbo].[land](
|
||||
[UUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
|
||||
[RegionUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
|
||||
[LocalLandID] [int] NULL,
|
||||
[Bitmap] [image] NULL,
|
||||
[Name] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
|
||||
[Description] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
|
||||
[OwnerUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
|
||||
[IsGroupOwned] [int] NULL,
|
||||
[Area] [int] NULL,
|
||||
[AuctionID] [int] NULL,
|
||||
[Category] [int] NULL,
|
||||
[ClaimDate] [int] NULL,
|
||||
[ClaimPrice] [int] NULL,
|
||||
[GroupUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
|
||||
[SalePrice] [int] NULL,
|
||||
[LandStatus] [int] NULL,
|
||||
[LandFlags] [int] NULL,
|
||||
[LandingType] [int] NULL,
|
||||
[MediaAutoScale] [int] NULL,
|
||||
[MediaTextureUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
|
||||
[MediaURL] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
|
||||
[MusicURL] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
|
||||
[PassHours] [float] NULL,
|
||||
[PassPrice] [int] NULL,
|
||||
[SnapshotUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
|
||||
[UserLocationX] [float] NULL,
|
||||
[UserLocationY] [float] NULL,
|
||||
[UserLocationZ] [float] NULL,
|
||||
[UserLookAtX] [float] NULL,
|
||||
[UserLookAtY] [float] NULL,
|
||||
[UserLookAtZ] [float] NULL,
|
||||
PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[UUID] ASC
|
||||
)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
|
||||
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
|
||||
|
||||
CREATE TABLE [dbo].[landaccesslist](
|
||||
[LandUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
|
||||
[AccessUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
|
||||
[Flags] [int] NULL
|
||||
) ON [PRIMARY]
|
|
@ -1,14 +0,0 @@
|
|||
CREATE TABLE [UserAccounts] (
|
||||
[PrincipalID] uniqueidentifier NOT NULL,
|
||||
[ScopeID] uniqueidentifier NOT NULL,
|
||||
[FirstName] [varchar](64) NOT NULL,
|
||||
[LastName] [varchar](64) NOT NULL,
|
||||
[Email] [varchar](64) NULL,
|
||||
[ServiceURLs] [text] NULL,
|
||||
[Created] [int] default NULL,
|
||||
|
||||
PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[PrincipalID] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
|
@ -1,112 +0,0 @@
|
|||
CREATE TABLE [users] (
|
||||
[UUID] [varchar](36) NOT NULL default '',
|
||||
[username] [varchar](32) NOT NULL,
|
||||
[lastname] [varchar](32) NOT NULL,
|
||||
[passwordHash] [varchar](32) NOT NULL,
|
||||
[passwordSalt] [varchar](32) NOT NULL,
|
||||
[homeRegion] [bigint] default NULL,
|
||||
[homeLocationX] [float] default NULL,
|
||||
[homeLocationY] [float] default NULL,
|
||||
[homeLocationZ] [float] default NULL,
|
||||
[homeLookAtX] [float] default NULL,
|
||||
[homeLookAtY] [float] default NULL,
|
||||
[homeLookAtZ] [float] default NULL,
|
||||
[created] [int] NOT NULL,
|
||||
[lastLogin] [int] NOT NULL,
|
||||
[userInventoryURI] [varchar](255) default NULL,
|
||||
[userAssetURI] [varchar](255) default NULL,
|
||||
[profileCanDoMask] [int] default NULL,
|
||||
[profileWantDoMask] [int] default NULL,
|
||||
[profileAboutText] [ntext],
|
||||
[profileFirstText] [ntext],
|
||||
[profileImage] [varchar](36) default NULL,
|
||||
[profileFirstImage] [varchar](36) default NULL,
|
||||
[webLoginKey] [varchar](36) default NULL,
|
||||
PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[UUID] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
|
||||
|
||||
CREATE NONCLUSTERED INDEX [usernames] ON [users]
|
||||
(
|
||||
[username] ASC,
|
||||
[lastname] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
|
||||
CREATE TABLE [agents] (
|
||||
[UUID] [varchar](36) NOT NULL,
|
||||
[sessionID] [varchar](36) NOT NULL,
|
||||
[secureSessionID] [varchar](36) NOT NULL,
|
||||
[agentIP] [varchar](16) NOT NULL,
|
||||
[agentPort] [int] NOT NULL,
|
||||
[agentOnline] [tinyint] NOT NULL,
|
||||
[loginTime] [int] NOT NULL,
|
||||
[logoutTime] [int] NOT NULL,
|
||||
[currentRegion] [varchar](36) NOT NULL,
|
||||
[currentHandle] [bigint] NOT NULL,
|
||||
[currentPos] [varchar](64) NOT NULL,
|
||||
PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[UUID] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
|
||||
|
||||
CREATE NONCLUSTERED INDEX [session] ON [agents]
|
||||
(
|
||||
[sessionID] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
CREATE NONCLUSTERED INDEX [ssession] ON [agents]
|
||||
(
|
||||
[secureSessionID] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
|
||||
CREATE TABLE [dbo].[userfriends](
|
||||
[ownerID] [varchar](50) COLLATE Latin1_General_CI_AS NOT NULL,
|
||||
[friendID] [varchar](50) COLLATE Latin1_General_CI_AS NOT NULL,
|
||||
[friendPerms] [nvarchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
|
||||
[datetimestamp] [nvarchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
|
||||
) ON [PRIMARY]
|
||||
|
||||
CREATE TABLE [avatarappearance] (
|
||||
[Owner] [varchar](36) NOT NULL,
|
||||
[Serial] int NOT NULL,
|
||||
[Visual_Params] [image] NOT NULL,
|
||||
[Texture] [image] NOT NULL,
|
||||
[Avatar_Height] float NOT NULL,
|
||||
[Body_Item] [varchar](36) NOT NULL,
|
||||
[Body_Asset] [varchar](36) NOT NULL,
|
||||
[Skin_Item] [varchar](36) NOT NULL,
|
||||
[Skin_Asset] [varchar](36) NOT NULL,
|
||||
[Hair_Item] [varchar](36) NOT NULL,
|
||||
[Hair_Asset] [varchar](36) NOT NULL,
|
||||
[Eyes_Item] [varchar](36) NOT NULL,
|
||||
[Eyes_Asset] [varchar](36) NOT NULL,
|
||||
[Shirt_Item] [varchar](36) NOT NULL,
|
||||
[Shirt_Asset] [varchar](36) NOT NULL,
|
||||
[Pants_Item] [varchar](36) NOT NULL,
|
||||
[Pants_Asset] [varchar](36) NOT NULL,
|
||||
[Shoes_Item] [varchar](36) NOT NULL,
|
||||
[Shoes_Asset] [varchar](36) NOT NULL,
|
||||
[Socks_Item] [varchar](36) NOT NULL,
|
||||
[Socks_Asset] [varchar](36) NOT NULL,
|
||||
[Jacket_Item] [varchar](36) NOT NULL,
|
||||
[Jacket_Asset] [varchar](36) NOT NULL,
|
||||
[Gloves_Item] [varchar](36) NOT NULL,
|
||||
[Gloves_Asset] [varchar](36) NOT NULL,
|
||||
[Undershirt_Item] [varchar](36) NOT NULL,
|
||||
[Undershirt_Asset] [varchar](36) NOT NULL,
|
||||
[Underpants_Item] [varchar](36) NOT NULL,
|
||||
[Underpants_Asset] [varchar](36) NOT NULL,
|
||||
[Skirt_Item] [varchar](36) NOT NULL,
|
||||
[Skirt_Asset] [varchar](36) NOT NULL,
|
||||
|
||||
PRIMARY KEY CLUSTERED (
|
||||
[Owner]
|
||||
) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
|
@ -1,29 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE Tmp_assets
|
||||
(
|
||||
id varchar(36) NOT NULL,
|
||||
name varchar(64) NOT NULL,
|
||||
description varchar(64) NOT NULL,
|
||||
assetType tinyint NOT NULL,
|
||||
local bit NOT NULL,
|
||||
temporary bit NOT NULL,
|
||||
data image NOT NULL
|
||||
) ON [PRIMARY]
|
||||
TEXTIMAGE_ON [PRIMARY]
|
||||
|
||||
IF EXISTS(SELECT * FROM assets)
|
||||
EXEC('INSERT INTO Tmp_assets (id, name, description, assetType, local, temporary, data)
|
||||
SELECT id, name, description, assetType, CONVERT(bit, local), CONVERT(bit, temporary), data FROM assets WITH (HOLDLOCK TABLOCKX)')
|
||||
|
||||
DROP TABLE assets
|
||||
|
||||
EXECUTE sp_rename N'Tmp_assets', N'assets', 'OBJECT'
|
||||
|
||||
ALTER TABLE dbo.assets ADD CONSTRAINT
|
||||
PK__assets__id PRIMARY KEY CLUSTERED
|
||||
(
|
||||
id
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
COMMIT
|
|
@ -1,6 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
INSERT INTO auth (UUID, passwordHash, passwordSalt, webLoginKey, accountType) SELECT [UUID] AS UUID, [passwordHash] AS passwordHash, [passwordSalt] AS passwordSalt, [webLoginKey] AS webLoginKey, 'UserAccount' as [accountType] FROM users;
|
||||
|
||||
|
||||
COMMIT
|
|
@ -1,25 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
ALTER TABLE dbo.estate_managers DROP CONSTRAINT PK_estate_managers
|
||||
|
||||
CREATE NONCLUSTERED INDEX IX_estate_managers ON dbo.estate_managers
|
||||
(
|
||||
EstateID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
ALTER TABLE dbo.estate_groups DROP CONSTRAINT PK_estate_groups
|
||||
|
||||
CREATE NONCLUSTERED INDEX IX_estate_groups ON dbo.estate_groups
|
||||
(
|
||||
EstateID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
|
||||
ALTER TABLE dbo.estate_users DROP CONSTRAINT PK_estate_users
|
||||
|
||||
CREATE NONCLUSTERED INDEX IX_estate_users ON dbo.estate_users
|
||||
(
|
||||
EstateID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
COMMIT
|
|
@ -1,6 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
INSERT INTO Friends (PrincipalID, Friend, Flags, Offered) SELECT [ownerID], [friendID], [friendPerms], 0 FROM userfriends;
|
||||
|
||||
|
||||
COMMIT
|
|
@ -1,49 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE Tmp_regions
|
||||
(
|
||||
uuid varchar(36) COLLATE Latin1_General_CI_AS NOT NULL,
|
||||
regionHandle bigint NULL,
|
||||
regionName varchar(20) NULL,
|
||||
regionRecvKey varchar(128) NULL,
|
||||
regionSendKey varchar(128) NULL,
|
||||
regionSecret varchar(128) NULL,
|
||||
regionDataURI varchar(128) NULL,
|
||||
serverIP varchar(64) NULL,
|
||||
serverPort int NULL,
|
||||
serverURI varchar(255) NULL,
|
||||
locX int NULL,
|
||||
locY int NULL,
|
||||
locZ int NULL,
|
||||
eastOverrideHandle bigint NULL,
|
||||
westOverrideHandle bigint NULL,
|
||||
southOverrideHandle bigint NULL,
|
||||
northOverrideHandle bigint NULL,
|
||||
regionAssetURI varchar(255) NULL,
|
||||
regionAssetRecvKey varchar(128) NULL,
|
||||
regionAssetSendKey varchar(128) NULL,
|
||||
regionUserURI varchar(255) NULL,
|
||||
regionUserRecvKey varchar(128) NULL,
|
||||
regionUserSendKey varchar(128) NULL,
|
||||
regionMapTexture varchar(36) NULL,
|
||||
serverHttpPort int NULL,
|
||||
serverRemotingPort int NULL,
|
||||
owner_uuid varchar(36) NULL,
|
||||
originUUID varchar(36) NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000')
|
||||
) ON [PRIMARY]
|
||||
|
||||
IF EXISTS(SELECT * FROM regions)
|
||||
EXEC('INSERT INTO Tmp_regions (uuid, regionHandle, regionName, regionRecvKey, regionSendKey, regionSecret, regionDataURI, serverIP, serverPort, serverURI, locX, locY, locZ, eastOverrideHandle, westOverrideHandle, southOverrideHandle, northOverrideHandle, regionAssetURI, regionAssetRecvKey, regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey, regionMapTexture, serverHttpPort, serverRemotingPort, owner_uuid)
|
||||
SELECT CONVERT(varchar(36), uuid), CONVERT(bigint, regionHandle), CONVERT(varchar(20), regionName), CONVERT(varchar(128), regionRecvKey), CONVERT(varchar(128), regionSendKey), CONVERT(varchar(128), regionSecret), CONVERT(varchar(128), regionDataURI), CONVERT(varchar(64), serverIP), CONVERT(int, serverPort), serverURI, CONVERT(int, locX), CONVERT(int, locY), CONVERT(int, locZ), CONVERT(bigint, eastOverrideHandle), CONVERT(bigint, westOverrideHandle), CONVERT(bigint, southOverrideHandle), CONVERT(bigint, northOverrideHandle), regionAssetURI, CONVERT(varchar(128), regionAssetRecvKey), CONVERT(varchar(128), regionAssetSendKey), regionUserURI, CONVERT(varchar(128), regionUserRecvKey), CONVERT(varchar(128), regionUserSendKey), CONVERT(varchar(36), regionMapTexture), CONVERT(int, serverHttpPort), CONVERT(int, serverRemotingPort), owner_uuid FROM regions')
|
||||
|
||||
DROP TABLE regions
|
||||
|
||||
EXECUTE sp_rename N'Tmp_regions', N'regions', 'OBJECT'
|
||||
|
||||
ALTER TABLE regions ADD CONSTRAINT
|
||||
PK__regions__uuid PRIMARY KEY CLUSTERED
|
||||
(
|
||||
uuid
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
COMMIT
|
|
@ -1,5 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
ALTER TABLE inventoryitems ADD inventoryGroupPermissions INTEGER NOT NULL default 0
|
||||
|
||||
COMMIT
|
|
@ -1,6 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
CREATE UNIQUE INDEX SessionID ON Presence(SessionID);
|
||||
CREATE INDEX UserID ON Presence(UserID);
|
||||
|
||||
COMMIT
|
|
@ -1,50 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE regionban (
|
||||
[regionUUID] VARCHAR(36) NOT NULL,
|
||||
[bannedUUID] VARCHAR(36) NOT NULL,
|
||||
[bannedIp] VARCHAR(16) NOT NULL,
|
||||
[bannedIpHostMask] VARCHAR(16) NOT NULL)
|
||||
|
||||
create table [dbo].[regionsettings] (
|
||||
[regionUUID] [varchar](36) not null,
|
||||
[block_terraform] [bit] not null,
|
||||
[block_fly] [bit] not null,
|
||||
[allow_damage] [bit] not null,
|
||||
[restrict_pushing] [bit] not null,
|
||||
[allow_land_resell] [bit] not null,
|
||||
[allow_land_join_divide] [bit] not null,
|
||||
[block_show_in_search] [bit] not null,
|
||||
[agent_limit] [int] not null,
|
||||
[object_bonus] [float] not null,
|
||||
[maturity] [int] not null,
|
||||
[disable_scripts] [bit] not null,
|
||||
[disable_collisions] [bit] not null,
|
||||
[disable_physics] [bit] not null,
|
||||
[terrain_texture_1] [varchar](36) not null,
|
||||
[terrain_texture_2] [varchar](36) not null,
|
||||
[terrain_texture_3] [varchar](36) not null,
|
||||
[terrain_texture_4] [varchar](36) not null,
|
||||
[elevation_1_nw] [float] not null,
|
||||
[elevation_2_nw] [float] not null,
|
||||
[elevation_1_ne] [float] not null,
|
||||
[elevation_2_ne] [float] not null,
|
||||
[elevation_1_se] [float] not null,
|
||||
[elevation_2_se] [float] not null,
|
||||
[elevation_1_sw] [float] not null,
|
||||
[elevation_2_sw] [float] not null,
|
||||
[water_height] [float] not null,
|
||||
[terrain_raise_limit] [float] not null,
|
||||
[terrain_lower_limit] [float] not null,
|
||||
[use_estate_sun] [bit] not null,
|
||||
[fixed_sun] [bit] not null,
|
||||
[sun_position] [float] not null,
|
||||
[covenant] [varchar](36) default NULL,
|
||||
[Sandbox] [bit] NOT NULL,
|
||||
PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[regionUUID] ASC
|
||||
)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
|
||||
COMMIT
|
|
@ -1,12 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
INSERT INTO UserAccounts (PrincipalID, ScopeID, FirstName, LastName, Email, ServiceURLs, Created) SELECT [UUID] AS PrincipalID, '00000000-0000-0000-0000-000000000000' AS ScopeID,
|
||||
username AS FirstName,
|
||||
lastname AS LastName,
|
||||
email as Email, (
|
||||
'AssetServerURI=' +
|
||||
userAssetURI + ' InventoryServerURI=' + userInventoryURI + ' GatewayURI= HomeURI=') AS ServiceURLs,
|
||||
created as Created FROM users;
|
||||
|
||||
|
||||
COMMIT
|
|
@ -1,9 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
ALTER TABLE users ADD homeRegionID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000';
|
||||
ALTER TABLE users ADD userFlags int NOT NULL default 0;
|
||||
ALTER TABLE users ADD godLevel int NOT NULL default 0;
|
||||
ALTER TABLE users ADD customType varchar(32) not null default '';
|
||||
ALTER TABLE users ADD partner varchar(36) not null default '00000000-0000-0000-0000-000000000000';
|
||||
|
||||
COMMIT
|
|
@ -1,6 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
ALTER TABLE assets add create_time integer default 0
|
||||
ALTER TABLE assets add access_time integer default 0
|
||||
|
||||
COMMIT
|
|
@ -1,25 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE dbo.Tmp_estateban
|
||||
(
|
||||
EstateID int NOT NULL,
|
||||
bannedUUID varchar(36) NOT NULL,
|
||||
bannedIp varchar(16) NULL,
|
||||
bannedIpHostMask varchar(16) NULL,
|
||||
bannedNameMask varchar(64) NULL
|
||||
) ON [PRIMARY]
|
||||
|
||||
IF EXISTS(SELECT * FROM dbo.estateban)
|
||||
EXEC('INSERT INTO dbo.Tmp_estateban (EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask)
|
||||
SELECT EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask FROM dbo.estateban')
|
||||
|
||||
DROP TABLE dbo.estateban
|
||||
|
||||
EXECUTE sp_rename N'dbo.Tmp_estateban', N'estateban', 'OBJECT'
|
||||
|
||||
CREATE NONCLUSTERED INDEX IX_estateban ON dbo.estateban
|
||||
(
|
||||
EstateID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
COMMIT
|
|
@ -1,22 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
CREATE NONCLUSTERED INDEX IX_regions_name ON dbo.regions
|
||||
(
|
||||
regionName
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
CREATE NONCLUSTERED INDEX IX_regions_handle ON dbo.regions
|
||||
(
|
||||
regionHandle
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
|
||||
CREATE NONCLUSTERED INDEX IX_regions_override ON dbo.regions
|
||||
(
|
||||
eastOverrideHandle,
|
||||
westOverrideHandle,
|
||||
southOverrideHandle,
|
||||
northOverrideHandle
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
COMMIT
|
|
@ -1,38 +0,0 @@
|
|||
/* To prevent any potential data loss issues, you should review this script in detail before running it outside the context of the database designer.*/
|
||||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE dbo.Tmp_inventoryfolders
|
||||
(
|
||||
folderID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
|
||||
agentID uniqueidentifier NULL DEFAULT (NULL),
|
||||
parentFolderID uniqueidentifier NULL DEFAULT (NULL),
|
||||
folderName varchar(64) NULL DEFAULT (NULL),
|
||||
type smallint NOT NULL DEFAULT ((0)),
|
||||
version int NOT NULL DEFAULT ((0))
|
||||
) ON [PRIMARY]
|
||||
|
||||
IF EXISTS(SELECT * FROM dbo.inventoryfolders)
|
||||
EXEC('INSERT INTO dbo.Tmp_inventoryfolders (folderID, agentID, parentFolderID, folderName, type, version)
|
||||
SELECT CONVERT(uniqueidentifier, folderID), CONVERT(uniqueidentifier, agentID), CONVERT(uniqueidentifier, parentFolderID), folderName, type, version FROM dbo.inventoryfolders WITH (HOLDLOCK TABLOCKX)')
|
||||
|
||||
DROP TABLE dbo.inventoryfolders
|
||||
|
||||
EXECUTE sp_rename N'dbo.Tmp_inventoryfolders', N'inventoryfolders', 'OBJECT'
|
||||
|
||||
ALTER TABLE dbo.inventoryfolders ADD CONSTRAINT
|
||||
PK__inventor__C2FABFB3173876EA PRIMARY KEY CLUSTERED
|
||||
(
|
||||
folderID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
CREATE NONCLUSTERED INDEX owner ON dbo.inventoryfolders
|
||||
(
|
||||
agentID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
CREATE NONCLUSTERED INDEX parent ON dbo.inventoryfolders
|
||||
(
|
||||
parentFolderID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
COMMIT
|
|
@ -1,67 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE dbo.Tmp_prims
|
||||
(
|
||||
UUID varchar(36) NOT NULL,
|
||||
RegionUUID varchar(36) NULL,
|
||||
ParentID int NULL,
|
||||
CreationDate int NULL,
|
||||
Name varchar(255) NULL,
|
||||
SceneGroupID varchar(36) NULL,
|
||||
Text varchar(255) NULL,
|
||||
Description varchar(255) NULL,
|
||||
SitName varchar(255) NULL,
|
||||
TouchName varchar(255) NULL,
|
||||
ObjectFlags int NULL,
|
||||
CreatorID varchar(36) NULL,
|
||||
OwnerID varchar(36) NULL,
|
||||
GroupID varchar(36) NULL,
|
||||
LastOwnerID varchar(36) NULL,
|
||||
OwnerMask int NULL,
|
||||
NextOwnerMask int NULL,
|
||||
GroupMask int NULL,
|
||||
EveryoneMask int NULL,
|
||||
BaseMask int NULL,
|
||||
PositionX float(53) NULL,
|
||||
PositionY float(53) NULL,
|
||||
PositionZ float(53) NULL,
|
||||
GroupPositionX float(53) NULL,
|
||||
GroupPositionY float(53) NULL,
|
||||
GroupPositionZ float(53) NULL,
|
||||
VelocityX float(53) NULL,
|
||||
VelocityY float(53) NULL,
|
||||
VelocityZ float(53) NULL,
|
||||
AngularVelocityX float(53) NULL,
|
||||
AngularVelocityY float(53) NULL,
|
||||
AngularVelocityZ float(53) NULL,
|
||||
AccelerationX float(53) NULL,
|
||||
AccelerationY float(53) NULL,
|
||||
AccelerationZ float(53) NULL,
|
||||
RotationX float(53) NULL,
|
||||
RotationY float(53) NULL,
|
||||
RotationZ float(53) NULL,
|
||||
RotationW float(53) NULL,
|
||||
SitTargetOffsetX float(53) NULL,
|
||||
SitTargetOffsetY float(53) NULL,
|
||||
SitTargetOffsetZ float(53) NULL,
|
||||
SitTargetOrientW float(53) NULL,
|
||||
SitTargetOrientX float(53) NULL,
|
||||
SitTargetOrientY float(53) NULL,
|
||||
SitTargetOrientZ float(53) NULL
|
||||
) ON [PRIMARY]
|
||||
|
||||
IF EXISTS(SELECT * FROM dbo.prims)
|
||||
EXEC('INSERT INTO dbo.Tmp_prims (UUID, RegionUUID, ParentID, CreationDate, Name, SceneGroupID, Text, Description, SitName, TouchName, ObjectFlags, CreatorID, OwnerID, GroupID, LastOwnerID, OwnerMask, NextOwnerMask, GroupMask, EveryoneMask, BaseMask, PositionX, PositionY, PositionZ, GroupPositionX, GroupPositionY, GroupPositionZ, VelocityX, VelocityY, VelocityZ, AngularVelocityX, AngularVelocityY, AngularVelocityZ, AccelerationX, AccelerationY, AccelerationZ, RotationX, RotationY, RotationZ, RotationW, SitTargetOffsetX, SitTargetOffsetY, SitTargetOffsetZ, SitTargetOrientW, SitTargetOrientX, SitTargetOrientY, SitTargetOrientZ)
|
||||
SELECT CONVERT(varchar(36), UUID), CONVERT(varchar(36), RegionUUID), ParentID, CreationDate, Name, CONVERT(varchar(36), SceneGroupID), Text, Description, SitName, TouchName, ObjectFlags, CONVERT(varchar(36), CreatorID), CONVERT(varchar(36), OwnerID), CONVERT(varchar(36), GroupID), CONVERT(varchar(36), LastOwnerID), OwnerMask, NextOwnerMask, GroupMask, EveryoneMask, BaseMask, PositionX, PositionY, PositionZ, GroupPositionX, GroupPositionY, GroupPositionZ, VelocityX, VelocityY, VelocityZ, AngularVelocityX, AngularVelocityY, AngularVelocityZ, AccelerationX, AccelerationY, AccelerationZ, RotationX, RotationY, RotationZ, RotationW, SitTargetOffsetX, SitTargetOffsetY, SitTargetOffsetZ, SitTargetOrientW, SitTargetOrientX, SitTargetOrientY, SitTargetOrientZ FROM dbo.prims WITH (HOLDLOCK TABLOCKX)')
|
||||
|
||||
DROP TABLE dbo.prims
|
||||
|
||||
EXECUTE sp_rename N'dbo.Tmp_prims', N'prims', 'OBJECT'
|
||||
|
||||
ALTER TABLE dbo.prims ADD CONSTRAINT
|
||||
PK__prims__10566F31 PRIMARY KEY CLUSTERED
|
||||
(
|
||||
UUID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
COMMIT
|
|
@ -1,9 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
CREATE UNIQUE INDEX PrincipalID ON UserAccounts(PrincipalID);
|
||||
CREATE INDEX Email ON UserAccounts(Email);
|
||||
CREATE INDEX FirstName ON UserAccounts(FirstName);
|
||||
CREATE INDEX LastName ON UserAccounts(LastName);
|
||||
CREATE INDEX Name ON UserAccounts(FirstName,LastName);
|
||||
|
||||
COMMIT
|
|
@ -1,15 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE [avatarattachments] (
|
||||
[UUID] varchar(36) NOT NULL
|
||||
, [attachpoint] int NOT NULL
|
||||
, [item] varchar(36) NOT NULL
|
||||
, [asset] varchar(36) NOT NULL)
|
||||
|
||||
CREATE NONCLUSTERED INDEX IX_avatarattachments ON dbo.avatarattachments
|
||||
(
|
||||
UUID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
|
||||
COMMIT
|
|
@ -1,31 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE dbo.Tmp_assets
|
||||
(
|
||||
id uniqueidentifier NOT NULL,
|
||||
name varchar(64) NOT NULL,
|
||||
description varchar(64) NOT NULL,
|
||||
assetType tinyint NOT NULL,
|
||||
local bit NOT NULL,
|
||||
temporary bit NOT NULL,
|
||||
data image NOT NULL,
|
||||
create_time int NULL,
|
||||
access_time int NULL
|
||||
) ON [PRIMARY]
|
||||
TEXTIMAGE_ON [PRIMARY]
|
||||
|
||||
IF EXISTS(SELECT * FROM dbo.assets)
|
||||
EXEC('INSERT INTO dbo.Tmp_assets (id, name, description, assetType, local, temporary, data, create_time, access_time)
|
||||
SELECT CONVERT(uniqueidentifier, id), name, description, assetType, local, temporary, data, create_time, access_time FROM dbo.assets WITH (HOLDLOCK TABLOCKX)')
|
||||
|
||||
DROP TABLE assets
|
||||
|
||||
EXECUTE sp_rename N'Tmp_assets', N'assets', 'OBJECT'
|
||||
|
||||
ALTER TABLE dbo.assets ADD CONSTRAINT
|
||||
PK__assets__id PRIMARY KEY CLUSTERED
|
||||
(
|
||||
id
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
COMMIT
|
|
@ -1,22 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE dbo.Tmp_estate_managers
|
||||
(
|
||||
EstateID int NOT NULL,
|
||||
uuid uniqueidentifier NOT NULL
|
||||
) ON [PRIMARY]
|
||||
|
||||
IF EXISTS(SELECT * FROM dbo.estate_managers)
|
||||
EXEC('INSERT INTO dbo.Tmp_estate_managers (EstateID, uuid)
|
||||
SELECT EstateID, CONVERT(uniqueidentifier, uuid) FROM dbo.estate_managers WITH (HOLDLOCK TABLOCKX)')
|
||||
|
||||
DROP TABLE dbo.estate_managers
|
||||
|
||||
EXECUTE sp_rename N'dbo.Tmp_estate_managers', N'estate_managers', 'OBJECT'
|
||||
|
||||
CREATE NONCLUSTERED INDEX IX_estate_managers ON dbo.estate_managers
|
||||
(
|
||||
EstateID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
COMMIT
|
|
@ -1,68 +0,0 @@
|
|||
/* To prevent any potential data loss issues, you should review this script in detail before running it outside the context of the database designer.*/
|
||||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE dbo.Tmp_regions
|
||||
(
|
||||
uuid uniqueidentifier NOT NULL,
|
||||
regionHandle bigint NULL,
|
||||
regionName varchar(20) NULL,
|
||||
regionRecvKey varchar(128) NULL,
|
||||
regionSendKey varchar(128) NULL,
|
||||
regionSecret varchar(128) NULL,
|
||||
regionDataURI varchar(128) NULL,
|
||||
serverIP varchar(64) NULL,
|
||||
serverPort int NULL,
|
||||
serverURI varchar(255) NULL,
|
||||
locX int NULL,
|
||||
locY int NULL,
|
||||
locZ int NULL,
|
||||
eastOverrideHandle bigint NULL,
|
||||
westOverrideHandle bigint NULL,
|
||||
southOverrideHandle bigint NULL,
|
||||
northOverrideHandle bigint NULL,
|
||||
regionAssetURI varchar(255) NULL,
|
||||
regionAssetRecvKey varchar(128) NULL,
|
||||
regionAssetSendKey varchar(128) NULL,
|
||||
regionUserURI varchar(255) NULL,
|
||||
regionUserRecvKey varchar(128) NULL,
|
||||
regionUserSendKey varchar(128) NULL,
|
||||
regionMapTexture uniqueidentifier NULL,
|
||||
serverHttpPort int NULL,
|
||||
serverRemotingPort int NULL,
|
||||
owner_uuid uniqueidentifier NOT NULL,
|
||||
originUUID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000')
|
||||
) ON [PRIMARY]
|
||||
|
||||
IF EXISTS(SELECT * FROM dbo.regions)
|
||||
EXEC('INSERT INTO dbo.Tmp_regions (uuid, regionHandle, regionName, regionRecvKey, regionSendKey, regionSecret, regionDataURI, serverIP, serverPort, serverURI, locX, locY, locZ, eastOverrideHandle, westOverrideHandle, southOverrideHandle, northOverrideHandle, regionAssetURI, regionAssetRecvKey, regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey, regionMapTexture, serverHttpPort, serverRemotingPort, owner_uuid, originUUID)
|
||||
SELECT CONVERT(uniqueidentifier, uuid), regionHandle, regionName, regionRecvKey, regionSendKey, regionSecret, regionDataURI, serverIP, serverPort, serverURI, locX, locY, locZ, eastOverrideHandle, westOverrideHandle, southOverrideHandle, northOverrideHandle, regionAssetURI, regionAssetRecvKey, regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey, CONVERT(uniqueidentifier, regionMapTexture), serverHttpPort, serverRemotingPort, CONVERT(uniqueidentifier, owner_uuid), CONVERT(uniqueidentifier, originUUID) FROM dbo.regions WITH (HOLDLOCK TABLOCKX)')
|
||||
|
||||
DROP TABLE dbo.regions
|
||||
|
||||
EXECUTE sp_rename N'dbo.Tmp_regions', N'regions', 'OBJECT'
|
||||
|
||||
ALTER TABLE dbo.regions ADD CONSTRAINT
|
||||
PK__regions__uuid PRIMARY KEY CLUSTERED
|
||||
(
|
||||
uuid
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
CREATE NONCLUSTERED INDEX IX_regions_name ON dbo.regions
|
||||
(
|
||||
regionName
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
CREATE NONCLUSTERED INDEX IX_regions_handle ON dbo.regions
|
||||
(
|
||||
regionHandle
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
CREATE NONCLUSTERED INDEX IX_regions_override ON dbo.regions
|
||||
(
|
||||
eastOverrideHandle,
|
||||
westOverrideHandle,
|
||||
southOverrideHandle,
|
||||
northOverrideHandle
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
COMMIT
|
|
@ -1,52 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE dbo.Tmp_inventoryitems
|
||||
(
|
||||
inventoryID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
|
||||
assetID uniqueidentifier NULL DEFAULT (NULL),
|
||||
assetType int NULL DEFAULT (NULL),
|
||||
parentFolderID uniqueidentifier NULL DEFAULT (NULL),
|
||||
avatarID uniqueidentifier NULL DEFAULT (NULL),
|
||||
inventoryName varchar(64) NULL DEFAULT (NULL),
|
||||
inventoryDescription varchar(128) NULL DEFAULT (NULL),
|
||||
inventoryNextPermissions int NULL DEFAULT (NULL),
|
||||
inventoryCurrentPermissions int NULL DEFAULT (NULL),
|
||||
invType int NULL DEFAULT (NULL),
|
||||
creatorID uniqueidentifier NULL DEFAULT (NULL),
|
||||
inventoryBasePermissions int NOT NULL DEFAULT ((0)),
|
||||
inventoryEveryOnePermissions int NOT NULL DEFAULT ((0)),
|
||||
salePrice int NULL DEFAULT (NULL),
|
||||
saleType tinyint NULL DEFAULT (NULL),
|
||||
creationDate int NULL DEFAULT (NULL),
|
||||
groupID uniqueidentifier NULL DEFAULT (NULL),
|
||||
groupOwned bit NULL DEFAULT (NULL),
|
||||
flags int NULL DEFAULT (NULL),
|
||||
inventoryGroupPermissions int NOT NULL DEFAULT ((0))
|
||||
) ON [PRIMARY]
|
||||
|
||||
IF EXISTS(SELECT * FROM dbo.inventoryitems)
|
||||
EXEC('INSERT INTO dbo.Tmp_inventoryitems (inventoryID, assetID, assetType, parentFolderID, avatarID, inventoryName, inventoryDescription, inventoryNextPermissions, inventoryCurrentPermissions, invType, creatorID, inventoryBasePermissions, inventoryEveryOnePermissions, salePrice, saleType, creationDate, groupID, groupOwned, flags, inventoryGroupPermissions)
|
||||
SELECT CONVERT(uniqueidentifier, inventoryID), CONVERT(uniqueidentifier, assetID), assetType, CONVERT(uniqueidentifier, parentFolderID), CONVERT(uniqueidentifier, avatarID), inventoryName, inventoryDescription, inventoryNextPermissions, inventoryCurrentPermissions, invType, CONVERT(uniqueidentifier, creatorID), inventoryBasePermissions, inventoryEveryOnePermissions, salePrice, saleType, creationDate, CONVERT(uniqueidentifier, groupID), groupOwned, flags, inventoryGroupPermissions FROM dbo.inventoryitems WITH (HOLDLOCK TABLOCKX)')
|
||||
|
||||
DROP TABLE dbo.inventoryitems
|
||||
|
||||
EXECUTE sp_rename N'dbo.Tmp_inventoryitems', N'inventoryitems', 'OBJECT'
|
||||
|
||||
ALTER TABLE dbo.inventoryitems ADD CONSTRAINT
|
||||
PK__inventor__C4B7BC2220C1E124 PRIMARY KEY CLUSTERED
|
||||
(
|
||||
inventoryID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
|
||||
CREATE NONCLUSTERED INDEX owner ON dbo.inventoryitems
|
||||
(
|
||||
avatarID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
CREATE NONCLUSTERED INDEX folder ON dbo.inventoryitems
|
||||
(
|
||||
parentFolderID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
COMMIT
|
|
@ -1,40 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE Tmp_primitems
|
||||
(
|
||||
itemID varchar(36) NOT NULL,
|
||||
primID varchar(36) NULL,
|
||||
assetID varchar(36) NULL,
|
||||
parentFolderID varchar(36) NULL,
|
||||
invType int NULL,
|
||||
assetType int NULL,
|
||||
name varchar(255) NULL,
|
||||
description varchar(255) NULL,
|
||||
creationDate varchar(255) NULL,
|
||||
creatorID varchar(36) NULL,
|
||||
ownerID varchar(36) NULL,
|
||||
lastOwnerID varchar(36) NULL,
|
||||
groupID varchar(36) NULL,
|
||||
nextPermissions int NULL,
|
||||
currentPermissions int NULL,
|
||||
basePermissions int NULL,
|
||||
everyonePermissions int NULL,
|
||||
groupPermissions int NULL
|
||||
) ON [PRIMARY]
|
||||
|
||||
IF EXISTS(SELECT * FROM primitems)
|
||||
EXEC('INSERT INTO Tmp_primitems (itemID, primID, assetID, parentFolderID, invType, assetType, name, description, creationDate, creatorID, ownerID, lastOwnerID, groupID, nextPermissions, currentPermissions, basePermissions, everyonePermissions, groupPermissions)
|
||||
SELECT CONVERT(varchar(36), itemID), CONVERT(varchar(36), primID), CONVERT(varchar(36), assetID), CONVERT(varchar(36), parentFolderID), invType, assetType, name, description, creationDate, CONVERT(varchar(36), creatorID), CONVERT(varchar(36), ownerID), CONVERT(varchar(36), lastOwnerID), CONVERT(varchar(36), groupID), nextPermissions, currentPermissions, basePermissions, everyonePermissions, groupPermissions')
|
||||
|
||||
DROP TABLE primitems
|
||||
|
||||
EXECUTE sp_rename N'Tmp_primitems', N'primitems', 'OBJECT'
|
||||
|
||||
ALTER TABLE primitems ADD CONSTRAINT
|
||||
PK__primitems__0A688BB1 PRIMARY KEY CLUSTERED
|
||||
(
|
||||
itemID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
|
||||
COMMIT
|
|
@ -1,7 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
ALTER TABLE UserAccounts ADD UserLevel integer NOT NULL DEFAULT 0;
|
||||
ALTER TABLE UserAccounts ADD UserFlags integer NOT NULL DEFAULT 0;
|
||||
ALTER TABLE UserAccounts ADD UserTitle varchar(64) NOT NULL DEFAULT '';
|
||||
|
||||
COMMIT
|
|
@ -1,29 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE Tmp_userfriends
|
||||
(
|
||||
ownerID varchar(36) NOT NULL,
|
||||
friendID varchar(36) NOT NULL,
|
||||
friendPerms int NOT NULL,
|
||||
datetimestamp int NOT NULL
|
||||
) ON [PRIMARY]
|
||||
|
||||
IF EXISTS(SELECT * FROM userfriends)
|
||||
EXEC('INSERT INTO dbo.Tmp_userfriends (ownerID, friendID, friendPerms, datetimestamp)
|
||||
SELECT CONVERT(varchar(36), ownerID), CONVERT(varchar(36), friendID), CONVERT(int, friendPerms), CONVERT(int, datetimestamp) FROM dbo.userfriends WITH (HOLDLOCK TABLOCKX)')
|
||||
|
||||
DROP TABLE dbo.userfriends
|
||||
|
||||
EXECUTE sp_rename N'Tmp_userfriends', N'userfriends', 'OBJECT'
|
||||
|
||||
CREATE NONCLUSTERED INDEX IX_userfriends_ownerID ON userfriends
|
||||
(
|
||||
ownerID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
CREATE NONCLUSTERED INDEX IX_userfriends_friendID ON userfriends
|
||||
(
|
||||
friendID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
COMMIT
|
|
@ -1 +0,0 @@
|
|||
DELETE FROM assets WHERE id = 'dc4b9f0b-d008-45c6-96a4-01dd947ac621';
|
|
@ -1,22 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE dbo.Tmp_estate_groups
|
||||
(
|
||||
EstateID int NOT NULL,
|
||||
uuid uniqueidentifier NOT NULL
|
||||
) ON [PRIMARY]
|
||||
|
||||
IF EXISTS(SELECT * FROM dbo.estate_groups)
|
||||
EXEC('INSERT INTO dbo.Tmp_estate_groups (EstateID, uuid)
|
||||
SELECT EstateID, CONVERT(uniqueidentifier, uuid) FROM dbo.estate_groups WITH (HOLDLOCK TABLOCKX)')
|
||||
|
||||
DROP TABLE dbo.estate_groups
|
||||
|
||||
EXECUTE sp_rename N'dbo.Tmp_estate_groups', N'estate_groups', 'OBJECT'
|
||||
|
||||
CREATE NONCLUSTERED INDEX IX_estate_groups ON dbo.estate_groups
|
||||
(
|
||||
EstateID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
COMMIT
|
|
@ -1,5 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
ALTER TABLE regions ADD access int default 0;
|
||||
|
||||
COMMIT
|
|
@ -1,49 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE Tmp_primshapes
|
||||
(
|
||||
UUID varchar(36) NOT NULL,
|
||||
Shape int NULL,
|
||||
ScaleX float(53) NULL,
|
||||
ScaleY float(53) NULL,
|
||||
ScaleZ float(53) NULL,
|
||||
PCode int NULL,
|
||||
PathBegin int NULL,
|
||||
PathEnd int NULL,
|
||||
PathScaleX int NULL,
|
||||
PathScaleY int NULL,
|
||||
PathShearX int NULL,
|
||||
PathShearY int NULL,
|
||||
PathSkew int NULL,
|
||||
PathCurve int NULL,
|
||||
PathRadiusOffset int NULL,
|
||||
PathRevolutions int NULL,
|
||||
PathTaperX int NULL,
|
||||
PathTaperY int NULL,
|
||||
PathTwist int NULL,
|
||||
PathTwistBegin int NULL,
|
||||
ProfileBegin int NULL,
|
||||
ProfileEnd int NULL,
|
||||
ProfileCurve int NULL,
|
||||
ProfileHollow int NULL,
|
||||
State int NULL,
|
||||
Texture image NULL,
|
||||
ExtraParams image NULL
|
||||
) ON [PRIMARY]
|
||||
TEXTIMAGE_ON [PRIMARY]
|
||||
|
||||
IF EXISTS(SELECT * FROM primshapes)
|
||||
EXEC('INSERT INTO Tmp_primshapes (UUID, Shape, ScaleX, ScaleY, ScaleZ, PCode, PathBegin, PathEnd, PathScaleX, PathScaleY, PathShearX, PathShearY, PathSkew, PathCurve, PathRadiusOffset, PathRevolutions, PathTaperX, PathTaperY, PathTwist, PathTwistBegin, ProfileBegin, ProfileEnd, ProfileCurve, ProfileHollow, State, Texture, ExtraParams)
|
||||
SELECT CONVERT(varchar(36), UUID), Shape, ScaleX, ScaleY, ScaleZ, PCode, PathBegin, PathEnd, PathScaleX, PathScaleY, PathShearX, PathShearY, PathSkew, PathCurve, PathRadiusOffset, PathRevolutions, PathTaperX, PathTaperY, PathTwist, PathTwistBegin, ProfileBegin, ProfileEnd, ProfileCurve, ProfileHollow, State, Texture, ExtraParams FROM primshapes WITH (HOLDLOCK TABLOCKX)')
|
||||
|
||||
DROP TABLE primshapes
|
||||
|
||||
EXECUTE sp_rename N'Tmp_primshapes', N'primshapes', 'OBJECT'
|
||||
|
||||
ALTER TABLE primshapes ADD CONSTRAINT
|
||||
PK__primshapes__0880433F PRIMARY KEY CLUSTERED
|
||||
(
|
||||
UUID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
COMMIT
|
|
@ -1,5 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
ALTER TABLE users add email varchar(250);
|
||||
|
||||
COMMIT
|
|
@ -1,22 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE dbo.Tmp_estate_users
|
||||
(
|
||||
EstateID int NOT NULL,
|
||||
uuid uniqueidentifier NOT NULL
|
||||
) ON [PRIMARY]
|
||||
|
||||
IF EXISTS(SELECT * FROM dbo.estate_users)
|
||||
EXEC('INSERT INTO dbo.Tmp_estate_users (EstateID, uuid)
|
||||
SELECT EstateID, CONVERT(uniqueidentifier, uuid) FROM dbo.estate_users WITH (HOLDLOCK TABLOCKX)')
|
||||
|
||||
DROP TABLE dbo.estate_users
|
||||
|
||||
EXECUTE sp_rename N'dbo.Tmp_estate_users', N'estate_users', 'OBJECT'
|
||||
|
||||
CREATE NONCLUSTERED INDEX IX_estate_users ON dbo.estate_users
|
||||
(
|
||||
EstateID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
COMMIT
|
|
@ -1,8 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
ALTER TABLE regions ADD scopeid uniqueidentifier default '00000000-0000-0000-0000-000000000000';
|
||||
ALTER TABLE regions ADD DEFAULT ('00000000-0000-0000-0000-000000000000') FOR [owner_uuid];
|
||||
ALTER TABLE regions ADD sizeX integer not null default 0;
|
||||
ALTER TABLE regions ADD sizeY integer not null default 0;
|
||||
|
||||
COMMIT
|
|
@ -1,36 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
ALTER TABLE prims ADD PayPrice int not null default 0
|
||||
ALTER TABLE prims ADD PayButton1 int not null default 0
|
||||
ALTER TABLE prims ADD PayButton2 int not null default 0
|
||||
ALTER TABLE prims ADD PayButton3 int not null default 0
|
||||
ALTER TABLE prims ADD PayButton4 int not null default 0
|
||||
ALTER TABLE prims ADD LoopedSound varchar(36) not null default '00000000-0000-0000-0000-000000000000';
|
||||
ALTER TABLE prims ADD LoopedSoundGain float not null default 0.0;
|
||||
ALTER TABLE prims ADD TextureAnimation image
|
||||
ALTER TABLE prims ADD OmegaX float not null default 0.0
|
||||
ALTER TABLE prims ADD OmegaY float not null default 0.0
|
||||
ALTER TABLE prims ADD OmegaZ float not null default 0.0
|
||||
ALTER TABLE prims ADD CameraEyeOffsetX float not null default 0.0
|
||||
ALTER TABLE prims ADD CameraEyeOffsetY float not null default 0.0
|
||||
ALTER TABLE prims ADD CameraEyeOffsetZ float not null default 0.0
|
||||
ALTER TABLE prims ADD CameraAtOffsetX float not null default 0.0
|
||||
ALTER TABLE prims ADD CameraAtOffsetY float not null default 0.0
|
||||
ALTER TABLE prims ADD CameraAtOffsetZ float not null default 0.0
|
||||
ALTER TABLE prims ADD ForceMouselook tinyint not null default 0
|
||||
ALTER TABLE prims ADD ScriptAccessPin int not null default 0
|
||||
ALTER TABLE prims ADD AllowedDrop tinyint not null default 0
|
||||
ALTER TABLE prims ADD DieAtEdge tinyint not null default 0
|
||||
ALTER TABLE prims ADD SalePrice int not null default 10
|
||||
ALTER TABLE prims ADD SaleType tinyint not null default 0
|
||||
|
||||
ALTER TABLE primitems add flags integer not null default 0
|
||||
|
||||
ALTER TABLE land ADD AuthbuyerID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000'
|
||||
|
||||
CREATE index prims_regionuuid on prims(RegionUUID)
|
||||
CREATE index prims_parentid on prims(ParentID)
|
||||
|
||||
CREATE index primitems_primid on primitems(primID)
|
||||
|
||||
COMMIT
|
|
@ -1,57 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE dbo.Tmp_users
|
||||
(
|
||||
UUID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
|
||||
username varchar(32) NOT NULL,
|
||||
lastname varchar(32) NOT NULL,
|
||||
passwordHash varchar(32) NOT NULL,
|
||||
passwordSalt varchar(32) NOT NULL,
|
||||
homeRegion bigint NULL DEFAULT (NULL),
|
||||
homeLocationX float(53) NULL DEFAULT (NULL),
|
||||
homeLocationY float(53) NULL DEFAULT (NULL),
|
||||
homeLocationZ float(53) NULL DEFAULT (NULL),
|
||||
homeLookAtX float(53) NULL DEFAULT (NULL),
|
||||
homeLookAtY float(53) NULL DEFAULT (NULL),
|
||||
homeLookAtZ float(53) NULL DEFAULT (NULL),
|
||||
created int NOT NULL,
|
||||
lastLogin int NOT NULL,
|
||||
userInventoryURI varchar(255) NULL DEFAULT (NULL),
|
||||
userAssetURI varchar(255) NULL DEFAULT (NULL),
|
||||
profileCanDoMask int NULL DEFAULT (NULL),
|
||||
profileWantDoMask int NULL DEFAULT (NULL),
|
||||
profileAboutText ntext NULL,
|
||||
profileFirstText ntext NULL,
|
||||
profileImage uniqueidentifier NULL DEFAULT (NULL),
|
||||
profileFirstImage uniqueidentifier NULL DEFAULT (NULL),
|
||||
webLoginKey uniqueidentifier NULL DEFAULT (NULL),
|
||||
homeRegionID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
|
||||
userFlags int NOT NULL DEFAULT ((0)),
|
||||
godLevel int NOT NULL DEFAULT ((0)),
|
||||
customType varchar(32) NOT NULL DEFAULT (''),
|
||||
partner uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
|
||||
email varchar(250) NULL
|
||||
) ON [PRIMARY]
|
||||
TEXTIMAGE_ON [PRIMARY]
|
||||
|
||||
IF EXISTS(SELECT * FROM dbo.users)
|
||||
EXEC('INSERT INTO dbo.Tmp_users (UUID, username, lastname, passwordHash, passwordSalt, homeRegion, homeLocationX, homeLocationY, homeLocationZ, homeLookAtX, homeLookAtY, homeLookAtZ, created, lastLogin, userInventoryURI, userAssetURI, profileCanDoMask, profileWantDoMask, profileAboutText, profileFirstText, profileImage, profileFirstImage, webLoginKey, homeRegionID, userFlags, godLevel, customType, partner, email)
|
||||
SELECT CONVERT(uniqueidentifier, UUID), username, lastname, passwordHash, passwordSalt, homeRegion, homeLocationX, homeLocationY, homeLocationZ, homeLookAtX, homeLookAtY, homeLookAtZ, created, lastLogin, userInventoryURI, userAssetURI, profileCanDoMask, profileWantDoMask, profileAboutText, profileFirstText, CONVERT(uniqueidentifier, profileImage), CONVERT(uniqueidentifier, profileFirstImage), CONVERT(uniqueidentifier, webLoginKey), CONVERT(uniqueidentifier, homeRegionID), userFlags, godLevel, customType, CONVERT(uniqueidentifier, partner), email FROM dbo.users WITH (HOLDLOCK TABLOCKX)')
|
||||
|
||||
DROP TABLE dbo.users
|
||||
|
||||
EXECUTE sp_rename N'dbo.Tmp_users', N'users', 'OBJECT'
|
||||
|
||||
ALTER TABLE dbo.users ADD CONSTRAINT
|
||||
PK__users__65A475E737A5467C PRIMARY KEY CLUSTERED
|
||||
(
|
||||
UUID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
CREATE NONCLUSTERED INDEX usernames ON dbo.users
|
||||
(
|
||||
username,
|
||||
lastname
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
COMMIT
|
|
@ -1,25 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE dbo.Tmp_estateban
|
||||
(
|
||||
EstateID int NOT NULL,
|
||||
bannedUUID uniqueidentifier NOT NULL,
|
||||
bannedIp varchar(16) NULL,
|
||||
bannedIpHostMask varchar(16) NULL,
|
||||
bannedNameMask varchar(64) NULL
|
||||
) ON [PRIMARY]
|
||||
|
||||
IF EXISTS(SELECT * FROM dbo.estateban)
|
||||
EXEC('INSERT INTO dbo.Tmp_estateban (EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask)
|
||||
SELECT EstateID, CONVERT(uniqueidentifier, bannedUUID), bannedIp, bannedIpHostMask, bannedNameMask FROM dbo.estateban WITH (HOLDLOCK TABLOCKX)')
|
||||
|
||||
DROP TABLE dbo.estateban
|
||||
|
||||
EXECUTE sp_rename N'dbo.Tmp_estateban', N'estateban', 'OBJECT'
|
||||
|
||||
CREATE NONCLUSTERED INDEX IX_estateban ON dbo.estateban
|
||||
(
|
||||
EstateID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
COMMIT
|
|
@ -1,9 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
ALTER TABLE regions ADD [flags] integer NOT NULL DEFAULT 0;
|
||||
CREATE INDEX [flags] ON regions(flags);
|
||||
ALTER TABLE [regions] ADD [last_seen] integer NOT NULL DEFAULT 0;
|
||||
ALTER TABLE [regions] ADD [PrincipalID] uniqueidentifier NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000';
|
||||
ALTER TABLE [regions] ADD [Token] varchar(255) NOT NULL DEFAULT 0;
|
||||
|
||||
COMMIT
|
|
@ -1,10 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
ALTER TABLE prims ADD ColorR int not null default 0;
|
||||
ALTER TABLE prims ADD ColorG int not null default 0;
|
||||
ALTER TABLE prims ADD ColorB int not null default 0;
|
||||
ALTER TABLE prims ADD ColorA int not null default 0;
|
||||
ALTER TABLE prims ADD ParticleSystem IMAGE;
|
||||
ALTER TABLE prims ADD ClickAction tinyint NOT NULL default 0;
|
||||
|
||||
COMMIT
|
|
@ -1,42 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE dbo.Tmp_agents
|
||||
(
|
||||
UUID uniqueidentifier NOT NULL,
|
||||
sessionID uniqueidentifier NOT NULL,
|
||||
secureSessionID uniqueidentifier NOT NULL,
|
||||
agentIP varchar(16) NOT NULL,
|
||||
agentPort int NOT NULL,
|
||||
agentOnline tinyint NOT NULL,
|
||||
loginTime int NOT NULL,
|
||||
logoutTime int NOT NULL,
|
||||
currentRegion uniqueidentifier NOT NULL,
|
||||
currentHandle bigint NOT NULL,
|
||||
currentPos varchar(64) NOT NULL
|
||||
) ON [PRIMARY]
|
||||
|
||||
IF EXISTS(SELECT * FROM dbo.agents)
|
||||
EXEC('INSERT INTO dbo.Tmp_agents (UUID, sessionID, secureSessionID, agentIP, agentPort, agentOnline, loginTime, logoutTime, currentRegion, currentHandle, currentPos)
|
||||
SELECT CONVERT(uniqueidentifier, UUID), CONVERT(uniqueidentifier, sessionID), CONVERT(uniqueidentifier, secureSessionID), agentIP, agentPort, agentOnline, loginTime, logoutTime, CONVERT(uniqueidentifier, currentRegion), currentHandle, currentPos FROM dbo.agents WITH (HOLDLOCK TABLOCKX)')
|
||||
|
||||
DROP TABLE dbo.agents
|
||||
|
||||
EXECUTE sp_rename N'dbo.Tmp_agents', N'agents', 'OBJECT'
|
||||
|
||||
ALTER TABLE dbo.agents ADD CONSTRAINT
|
||||
PK__agents__65A475E749C3F6B7 PRIMARY KEY CLUSTERED
|
||||
(
|
||||
UUID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
CREATE NONCLUSTERED INDEX session ON dbo.agents
|
||||
(
|
||||
sessionID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
CREATE NONCLUSTERED INDEX ssession ON dbo.agents
|
||||
(
|
||||
secureSessionID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
COMMIT
|
|
@ -1,49 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE dbo.Tmp_estate_settings
|
||||
(
|
||||
EstateID int NOT NULL IDENTITY (1, 100),
|
||||
EstateName varchar(64) NULL DEFAULT (NULL),
|
||||
AbuseEmailToEstateOwner bit NOT NULL,
|
||||
DenyAnonymous bit NOT NULL,
|
||||
ResetHomeOnTeleport bit NOT NULL,
|
||||
FixedSun bit NOT NULL,
|
||||
DenyTransacted bit NOT NULL,
|
||||
BlockDwell bit NOT NULL,
|
||||
DenyIdentified bit NOT NULL,
|
||||
AllowVoice bit NOT NULL,
|
||||
UseGlobalTime bit NOT NULL,
|
||||
PricePerMeter int NOT NULL,
|
||||
TaxFree bit NOT NULL,
|
||||
AllowDirectTeleport bit NOT NULL,
|
||||
RedirectGridX int NOT NULL,
|
||||
RedirectGridY int NOT NULL,
|
||||
ParentEstateID int NOT NULL,
|
||||
SunPosition float(53) NOT NULL,
|
||||
EstateSkipScripts bit NOT NULL,
|
||||
BillableFactor float(53) NOT NULL,
|
||||
PublicAccess bit NOT NULL,
|
||||
AbuseEmail varchar(255) NOT NULL,
|
||||
EstateOwner uniqueidentifier NOT NULL,
|
||||
DenyMinors bit NOT NULL
|
||||
) ON [PRIMARY]
|
||||
|
||||
SET IDENTITY_INSERT dbo.Tmp_estate_settings ON
|
||||
|
||||
IF EXISTS(SELECT * FROM dbo.estate_settings)
|
||||
EXEC('INSERT INTO dbo.Tmp_estate_settings (EstateID, EstateName, AbuseEmailToEstateOwner, DenyAnonymous, ResetHomeOnTeleport, FixedSun, DenyTransacted, BlockDwell, DenyIdentified, AllowVoice, UseGlobalTime, PricePerMeter, TaxFree, AllowDirectTeleport, RedirectGridX, RedirectGridY, ParentEstateID, SunPosition, EstateSkipScripts, BillableFactor, PublicAccess, AbuseEmail, EstateOwner, DenyMinors)
|
||||
SELECT EstateID, EstateName, AbuseEmailToEstateOwner, DenyAnonymous, ResetHomeOnTeleport, FixedSun, DenyTransacted, BlockDwell, DenyIdentified, AllowVoice, UseGlobalTime, PricePerMeter, TaxFree, AllowDirectTeleport, RedirectGridX, RedirectGridY, ParentEstateID, SunPosition, EstateSkipScripts, BillableFactor, PublicAccess, AbuseEmail, CONVERT(uniqueidentifier, EstateOwner), DenyMinors FROM dbo.estate_settings WITH (HOLDLOCK TABLOCKX)')
|
||||
|
||||
SET IDENTITY_INSERT dbo.Tmp_estate_settings OFF
|
||||
|
||||
DROP TABLE dbo.estate_settings
|
||||
|
||||
EXECUTE sp_rename N'dbo.Tmp_estate_settings', N'estate_settings', 'OBJECT'
|
||||
|
||||
ALTER TABLE dbo.estate_settings ADD CONSTRAINT
|
||||
PK_estate_settings PRIMARY KEY CLUSTERED
|
||||
(
|
||||
EstateID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
COMMIT
|
|
@ -1,7 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
ALTER TABLE land ADD OtherCleanTime integer NOT NULL default 0;
|
||||
ALTER TABLE land ADD Dwell integer NOT NULL default 0;
|
||||
|
||||
COMMIT
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE dbo.Tmp_userfriends
|
||||
(
|
||||
ownerID uniqueidentifier NOT NULL,
|
||||
friendID uniqueidentifier NOT NULL,
|
||||
friendPerms int NOT NULL,
|
||||
datetimestamp int NOT NULL
|
||||
) ON [PRIMARY]
|
||||
|
||||
IF EXISTS(SELECT * FROM dbo.userfriends)
|
||||
EXEC('INSERT INTO dbo.Tmp_userfriends (ownerID, friendID, friendPerms, datetimestamp)
|
||||
SELECT CONVERT(uniqueidentifier, ownerID), CONVERT(uniqueidentifier, friendID), friendPerms, datetimestamp FROM dbo.userfriends WITH (HOLDLOCK TABLOCKX)')
|
||||
|
||||
DROP TABLE dbo.userfriends
|
||||
|
||||
EXECUTE sp_rename N'dbo.Tmp_userfriends', N'userfriends', 'OBJECT'
|
||||
|
||||
CREATE NONCLUSTERED INDEX IX_userfriends_ownerID ON dbo.userfriends
|
||||
(
|
||||
ownerID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
CREATE NONCLUSTERED INDEX IX_userfriends_friendID ON dbo.userfriends
|
||||
(
|
||||
friendID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
COMMIT
|
|
@ -1,24 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE dbo.Tmp_estate_map
|
||||
(
|
||||
RegionID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
|
||||
EstateID int NOT NULL
|
||||
) ON [PRIMARY]
|
||||
|
||||
IF EXISTS(SELECT * FROM dbo.estate_map)
|
||||
EXEC('INSERT INTO dbo.Tmp_estate_map (RegionID, EstateID)
|
||||
SELECT CONVERT(uniqueidentifier, RegionID), EstateID FROM dbo.estate_map WITH (HOLDLOCK TABLOCKX)')
|
||||
|
||||
DROP TABLE dbo.estate_map
|
||||
|
||||
EXECUTE sp_rename N'dbo.Tmp_estate_map', N'estate_map', 'OBJECT'
|
||||
|
||||
ALTER TABLE dbo.estate_map ADD CONSTRAINT
|
||||
PK_estate_map PRIMARY KEY CLUSTERED
|
||||
(
|
||||
RegionID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
|
||||
COMMIT
|
|
@ -1,5 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
ALTER TABLE prims ADD Material tinyint NOT NULL default 3
|
||||
|
||||
COMMIT
|
|
@ -1,53 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE dbo.Tmp_avatarappearance
|
||||
(
|
||||
Owner uniqueidentifier NOT NULL,
|
||||
Serial int NOT NULL,
|
||||
Visual_Params image NOT NULL,
|
||||
Texture image NOT NULL,
|
||||
Avatar_Height float(53) NOT NULL,
|
||||
Body_Item uniqueidentifier NOT NULL,
|
||||
Body_Asset uniqueidentifier NOT NULL,
|
||||
Skin_Item uniqueidentifier NOT NULL,
|
||||
Skin_Asset uniqueidentifier NOT NULL,
|
||||
Hair_Item uniqueidentifier NOT NULL,
|
||||
Hair_Asset uniqueidentifier NOT NULL,
|
||||
Eyes_Item uniqueidentifier NOT NULL,
|
||||
Eyes_Asset uniqueidentifier NOT NULL,
|
||||
Shirt_Item uniqueidentifier NOT NULL,
|
||||
Shirt_Asset uniqueidentifier NOT NULL,
|
||||
Pants_Item uniqueidentifier NOT NULL,
|
||||
Pants_Asset uniqueidentifier NOT NULL,
|
||||
Shoes_Item uniqueidentifier NOT NULL,
|
||||
Shoes_Asset uniqueidentifier NOT NULL,
|
||||
Socks_Item uniqueidentifier NOT NULL,
|
||||
Socks_Asset uniqueidentifier NOT NULL,
|
||||
Jacket_Item uniqueidentifier NOT NULL,
|
||||
Jacket_Asset uniqueidentifier NOT NULL,
|
||||
Gloves_Item uniqueidentifier NOT NULL,
|
||||
Gloves_Asset uniqueidentifier NOT NULL,
|
||||
Undershirt_Item uniqueidentifier NOT NULL,
|
||||
Undershirt_Asset uniqueidentifier NOT NULL,
|
||||
Underpants_Item uniqueidentifier NOT NULL,
|
||||
Underpants_Asset uniqueidentifier NOT NULL,
|
||||
Skirt_Item uniqueidentifier NOT NULL,
|
||||
Skirt_Asset uniqueidentifier NOT NULL
|
||||
) ON [PRIMARY]
|
||||
TEXTIMAGE_ON [PRIMARY]
|
||||
|
||||
IF EXISTS(SELECT * FROM dbo.avatarappearance)
|
||||
EXEC('INSERT INTO dbo.Tmp_avatarappearance (Owner, Serial, Visual_Params, Texture, Avatar_Height, Body_Item, Body_Asset, Skin_Item, Skin_Asset, Hair_Item, Hair_Asset, Eyes_Item, Eyes_Asset, Shirt_Item, Shirt_Asset, Pants_Item, Pants_Asset, Shoes_Item, Shoes_Asset, Socks_Item, Socks_Asset, Jacket_Item, Jacket_Asset, Gloves_Item, Gloves_Asset, Undershirt_Item, Undershirt_Asset, Underpants_Item, Underpants_Asset, Skirt_Item, Skirt_Asset)
|
||||
SELECT CONVERT(uniqueidentifier, Owner), Serial, Visual_Params, Texture, Avatar_Height, CONVERT(uniqueidentifier, Body_Item), CONVERT(uniqueidentifier, Body_Asset), CONVERT(uniqueidentifier, Skin_Item), CONVERT(uniqueidentifier, Skin_Asset), CONVERT(uniqueidentifier, Hair_Item), CONVERT(uniqueidentifier, Hair_Asset), CONVERT(uniqueidentifier, Eyes_Item), CONVERT(uniqueidentifier, Eyes_Asset), CONVERT(uniqueidentifier, Shirt_Item), CONVERT(uniqueidentifier, Shirt_Asset), CONVERT(uniqueidentifier, Pants_Item), CONVERT(uniqueidentifier, Pants_Asset), CONVERT(uniqueidentifier, Shoes_Item), CONVERT(uniqueidentifier, Shoes_Asset), CONVERT(uniqueidentifier, Socks_Item), CONVERT(uniqueidentifier, Socks_Asset), CONVERT(uniqueidentifier, Jacket_Item), CONVERT(uniqueidentifier, Jacket_Asset), CONVERT(uniqueidentifier, Gloves_Item), CONVERT(uniqueidentifier, Gloves_Asset), CONVERT(uniqueidentifier, Undershirt_Item), CONVERT(uniqueidentifier, Undershirt_Asset), CONVERT(uniqueidentifier, Underpants_Item), CONVERT(uniqueidentifier, Underpants_Asset), CONVERT(uniqueidentifier, Skirt_Item), CONVERT(uniqueidentifier, Skirt_Asset) FROM dbo.avatarappearance WITH (HOLDLOCK TABLOCKX)')
|
||||
|
||||
DROP TABLE dbo.avatarappearance
|
||||
|
||||
EXECUTE sp_rename N'dbo.Tmp_avatarappearance', N'avatarappearance', 'OBJECT'
|
||||
|
||||
ALTER TABLE dbo.avatarappearance ADD CONSTRAINT
|
||||
PK__avatarap__7DD115CC4E88ABD4 PRIMARY KEY CLUSTERED
|
||||
(
|
||||
Owner
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
COMMIT
|
|
@ -1,7 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
ALTER TABLE regionsettings ADD sunvectorx float NOT NULL default 0;
|
||||
ALTER TABLE regionsettings ADD sunvectory float NOT NULL default 0;
|
||||
ALTER TABLE regionsettings ADD sunvectorz float NOT NULL default 0;
|
||||
|
||||
COMMIT
|
|
@ -1,24 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE dbo.Tmp_avatarattachments
|
||||
(
|
||||
UUID uniqueidentifier NOT NULL,
|
||||
attachpoint int NOT NULL,
|
||||
item uniqueidentifier NOT NULL,
|
||||
asset uniqueidentifier NOT NULL
|
||||
) ON [PRIMARY]
|
||||
|
||||
IF EXISTS(SELECT * FROM dbo.avatarattachments)
|
||||
EXEC('INSERT INTO dbo.Tmp_avatarattachments (UUID, attachpoint, item, asset)
|
||||
SELECT CONVERT(uniqueidentifier, UUID), attachpoint, CONVERT(uniqueidentifier, item), CONVERT(uniqueidentifier, asset) FROM dbo.avatarattachments WITH (HOLDLOCK TABLOCKX)')
|
||||
|
||||
DROP TABLE dbo.avatarattachments
|
||||
|
||||
EXECUTE sp_rename N'dbo.Tmp_avatarattachments', N'avatarattachments', 'OBJECT'
|
||||
|
||||
CREATE NONCLUSTERED INDEX IX_avatarattachments ON dbo.avatarattachments
|
||||
(
|
||||
UUID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
COMMIT
|
|
@ -1,6 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
ALTER TABLE prims ADD CollisionSound char(36) not null default '00000000-0000-0000-0000-000000000000'
|
||||
ALTER TABLE prims ADD CollisionSoundVolume float not null default 0.0
|
||||
|
||||
COMMIT
|
|
@ -1,5 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
ALTER TABLE users ADD scopeID uniqueidentifier not null default '00000000-0000-0000-0000-000000000000'
|
||||
|
||||
COMMIT
|
|
@ -1,5 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
ALTER TABLE prims ADD LinkNumber integer not null default 0
|
||||
|
||||
COMMIT
|
|
@ -1,112 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE dbo.Tmp_prims
|
||||
(
|
||||
UUID uniqueidentifier NOT NULL,
|
||||
RegionUUID uniqueidentifier NULL,
|
||||
ParentID int NULL,
|
||||
CreationDate int NULL,
|
||||
Name varchar(255) NULL,
|
||||
SceneGroupID uniqueidentifier NULL,
|
||||
Text varchar(255) NULL,
|
||||
Description varchar(255) NULL,
|
||||
SitName varchar(255) NULL,
|
||||
TouchName varchar(255) NULL,
|
||||
ObjectFlags int NULL,
|
||||
CreatorID uniqueidentifier NULL,
|
||||
OwnerID uniqueidentifier NULL,
|
||||
GroupID uniqueidentifier NULL,
|
||||
LastOwnerID uniqueidentifier NULL,
|
||||
OwnerMask int NULL,
|
||||
NextOwnerMask int NULL,
|
||||
GroupMask int NULL,
|
||||
EveryoneMask int NULL,
|
||||
BaseMask int NULL,
|
||||
PositionX float(53) NULL,
|
||||
PositionY float(53) NULL,
|
||||
PositionZ float(53) NULL,
|
||||
GroupPositionX float(53) NULL,
|
||||
GroupPositionY float(53) NULL,
|
||||
GroupPositionZ float(53) NULL,
|
||||
VelocityX float(53) NULL,
|
||||
VelocityY float(53) NULL,
|
||||
VelocityZ float(53) NULL,
|
||||
AngularVelocityX float(53) NULL,
|
||||
AngularVelocityY float(53) NULL,
|
||||
AngularVelocityZ float(53) NULL,
|
||||
AccelerationX float(53) NULL,
|
||||
AccelerationY float(53) NULL,
|
||||
AccelerationZ float(53) NULL,
|
||||
RotationX float(53) NULL,
|
||||
RotationY float(53) NULL,
|
||||
RotationZ float(53) NULL,
|
||||
RotationW float(53) NULL,
|
||||
SitTargetOffsetX float(53) NULL,
|
||||
SitTargetOffsetY float(53) NULL,
|
||||
SitTargetOffsetZ float(53) NULL,
|
||||
SitTargetOrientW float(53) NULL,
|
||||
SitTargetOrientX float(53) NULL,
|
||||
SitTargetOrientY float(53) NULL,
|
||||
SitTargetOrientZ float(53) NULL,
|
||||
PayPrice int NOT NULL DEFAULT ((0)),
|
||||
PayButton1 int NOT NULL DEFAULT ((0)),
|
||||
PayButton2 int NOT NULL DEFAULT ((0)),
|
||||
PayButton3 int NOT NULL DEFAULT ((0)),
|
||||
PayButton4 int NOT NULL DEFAULT ((0)),
|
||||
LoopedSound uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
|
||||
LoopedSoundGain float(53) NOT NULL DEFAULT ((0.0)),
|
||||
TextureAnimation image NULL,
|
||||
OmegaX float(53) NOT NULL DEFAULT ((0.0)),
|
||||
OmegaY float(53) NOT NULL DEFAULT ((0.0)),
|
||||
OmegaZ float(53) NOT NULL DEFAULT ((0.0)),
|
||||
CameraEyeOffsetX float(53) NOT NULL DEFAULT ((0.0)),
|
||||
CameraEyeOffsetY float(53) NOT NULL DEFAULT ((0.0)),
|
||||
CameraEyeOffsetZ float(53) NOT NULL DEFAULT ((0.0)),
|
||||
CameraAtOffsetX float(53) NOT NULL DEFAULT ((0.0)),
|
||||
CameraAtOffsetY float(53) NOT NULL DEFAULT ((0.0)),
|
||||
CameraAtOffsetZ float(53) NOT NULL DEFAULT ((0.0)),
|
||||
ForceMouselook tinyint NOT NULL DEFAULT ((0)),
|
||||
ScriptAccessPin int NOT NULL DEFAULT ((0)),
|
||||
AllowedDrop tinyint NOT NULL DEFAULT ((0)),
|
||||
DieAtEdge tinyint NOT NULL DEFAULT ((0)),
|
||||
SalePrice int NOT NULL DEFAULT ((10)),
|
||||
SaleType tinyint NOT NULL DEFAULT ((0)),
|
||||
ColorR int NOT NULL DEFAULT ((0)),
|
||||
ColorG int NOT NULL DEFAULT ((0)),
|
||||
ColorB int NOT NULL DEFAULT ((0)),
|
||||
ColorA int NOT NULL DEFAULT ((0)),
|
||||
ParticleSystem image NULL,
|
||||
ClickAction tinyint NOT NULL DEFAULT ((0)),
|
||||
Material tinyint NOT NULL DEFAULT ((3)),
|
||||
CollisionSound uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
|
||||
CollisionSoundVolume float(53) NOT NULL DEFAULT ((0.0)),
|
||||
LinkNumber int NOT NULL DEFAULT ((0))
|
||||
) ON [PRIMARY]
|
||||
TEXTIMAGE_ON [PRIMARY]
|
||||
|
||||
IF EXISTS(SELECT * FROM dbo.prims)
|
||||
EXEC('INSERT INTO dbo.Tmp_prims (UUID, RegionUUID, ParentID, CreationDate, Name, SceneGroupID, Text, Description, SitName, TouchName, ObjectFlags, CreatorID, OwnerID, GroupID, LastOwnerID, OwnerMask, NextOwnerMask, GroupMask, EveryoneMask, BaseMask, PositionX, PositionY, PositionZ, GroupPositionX, GroupPositionY, GroupPositionZ, VelocityX, VelocityY, VelocityZ, AngularVelocityX, AngularVelocityY, AngularVelocityZ, AccelerationX, AccelerationY, AccelerationZ, RotationX, RotationY, RotationZ, RotationW, SitTargetOffsetX, SitTargetOffsetY, SitTargetOffsetZ, SitTargetOrientW, SitTargetOrientX, SitTargetOrientY, SitTargetOrientZ, PayPrice, PayButton1, PayButton2, PayButton3, PayButton4, LoopedSound, LoopedSoundGain, TextureAnimation, OmegaX, OmegaY, OmegaZ, CameraEyeOffsetX, CameraEyeOffsetY, CameraEyeOffsetZ, CameraAtOffsetX, CameraAtOffsetY, CameraAtOffsetZ, ForceMouselook, ScriptAccessPin, AllowedDrop, DieAtEdge, SalePrice, SaleType, ColorR, ColorG, ColorB, ColorA, ParticleSystem, ClickAction, Material, CollisionSound, CollisionSoundVolume, LinkNumber)
|
||||
SELECT CONVERT(uniqueidentifier, UUID), CONVERT(uniqueidentifier, RegionUUID), ParentID, CreationDate, Name, CONVERT(uniqueidentifier, SceneGroupID), Text, Description, SitName, TouchName, ObjectFlags, CONVERT(uniqueidentifier, CreatorID), CONVERT(uniqueidentifier, OwnerID), CONVERT(uniqueidentifier, GroupID), CONVERT(uniqueidentifier, LastOwnerID), OwnerMask, NextOwnerMask, GroupMask, EveryoneMask, BaseMask, PositionX, PositionY, PositionZ, GroupPositionX, GroupPositionY, GroupPositionZ, VelocityX, VelocityY, VelocityZ, AngularVelocityX, AngularVelocityY, AngularVelocityZ, AccelerationX, AccelerationY, AccelerationZ, RotationX, RotationY, RotationZ, RotationW, SitTargetOffsetX, SitTargetOffsetY, SitTargetOffsetZ, SitTargetOrientW, SitTargetOrientX, SitTargetOrientY, SitTargetOrientZ, PayPrice, PayButton1, PayButton2, PayButton3, PayButton4, CONVERT(uniqueidentifier, LoopedSound), LoopedSoundGain, TextureAnimation, OmegaX, OmegaY, OmegaZ, CameraEyeOffsetX, CameraEyeOffsetY, CameraEyeOffsetZ, CameraAtOffsetX, CameraAtOffsetY, CameraAtOffsetZ, ForceMouselook, ScriptAccessPin, AllowedDrop, DieAtEdge, SalePrice, SaleType, ColorR, ColorG, ColorB, ColorA, ParticleSystem, ClickAction, Material, CONVERT(uniqueidentifier, CollisionSound), CollisionSoundVolume, LinkNumber FROM dbo.prims WITH (HOLDLOCK TABLOCKX)')
|
||||
|
||||
DROP TABLE dbo.prims
|
||||
|
||||
EXECUTE sp_rename N'dbo.Tmp_prims', N'prims', 'OBJECT'
|
||||
|
||||
ALTER TABLE dbo.prims ADD CONSTRAINT
|
||||
PK__prims__10566F31 PRIMARY KEY CLUSTERED
|
||||
(
|
||||
UUID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
|
||||
CREATE NONCLUSTERED INDEX prims_regionuuid ON dbo.prims
|
||||
(
|
||||
RegionUUID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
CREATE NONCLUSTERED INDEX prims_parentid ON dbo.prims
|
||||
(
|
||||
ParentID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
COMMIT
|
|
@ -1,49 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE dbo.Tmp_primshapes
|
||||
(
|
||||
UUID uniqueidentifier NOT NULL,
|
||||
Shape int NULL,
|
||||
ScaleX float(53) NULL,
|
||||
ScaleY float(53) NULL,
|
||||
ScaleZ float(53) NULL,
|
||||
PCode int NULL,
|
||||
PathBegin int NULL,
|
||||
PathEnd int NULL,
|
||||
PathScaleX int NULL,
|
||||
PathScaleY int NULL,
|
||||
PathShearX int NULL,
|
||||
PathShearY int NULL,
|
||||
PathSkew int NULL,
|
||||
PathCurve int NULL,
|
||||
PathRadiusOffset int NULL,
|
||||
PathRevolutions int NULL,
|
||||
PathTaperX int NULL,
|
||||
PathTaperY int NULL,
|
||||
PathTwist int NULL,
|
||||
PathTwistBegin int NULL,
|
||||
ProfileBegin int NULL,
|
||||
ProfileEnd int NULL,
|
||||
ProfileCurve int NULL,
|
||||
ProfileHollow int NULL,
|
||||
State int NULL,
|
||||
Texture image NULL,
|
||||
ExtraParams image NULL
|
||||
) ON [PRIMARY]
|
||||
TEXTIMAGE_ON [PRIMARY]
|
||||
|
||||
IF EXISTS(SELECT * FROM dbo.primshapes)
|
||||
EXEC('INSERT INTO dbo.Tmp_primshapes (UUID, Shape, ScaleX, ScaleY, ScaleZ, PCode, PathBegin, PathEnd, PathScaleX, PathScaleY, PathShearX, PathShearY, PathSkew, PathCurve, PathRadiusOffset, PathRevolutions, PathTaperX, PathTaperY, PathTwist, PathTwistBegin, ProfileBegin, ProfileEnd, ProfileCurve, ProfileHollow, State, Texture, ExtraParams)
|
||||
SELECT CONVERT(uniqueidentifier, UUID), Shape, ScaleX, ScaleY, ScaleZ, PCode, PathBegin, PathEnd, PathScaleX, PathScaleY, PathShearX, PathShearY, PathSkew, PathCurve, PathRadiusOffset, PathRevolutions, PathTaperX, PathTaperY, PathTwist, PathTwistBegin, ProfileBegin, ProfileEnd, ProfileCurve, ProfileHollow, State, Texture, ExtraParams FROM dbo.primshapes WITH (HOLDLOCK TABLOCKX)')
|
||||
|
||||
DROP TABLE dbo.primshapes
|
||||
|
||||
EXECUTE sp_rename N'dbo.Tmp_primshapes', N'primshapes', 'OBJECT'
|
||||
|
||||
ALTER TABLE dbo.primshapes ADD CONSTRAINT
|
||||
PK__primshapes__0880433F PRIMARY KEY CLUSTERED
|
||||
(
|
||||
UUID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
COMMIT
|
|
@ -1,45 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE dbo.Tmp_primitems
|
||||
(
|
||||
itemID uniqueidentifier NOT NULL,
|
||||
primID uniqueidentifier NULL,
|
||||
assetID uniqueidentifier NULL,
|
||||
parentFolderID uniqueidentifier NULL,
|
||||
invType int NULL,
|
||||
assetType int NULL,
|
||||
name varchar(255) NULL,
|
||||
description varchar(255) NULL,
|
||||
creationDate varchar(255) NULL,
|
||||
creatorID uniqueidentifier NULL,
|
||||
ownerID uniqueidentifier NULL,
|
||||
lastOwnerID uniqueidentifier NULL,
|
||||
groupID uniqueidentifier NULL,
|
||||
nextPermissions int NULL,
|
||||
currentPermissions int NULL,
|
||||
basePermissions int NULL,
|
||||
everyonePermissions int NULL,
|
||||
groupPermissions int NULL,
|
||||
flags int NOT NULL DEFAULT ((0))
|
||||
) ON [PRIMARY]
|
||||
|
||||
IF EXISTS(SELECT * FROM dbo.primitems)
|
||||
EXEC('INSERT INTO dbo.Tmp_primitems (itemID, primID, assetID, parentFolderID, invType, assetType, name, description, creationDate, creatorID, ownerID, lastOwnerID, groupID, nextPermissions, currentPermissions, basePermissions, everyonePermissions, groupPermissions, flags)
|
||||
SELECT CONVERT(uniqueidentifier, itemID), CONVERT(uniqueidentifier, primID), CONVERT(uniqueidentifier, assetID), CONVERT(uniqueidentifier, parentFolderID), invType, assetType, name, description, creationDate, CONVERT(uniqueidentifier, creatorID), CONVERT(uniqueidentifier, ownerID), CONVERT(uniqueidentifier, lastOwnerID), CONVERT(uniqueidentifier, groupID), nextPermissions, currentPermissions, basePermissions, everyonePermissions, groupPermissions, flags FROM dbo.primitems WITH (HOLDLOCK TABLOCKX)')
|
||||
|
||||
DROP TABLE dbo.primitems
|
||||
|
||||
EXECUTE sp_rename N'dbo.Tmp_primitems', N'primitems', 'OBJECT'
|
||||
|
||||
ALTER TABLE dbo.primitems ADD CONSTRAINT
|
||||
PK__primitems__0A688BB1 PRIMARY KEY CLUSTERED
|
||||
(
|
||||
itemID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
CREATE NONCLUSTERED INDEX primitems_primid ON dbo.primitems
|
||||
(
|
||||
primID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
COMMIT
|
|
@ -1,19 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE dbo.Tmp_terrain
|
||||
(
|
||||
RegionUUID uniqueidentifier NULL,
|
||||
Revision int NULL,
|
||||
Heightfield image NULL
|
||||
) ON [PRIMARY]
|
||||
TEXTIMAGE_ON [PRIMARY]
|
||||
|
||||
IF EXISTS(SELECT * FROM dbo.terrain)
|
||||
EXEC('INSERT INTO dbo.Tmp_terrain (RegionUUID, Revision, Heightfield)
|
||||
SELECT CONVERT(uniqueidentifier, RegionUUID), Revision, Heightfield FROM dbo.terrain WITH (HOLDLOCK TABLOCKX)')
|
||||
|
||||
DROP TABLE dbo.terrain
|
||||
|
||||
EXECUTE sp_rename N'dbo.Tmp_terrain', N'terrain', 'OBJECT'
|
||||
|
||||
COMMIT
|
|
@ -1,56 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE dbo.Tmp_land
|
||||
(
|
||||
UUID uniqueidentifier NOT NULL,
|
||||
RegionUUID uniqueidentifier NULL,
|
||||
LocalLandID int NULL,
|
||||
Bitmap image NULL,
|
||||
Name varchar(255) NULL,
|
||||
Description varchar(255) NULL,
|
||||
OwnerUUID uniqueidentifier NULL,
|
||||
IsGroupOwned int NULL,
|
||||
Area int NULL,
|
||||
AuctionID int NULL,
|
||||
Category int NULL,
|
||||
ClaimDate int NULL,
|
||||
ClaimPrice int NULL,
|
||||
GroupUUID uniqueidentifier NULL,
|
||||
SalePrice int NULL,
|
||||
LandStatus int NULL,
|
||||
LandFlags int NULL,
|
||||
LandingType int NULL,
|
||||
MediaAutoScale int NULL,
|
||||
MediaTextureUUID uniqueidentifier NULL,
|
||||
MediaURL varchar(255) NULL,
|
||||
MusicURL varchar(255) NULL,
|
||||
PassHours float(53) NULL,
|
||||
PassPrice int NULL,
|
||||
SnapshotUUID uniqueidentifier NULL,
|
||||
UserLocationX float(53) NULL,
|
||||
UserLocationY float(53) NULL,
|
||||
UserLocationZ float(53) NULL,
|
||||
UserLookAtX float(53) NULL,
|
||||
UserLookAtY float(53) NULL,
|
||||
UserLookAtZ float(53) NULL,
|
||||
AuthbuyerID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
|
||||
OtherCleanTime int NOT NULL DEFAULT ((0)),
|
||||
Dwell int NOT NULL DEFAULT ((0))
|
||||
) ON [PRIMARY]
|
||||
TEXTIMAGE_ON [PRIMARY]
|
||||
|
||||
IF EXISTS(SELECT * FROM dbo.land)
|
||||
EXEC('INSERT INTO dbo.Tmp_land (UUID, RegionUUID, LocalLandID, Bitmap, Name, Description, OwnerUUID, IsGroupOwned, Area, AuctionID, Category, ClaimDate, ClaimPrice, GroupUUID, SalePrice, LandStatus, LandFlags, LandingType, MediaAutoScale, MediaTextureUUID, MediaURL, MusicURL, PassHours, PassPrice, SnapshotUUID, UserLocationX, UserLocationY, UserLocationZ, UserLookAtX, UserLookAtY, UserLookAtZ, AuthbuyerID, OtherCleanTime, Dwell)
|
||||
SELECT CONVERT(uniqueidentifier, UUID), CONVERT(uniqueidentifier, RegionUUID), LocalLandID, Bitmap, Name, Description, CONVERT(uniqueidentifier, OwnerUUID), IsGroupOwned, Area, AuctionID, Category, ClaimDate, ClaimPrice, CONVERT(uniqueidentifier, GroupUUID), SalePrice, LandStatus, LandFlags, LandingType, MediaAutoScale, CONVERT(uniqueidentifier, MediaTextureUUID), MediaURL, MusicURL, PassHours, PassPrice, CONVERT(uniqueidentifier, SnapshotUUID), UserLocationX, UserLocationY, UserLocationZ, UserLookAtX, UserLookAtY, UserLookAtZ, CONVERT(uniqueidentifier, AuthbuyerID), OtherCleanTime, Dwell FROM dbo.land WITH (HOLDLOCK TABLOCKX)')
|
||||
|
||||
DROP TABLE dbo.land
|
||||
|
||||
EXECUTE sp_rename N'dbo.Tmp_land', N'land', 'OBJECT'
|
||||
|
||||
ALTER TABLE dbo.land ADD CONSTRAINT
|
||||
PK__land__65A475E71BFD2C07 PRIMARY KEY CLUSTERED
|
||||
(
|
||||
UUID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
COMMIT
|
|
@ -1,18 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE dbo.Tmp_landaccesslist
|
||||
(
|
||||
LandUUID uniqueidentifier NULL,
|
||||
AccessUUID uniqueidentifier NULL,
|
||||
Flags int NULL
|
||||
) ON [PRIMARY]
|
||||
|
||||
IF EXISTS(SELECT * FROM dbo.landaccesslist)
|
||||
EXEC('INSERT INTO dbo.Tmp_landaccesslist (LandUUID, AccessUUID, Flags)
|
||||
SELECT CONVERT(uniqueidentifier, LandUUID), CONVERT(uniqueidentifier, AccessUUID), Flags FROM dbo.landaccesslist WITH (HOLDLOCK TABLOCKX)')
|
||||
|
||||
DROP TABLE dbo.landaccesslist
|
||||
|
||||
EXECUTE sp_rename N'dbo.Tmp_landaccesslist', N'landaccesslist', 'OBJECT'
|
||||
|
||||
COMMIT
|
|
@ -1,19 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE dbo.Tmp_regionban
|
||||
(
|
||||
regionUUID uniqueidentifier NOT NULL,
|
||||
bannedUUID uniqueidentifier NOT NULL,
|
||||
bannedIp varchar(16) NOT NULL,
|
||||
bannedIpHostMask varchar(16) NOT NULL
|
||||
) ON [PRIMARY]
|
||||
|
||||
IF EXISTS(SELECT * FROM dbo.regionban)
|
||||
EXEC('INSERT INTO dbo.Tmp_regionban (regionUUID, bannedUUID, bannedIp, bannedIpHostMask)
|
||||
SELECT CONVERT(uniqueidentifier, regionUUID), CONVERT(uniqueidentifier, bannedUUID), bannedIp, bannedIpHostMask FROM dbo.regionban WITH (HOLDLOCK TABLOCKX)')
|
||||
|
||||
DROP TABLE dbo.regionban
|
||||
|
||||
EXECUTE sp_rename N'dbo.Tmp_regionban', N'regionban', 'OBJECT'
|
||||
|
||||
COMMIT
|
|
@ -1,58 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE dbo.Tmp_regionsettings
|
||||
(
|
||||
regionUUID uniqueidentifier NOT NULL,
|
||||
block_terraform bit NOT NULL,
|
||||
block_fly bit NOT NULL,
|
||||
allow_damage bit NOT NULL,
|
||||
restrict_pushing bit NOT NULL,
|
||||
allow_land_resell bit NOT NULL,
|
||||
allow_land_join_divide bit NOT NULL,
|
||||
block_show_in_search bit NOT NULL,
|
||||
agent_limit int NOT NULL,
|
||||
object_bonus float(53) NOT NULL,
|
||||
maturity int NOT NULL,
|
||||
disable_scripts bit NOT NULL,
|
||||
disable_collisions bit NOT NULL,
|
||||
disable_physics bit NOT NULL,
|
||||
terrain_texture_1 uniqueidentifier NOT NULL,
|
||||
terrain_texture_2 uniqueidentifier NOT NULL,
|
||||
terrain_texture_3 uniqueidentifier NOT NULL,
|
||||
terrain_texture_4 uniqueidentifier NOT NULL,
|
||||
elevation_1_nw float(53) NOT NULL,
|
||||
elevation_2_nw float(53) NOT NULL,
|
||||
elevation_1_ne float(53) NOT NULL,
|
||||
elevation_2_ne float(53) NOT NULL,
|
||||
elevation_1_se float(53) NOT NULL,
|
||||
elevation_2_se float(53) NOT NULL,
|
||||
elevation_1_sw float(53) NOT NULL,
|
||||
elevation_2_sw float(53) NOT NULL,
|
||||
water_height float(53) NOT NULL,
|
||||
terrain_raise_limit float(53) NOT NULL,
|
||||
terrain_lower_limit float(53) NOT NULL,
|
||||
use_estate_sun bit NOT NULL,
|
||||
fixed_sun bit NOT NULL,
|
||||
sun_position float(53) NOT NULL,
|
||||
covenant uniqueidentifier NULL DEFAULT (NULL),
|
||||
Sandbox bit NOT NULL,
|
||||
sunvectorx float(53) NOT NULL DEFAULT ((0)),
|
||||
sunvectory float(53) NOT NULL DEFAULT ((0)),
|
||||
sunvectorz float(53) NOT NULL DEFAULT ((0))
|
||||
) ON [PRIMARY]
|
||||
|
||||
IF EXISTS(SELECT * FROM dbo.regionsettings)
|
||||
EXEC('INSERT INTO dbo.Tmp_regionsettings (regionUUID, block_terraform, block_fly, allow_damage, restrict_pushing, allow_land_resell, allow_land_join_divide, block_show_in_search, agent_limit, object_bonus, maturity, disable_scripts, disable_collisions, disable_physics, terrain_texture_1, terrain_texture_2, terrain_texture_3, terrain_texture_4, elevation_1_nw, elevation_2_nw, elevation_1_ne, elevation_2_ne, elevation_1_se, elevation_2_se, elevation_1_sw, elevation_2_sw, water_height, terrain_raise_limit, terrain_lower_limit, use_estate_sun, fixed_sun, sun_position, covenant, Sandbox, sunvectorx, sunvectory, sunvectorz)
|
||||
SELECT CONVERT(uniqueidentifier, regionUUID), block_terraform, block_fly, allow_damage, restrict_pushing, allow_land_resell, allow_land_join_divide, block_show_in_search, agent_limit, object_bonus, maturity, disable_scripts, disable_collisions, disable_physics, CONVERT(uniqueidentifier, terrain_texture_1), CONVERT(uniqueidentifier, terrain_texture_2), CONVERT(uniqueidentifier, terrain_texture_3), CONVERT(uniqueidentifier, terrain_texture_4), elevation_1_nw, elevation_2_nw, elevation_1_ne, elevation_2_ne, elevation_1_se, elevation_2_se, elevation_1_sw, elevation_2_sw, water_height, terrain_raise_limit, terrain_lower_limit, use_estate_sun, fixed_sun, sun_position, CONVERT(uniqueidentifier, covenant), Sandbox, sunvectorx, sunvectory, sunvectorz FROM dbo.regionsettings WITH (HOLDLOCK TABLOCKX)')
|
||||
|
||||
DROP TABLE dbo.regionsettings
|
||||
|
||||
EXECUTE sp_rename N'dbo.Tmp_regionsettings', N'regionsettings', 'OBJECT'
|
||||
|
||||
ALTER TABLE dbo.regionsettings ADD CONSTRAINT
|
||||
PK__regionse__5B35159D21B6055D PRIMARY KEY CLUSTERED
|
||||
(
|
||||
regionUUID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
COMMIT
|
|
@ -1,5 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
ALTER TABLE prims ADD PassTouches bit not null default 0
|
||||
|
||||
COMMIT
|
|
@ -1,7 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
ALTER TABLE regionsettings ADD loaded_creation_date varchar(20)
|
||||
ALTER TABLE regionsettings ADD loaded_creation_time varchar(20)
|
||||
ALTER TABLE regionsettings ADD loaded_creation_id varchar(64)
|
||||
|
||||
COMMIT
|
|
@ -1,7 +0,0 @@
|
|||
BEGIN TRANSACTION
|
||||
|
||||
ALTER TABLE regionsettings DROP COLUMN loaded_creation_date
|
||||
ALTER TABLE regionsettings DROP COLUMN loaded_creation_time
|
||||
ALTER TABLE regionsettings ADD loaded_creation_datetime int NOT NULL default 0
|
||||
|
||||
COMMIT
|
|
@ -0,0 +1,106 @@
|
|||
:VERSION 1
|
||||
|
||||
CREATE TABLE [assets] (
|
||||
[id] [varchar](36) NOT NULL,
|
||||
[name] [varchar](64) NOT NULL,
|
||||
[description] [varchar](64) NOT NULL,
|
||||
[assetType] [tinyint] NOT NULL,
|
||||
[local] [tinyint] NOT NULL,
|
||||
[temporary] [tinyint] NOT NULL,
|
||||
[data] [image] NOT NULL,
|
||||
PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[id] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
|
||||
|
||||
:VERSION 2
|
||||
|
||||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE Tmp_assets
|
||||
(
|
||||
id varchar(36) NOT NULL,
|
||||
name varchar(64) NOT NULL,
|
||||
description varchar(64) NOT NULL,
|
||||
assetType tinyint NOT NULL,
|
||||
local bit NOT NULL,
|
||||
temporary bit NOT NULL,
|
||||
data image NOT NULL
|
||||
) ON [PRIMARY]
|
||||
TEXTIMAGE_ON [PRIMARY]
|
||||
|
||||
IF EXISTS(SELECT * FROM assets)
|
||||
EXEC('INSERT INTO Tmp_assets (id, name, description, assetType, local, temporary, data)
|
||||
SELECT id, name, description, assetType, CONVERT(bit, local), CONVERT(bit, temporary), data FROM assets WITH (HOLDLOCK TABLOCKX)')
|
||||
|
||||
DROP TABLE assets
|
||||
|
||||
EXECUTE sp_rename N'Tmp_assets', N'assets', 'OBJECT'
|
||||
|
||||
ALTER TABLE dbo.assets ADD CONSTRAINT
|
||||
PK__assets__id PRIMARY KEY CLUSTERED
|
||||
(
|
||||
id
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
COMMIT
|
||||
|
||||
|
||||
:VERSION 3
|
||||
|
||||
BEGIN TRANSACTION
|
||||
|
||||
ALTER TABLE assets add create_time integer default 0
|
||||
ALTER TABLE assets add access_time integer default 0
|
||||
|
||||
COMMIT
|
||||
|
||||
|
||||
:VERSION 4
|
||||
|
||||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE dbo.Tmp_assets
|
||||
(
|
||||
id uniqueidentifier NOT NULL,
|
||||
name varchar(64) NOT NULL,
|
||||
description varchar(64) NOT NULL,
|
||||
assetType tinyint NOT NULL,
|
||||
local bit NOT NULL,
|
||||
temporary bit NOT NULL,
|
||||
data image NOT NULL,
|
||||
create_time int NULL,
|
||||
access_time int NULL
|
||||
) ON [PRIMARY]
|
||||
TEXTIMAGE_ON [PRIMARY]
|
||||
|
||||
IF EXISTS(SELECT * FROM dbo.assets)
|
||||
EXEC('INSERT INTO dbo.Tmp_assets (id, name, description, assetType, local, temporary, data, create_time, access_time)
|
||||
SELECT CONVERT(uniqueidentifier, id), name, description, assetType, local, temporary, data, create_time, access_time FROM dbo.assets WITH (HOLDLOCK TABLOCKX)')
|
||||
|
||||
DROP TABLE assets
|
||||
|
||||
EXECUTE sp_rename N'Tmp_assets', N'assets', 'OBJECT'
|
||||
|
||||
ALTER TABLE dbo.assets ADD CONSTRAINT
|
||||
PK__assets__id PRIMARY KEY CLUSTERED
|
||||
(
|
||||
id
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
COMMIT
|
||||
|
||||
|
||||
:VERSION 5
|
||||
|
||||
DELETE FROM assets WHERE id = 'dc4b9f0b-d008-45c6-96a4-01dd947ac621';
|
||||
|
||||
:VERSION 6
|
||||
|
||||
ALTER TABLE assets ADD asset_flags INTEGER NOT NULL DEFAULT 0;
|
||||
|
||||
:VERSION 7
|
||||
|
||||
alter table assets add creatorid varchar(36) not null default '';
|
|
@ -1,3 +1,5 @@
|
|||
:VERSION 1
|
||||
|
||||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE [auth] (
|
||||
|
@ -15,3 +17,12 @@ CREATE TABLE [tokens] (
|
|||
ON [PRIMARY]
|
||||
|
||||
COMMIT
|
||||
|
||||
:VERSION 2
|
||||
|
||||
BEGIN TRANSACTION
|
||||
|
||||
INSERT INTO auth (UUID, passwordHash, passwordSalt, webLoginKey, accountType) SELECT [UUID] AS UUID, [passwordHash] AS passwordHash, [passwordSalt] AS passwordSalt, [webLoginKey] AS webLoginKey, 'UserAccount' as [accountType] FROM users;
|
||||
|
||||
|
||||
COMMIT
|
|
@ -1,3 +1,5 @@
|
|||
:VERSION 1
|
||||
|
||||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE [Avatars] (
|
|
@ -0,0 +1,334 @@
|
|||
:VERSION 1
|
||||
|
||||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE [dbo].[estate_managers](
|
||||
[EstateID] [int] NOT NULL,
|
||||
[uuid] [varchar](36) NOT NULL,
|
||||
CONSTRAINT [PK_estate_managers] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[EstateID] ASC
|
||||
)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
|
||||
) ON [PRIMARY];
|
||||
|
||||
CREATE TABLE [dbo].[estate_groups](
|
||||
[EstateID] [int] NOT NULL,
|
||||
[uuid] [varchar](36) NOT NULL,
|
||||
CONSTRAINT [PK_estate_groups] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[EstateID] ASC
|
||||
)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
|
||||
) ON [PRIMARY];
|
||||
|
||||
|
||||
CREATE TABLE [dbo].[estate_users](
|
||||
[EstateID] [int] NOT NULL,
|
||||
[uuid] [varchar](36) NOT NULL,
|
||||
CONSTRAINT [PK_estate_users] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[EstateID] ASC
|
||||
)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
|
||||
) ON [PRIMARY];
|
||||
|
||||
|
||||
CREATE TABLE [dbo].[estateban](
|
||||
[EstateID] [int] NOT NULL,
|
||||
[bannedUUID] [varchar](36) NOT NULL,
|
||||
[bannedIp] [varchar](16) NOT NULL,
|
||||
[bannedIpHostMask] [varchar](16) NOT NULL,
|
||||
[bannedNameMask] [varchar](64) NULL DEFAULT (NULL),
|
||||
CONSTRAINT [PK_estateban] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[EstateID] ASC
|
||||
)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
|
||||
) ON [PRIMARY];
|
||||
|
||||
CREATE TABLE [dbo].[estate_settings](
|
||||
[EstateID] [int] IDENTITY(1,100) NOT NULL,
|
||||
[EstateName] [varchar](64) NULL DEFAULT (NULL),
|
||||
[AbuseEmailToEstateOwner] [bit] NOT NULL,
|
||||
[DenyAnonymous] [bit] NOT NULL,
|
||||
[ResetHomeOnTeleport] [bit] NOT NULL,
|
||||
[FixedSun] [bit] NOT NULL,
|
||||
[DenyTransacted] [bit] NOT NULL,
|
||||
[BlockDwell] [bit] NOT NULL,
|
||||
[DenyIdentified] [bit] NOT NULL,
|
||||
[AllowVoice] [bit] NOT NULL,
|
||||
[UseGlobalTime] [bit] NOT NULL,
|
||||
[PricePerMeter] [int] NOT NULL,
|
||||
[TaxFree] [bit] NOT NULL,
|
||||
[AllowDirectTeleport] [bit] NOT NULL,
|
||||
[RedirectGridX] [int] NOT NULL,
|
||||
[RedirectGridY] [int] NOT NULL,
|
||||
[ParentEstateID] [int] NOT NULL,
|
||||
[SunPosition] [float] NOT NULL,
|
||||
[EstateSkipScripts] [bit] NOT NULL,
|
||||
[BillableFactor] [float] NOT NULL,
|
||||
[PublicAccess] [bit] NOT NULL,
|
||||
[AbuseEmail] [varchar](255) NOT NULL,
|
||||
[EstateOwner] [varchar](36) NOT NULL,
|
||||
[DenyMinors] [bit] NOT NULL,
|
||||
CONSTRAINT [PK_estate_settings] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[EstateID] ASC
|
||||
)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
|
||||
) ON [PRIMARY];
|
||||
|
||||
|
||||
CREATE TABLE [dbo].[estate_map](
|
||||
[RegionID] [varchar](36) NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
|
||||
[EstateID] [int] NOT NULL,
|
||||
CONSTRAINT [PK_estate_map] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[RegionID] ASC
|
||||
)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
|
||||
) ON [PRIMARY];
|
||||
|
||||
COMMIT
|
||||
|
||||
:VERSION 2
|
||||
|
||||
BEGIN TRANSACTION
|
||||
|
||||
ALTER TABLE dbo.estate_managers DROP CONSTRAINT PK_estate_managers
|
||||
|
||||
CREATE NONCLUSTERED INDEX IX_estate_managers ON dbo.estate_managers
|
||||
(
|
||||
EstateID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
ALTER TABLE dbo.estate_groups DROP CONSTRAINT PK_estate_groups
|
||||
|
||||
CREATE NONCLUSTERED INDEX IX_estate_groups ON dbo.estate_groups
|
||||
(
|
||||
EstateID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
|
||||
ALTER TABLE dbo.estate_users DROP CONSTRAINT PK_estate_users
|
||||
|
||||
CREATE NONCLUSTERED INDEX IX_estate_users ON dbo.estate_users
|
||||
(
|
||||
EstateID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
COMMIT
|
||||
|
||||
|
||||
:VERSION 3
|
||||
|
||||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE dbo.Tmp_estateban
|
||||
(
|
||||
EstateID int NOT NULL,
|
||||
bannedUUID varchar(36) NOT NULL,
|
||||
bannedIp varchar(16) NULL,
|
||||
bannedIpHostMask varchar(16) NULL,
|
||||
bannedNameMask varchar(64) NULL
|
||||
) ON [PRIMARY]
|
||||
|
||||
IF EXISTS(SELECT * FROM dbo.estateban)
|
||||
EXEC('INSERT INTO dbo.Tmp_estateban (EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask)
|
||||
SELECT EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask FROM dbo.estateban')
|
||||
|
||||
DROP TABLE dbo.estateban
|
||||
|
||||
EXECUTE sp_rename N'dbo.Tmp_estateban', N'estateban', 'OBJECT'
|
||||
|
||||
CREATE NONCLUSTERED INDEX IX_estateban ON dbo.estateban
|
||||
(
|
||||
EstateID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
COMMIT
|
||||
|
||||
|
||||
:VERSION 4
|
||||
|
||||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE dbo.Tmp_estate_managers
|
||||
(
|
||||
EstateID int NOT NULL,
|
||||
uuid uniqueidentifier NOT NULL
|
||||
) ON [PRIMARY]
|
||||
|
||||
IF EXISTS(SELECT * FROM dbo.estate_managers)
|
||||
EXEC('INSERT INTO dbo.Tmp_estate_managers (EstateID, uuid)
|
||||
SELECT EstateID, CONVERT(uniqueidentifier, uuid) FROM dbo.estate_managers WITH (HOLDLOCK TABLOCKX)')
|
||||
|
||||
DROP TABLE dbo.estate_managers
|
||||
|
||||
EXECUTE sp_rename N'dbo.Tmp_estate_managers', N'estate_managers', 'OBJECT'
|
||||
|
||||
CREATE NONCLUSTERED INDEX IX_estate_managers ON dbo.estate_managers
|
||||
(
|
||||
EstateID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
COMMIT
|
||||
|
||||
|
||||
:VERSION 5
|
||||
|
||||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE dbo.Tmp_estate_groups
|
||||
(
|
||||
EstateID int NOT NULL,
|
||||
uuid uniqueidentifier NOT NULL
|
||||
) ON [PRIMARY]
|
||||
|
||||
IF EXISTS(SELECT * FROM dbo.estate_groups)
|
||||
EXEC('INSERT INTO dbo.Tmp_estate_groups (EstateID, uuid)
|
||||
SELECT EstateID, CONVERT(uniqueidentifier, uuid) FROM dbo.estate_groups WITH (HOLDLOCK TABLOCKX)')
|
||||
|
||||
DROP TABLE dbo.estate_groups
|
||||
|
||||
EXECUTE sp_rename N'dbo.Tmp_estate_groups', N'estate_groups', 'OBJECT'
|
||||
|
||||
CREATE NONCLUSTERED INDEX IX_estate_groups ON dbo.estate_groups
|
||||
(
|
||||
EstateID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
COMMIT
|
||||
|
||||
|
||||
:VERSION 6
|
||||
|
||||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE dbo.Tmp_estate_users
|
||||
(
|
||||
EstateID int NOT NULL,
|
||||
uuid uniqueidentifier NOT NULL
|
||||
) ON [PRIMARY]
|
||||
|
||||
IF EXISTS(SELECT * FROM dbo.estate_users)
|
||||
EXEC('INSERT INTO dbo.Tmp_estate_users (EstateID, uuid)
|
||||
SELECT EstateID, CONVERT(uniqueidentifier, uuid) FROM dbo.estate_users WITH (HOLDLOCK TABLOCKX)')
|
||||
|
||||
DROP TABLE dbo.estate_users
|
||||
|
||||
EXECUTE sp_rename N'dbo.Tmp_estate_users', N'estate_users', 'OBJECT'
|
||||
|
||||
CREATE NONCLUSTERED INDEX IX_estate_users ON dbo.estate_users
|
||||
(
|
||||
EstateID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
COMMIT
|
||||
|
||||
|
||||
:VERSION 7
|
||||
|
||||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE dbo.Tmp_estateban
|
||||
(
|
||||
EstateID int NOT NULL,
|
||||
bannedUUID uniqueidentifier NOT NULL,
|
||||
bannedIp varchar(16) NULL,
|
||||
bannedIpHostMask varchar(16) NULL,
|
||||
bannedNameMask varchar(64) NULL
|
||||
) ON [PRIMARY]
|
||||
|
||||
IF EXISTS(SELECT * FROM dbo.estateban)
|
||||
EXEC('INSERT INTO dbo.Tmp_estateban (EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask)
|
||||
SELECT EstateID, CONVERT(uniqueidentifier, bannedUUID), bannedIp, bannedIpHostMask, bannedNameMask FROM dbo.estateban WITH (HOLDLOCK TABLOCKX)')
|
||||
|
||||
DROP TABLE dbo.estateban
|
||||
|
||||
EXECUTE sp_rename N'dbo.Tmp_estateban', N'estateban', 'OBJECT'
|
||||
|
||||
CREATE NONCLUSTERED INDEX IX_estateban ON dbo.estateban
|
||||
(
|
||||
EstateID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
COMMIT
|
||||
|
||||
|
||||
:VERSION 8
|
||||
|
||||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE dbo.Tmp_estate_settings
|
||||
(
|
||||
EstateID int NOT NULL IDENTITY (1, 100),
|
||||
EstateName varchar(64) NULL DEFAULT (NULL),
|
||||
AbuseEmailToEstateOwner bit NOT NULL,
|
||||
DenyAnonymous bit NOT NULL,
|
||||
ResetHomeOnTeleport bit NOT NULL,
|
||||
FixedSun bit NOT NULL,
|
||||
DenyTransacted bit NOT NULL,
|
||||
BlockDwell bit NOT NULL,
|
||||
DenyIdentified bit NOT NULL,
|
||||
AllowVoice bit NOT NULL,
|
||||
UseGlobalTime bit NOT NULL,
|
||||
PricePerMeter int NOT NULL,
|
||||
TaxFree bit NOT NULL,
|
||||
AllowDirectTeleport bit NOT NULL,
|
||||
RedirectGridX int NOT NULL,
|
||||
RedirectGridY int NOT NULL,
|
||||
ParentEstateID int NOT NULL,
|
||||
SunPosition float(53) NOT NULL,
|
||||
EstateSkipScripts bit NOT NULL,
|
||||
BillableFactor float(53) NOT NULL,
|
||||
PublicAccess bit NOT NULL,
|
||||
AbuseEmail varchar(255) NOT NULL,
|
||||
EstateOwner uniqueidentifier NOT NULL,
|
||||
DenyMinors bit NOT NULL
|
||||
) ON [PRIMARY]
|
||||
|
||||
SET IDENTITY_INSERT dbo.Tmp_estate_settings ON
|
||||
|
||||
IF EXISTS(SELECT * FROM dbo.estate_settings)
|
||||
EXEC('INSERT INTO dbo.Tmp_estate_settings (EstateID, EstateName, AbuseEmailToEstateOwner, DenyAnonymous, ResetHomeOnTeleport, FixedSun, DenyTransacted, BlockDwell, DenyIdentified, AllowVoice, UseGlobalTime, PricePerMeter, TaxFree, AllowDirectTeleport, RedirectGridX, RedirectGridY, ParentEstateID, SunPosition, EstateSkipScripts, BillableFactor, PublicAccess, AbuseEmail, EstateOwner, DenyMinors)
|
||||
SELECT EstateID, EstateName, AbuseEmailToEstateOwner, DenyAnonymous, ResetHomeOnTeleport, FixedSun, DenyTransacted, BlockDwell, DenyIdentified, AllowVoice, UseGlobalTime, PricePerMeter, TaxFree, AllowDirectTeleport, RedirectGridX, RedirectGridY, ParentEstateID, SunPosition, EstateSkipScripts, BillableFactor, PublicAccess, AbuseEmail, CONVERT(uniqueidentifier, EstateOwner), DenyMinors FROM dbo.estate_settings WITH (HOLDLOCK TABLOCKX)')
|
||||
|
||||
SET IDENTITY_INSERT dbo.Tmp_estate_settings OFF
|
||||
|
||||
DROP TABLE dbo.estate_settings
|
||||
|
||||
EXECUTE sp_rename N'dbo.Tmp_estate_settings', N'estate_settings', 'OBJECT'
|
||||
|
||||
ALTER TABLE dbo.estate_settings ADD CONSTRAINT
|
||||
PK_estate_settings PRIMARY KEY CLUSTERED
|
||||
(
|
||||
EstateID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
COMMIT
|
||||
|
||||
|
||||
:VERSION 9
|
||||
|
||||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE dbo.Tmp_estate_map
|
||||
(
|
||||
RegionID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
|
||||
EstateID int NOT NULL
|
||||
) ON [PRIMARY]
|
||||
|
||||
IF EXISTS(SELECT * FROM dbo.estate_map)
|
||||
EXEC('INSERT INTO dbo.Tmp_estate_map (RegionID, EstateID)
|
||||
SELECT CONVERT(uniqueidentifier, RegionID), EstateID FROM dbo.estate_map WITH (HOLDLOCK TABLOCKX)')
|
||||
|
||||
DROP TABLE dbo.estate_map
|
||||
|
||||
EXECUTE sp_rename N'dbo.Tmp_estate_map', N'estate_map', 'OBJECT'
|
||||
|
||||
ALTER TABLE dbo.estate_map ADD CONSTRAINT
|
||||
PK_estate_map PRIMARY KEY CLUSTERED
|
||||
(
|
||||
RegionID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
|
||||
COMMIT
|
||||
|
||||
|
|
@ -1,3 +1,5 @@
|
|||
:VERSION 1
|
||||
|
||||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE [Friends] (
|
||||
|
@ -7,5 +9,12 @@ CREATE TABLE [Friends] (
|
|||
[Offered] varchar(32) NOT NULL DEFAULT 0)
|
||||
ON [PRIMARY]
|
||||
|
||||
COMMIT
|
||||
|
||||
:VERSION 2
|
||||
|
||||
BEGIN TRANSACTION
|
||||
|
||||
INSERT INTO Friends (PrincipalID, Friend, Flags, Offered) SELECT [ownerID], [friendID], [friendPerms], 0 FROM userfriends;
|
||||
|
||||
COMMIT
|
|
@ -0,0 +1,225 @@
|
|||
:VERSION 1
|
||||
|
||||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE [dbo].[regions](
|
||||
[regionHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
|
||||
[regionName] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
|
||||
[uuid] [varchar](255) COLLATE Latin1_General_CI_AS NOT NULL,
|
||||
[regionRecvKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
|
||||
[regionSecret] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
|
||||
[regionSendKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
|
||||
[regionDataURI] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
|
||||
[serverIP] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
|
||||
[serverPort] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
|
||||
[serverURI] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
|
||||
[locX] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
|
||||
[locY] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
|
||||
[locZ] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
|
||||
[eastOverrideHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
|
||||
[westOverrideHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
|
||||
[southOverrideHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
|
||||
[northOverrideHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
|
||||
[regionAssetURI] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
|
||||
[regionAssetRecvKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
|
||||
[regionAssetSendKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
|
||||
[regionUserURI] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
|
||||
[regionUserRecvKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
|
||||
[regionUserSendKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
|
||||
[regionMapTexture] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
|
||||
[serverHttpPort] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
|
||||
[serverRemotingPort] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
|
||||
[owner_uuid] [varchar](36) COLLATE Latin1_General_CI_AS NULL,
|
||||
PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[uuid] ASC
|
||||
)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
|
||||
COMMIT
|
||||
|
||||
|
||||
:VERSION 2
|
||||
|
||||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE Tmp_regions
|
||||
(
|
||||
uuid varchar(36) COLLATE Latin1_General_CI_AS NOT NULL,
|
||||
regionHandle bigint NULL,
|
||||
regionName varchar(20) NULL,
|
||||
regionRecvKey varchar(128) NULL,
|
||||
regionSendKey varchar(128) NULL,
|
||||
regionSecret varchar(128) NULL,
|
||||
regionDataURI varchar(128) NULL,
|
||||
serverIP varchar(64) NULL,
|
||||
serverPort int NULL,
|
||||
serverURI varchar(255) NULL,
|
||||
locX int NULL,
|
||||
locY int NULL,
|
||||
locZ int NULL,
|
||||
eastOverrideHandle bigint NULL,
|
||||
westOverrideHandle bigint NULL,
|
||||
southOverrideHandle bigint NULL,
|
||||
northOverrideHandle bigint NULL,
|
||||
regionAssetURI varchar(255) NULL,
|
||||
regionAssetRecvKey varchar(128) NULL,
|
||||
regionAssetSendKey varchar(128) NULL,
|
||||
regionUserURI varchar(255) NULL,
|
||||
regionUserRecvKey varchar(128) NULL,
|
||||
regionUserSendKey varchar(128) NULL,
|
||||
regionMapTexture varchar(36) NULL,
|
||||
serverHttpPort int NULL,
|
||||
serverRemotingPort int NULL,
|
||||
owner_uuid varchar(36) NULL,
|
||||
originUUID varchar(36) NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000')
|
||||
) ON [PRIMARY]
|
||||
|
||||
IF EXISTS(SELECT * FROM regions)
|
||||
EXEC('INSERT INTO Tmp_regions (uuid, regionHandle, regionName, regionRecvKey, regionSendKey, regionSecret, regionDataURI, serverIP, serverPort, serverURI, locX, locY, locZ, eastOverrideHandle, westOverrideHandle, southOverrideHandle, northOverrideHandle, regionAssetURI, regionAssetRecvKey, regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey, regionMapTexture, serverHttpPort, serverRemotingPort, owner_uuid)
|
||||
SELECT CONVERT(varchar(36), uuid), CONVERT(bigint, regionHandle), CONVERT(varchar(20), regionName), CONVERT(varchar(128), regionRecvKey), CONVERT(varchar(128), regionSendKey), CONVERT(varchar(128), regionSecret), CONVERT(varchar(128), regionDataURI), CONVERT(varchar(64), serverIP), CONVERT(int, serverPort), serverURI, CONVERT(int, locX), CONVERT(int, locY), CONVERT(int, locZ), CONVERT(bigint, eastOverrideHandle), CONVERT(bigint, westOverrideHandle), CONVERT(bigint, southOverrideHandle), CONVERT(bigint, northOverrideHandle), regionAssetURI, CONVERT(varchar(128), regionAssetRecvKey), CONVERT(varchar(128), regionAssetSendKey), regionUserURI, CONVERT(varchar(128), regionUserRecvKey), CONVERT(varchar(128), regionUserSendKey), CONVERT(varchar(36), regionMapTexture), CONVERT(int, serverHttpPort), CONVERT(int, serverRemotingPort), owner_uuid FROM regions')
|
||||
|
||||
DROP TABLE regions
|
||||
|
||||
EXECUTE sp_rename N'Tmp_regions', N'regions', 'OBJECT'
|
||||
|
||||
ALTER TABLE regions ADD CONSTRAINT
|
||||
PK__regions__uuid PRIMARY KEY CLUSTERED
|
||||
(
|
||||
uuid
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
COMMIT
|
||||
|
||||
:VERSION 3
|
||||
|
||||
BEGIN TRANSACTION
|
||||
|
||||
CREATE NONCLUSTERED INDEX IX_regions_name ON dbo.regions
|
||||
(
|
||||
regionName
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
CREATE NONCLUSTERED INDEX IX_regions_handle ON dbo.regions
|
||||
(
|
||||
regionHandle
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
|
||||
CREATE NONCLUSTERED INDEX IX_regions_override ON dbo.regions
|
||||
(
|
||||
eastOverrideHandle,
|
||||
westOverrideHandle,
|
||||
southOverrideHandle,
|
||||
northOverrideHandle
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
COMMIT
|
||||
|
||||
|
||||
:VERSION 4
|
||||
|
||||
/* To prevent any potential data loss issues, you should review this script in detail before running it outside the context of the database designer.*/
|
||||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE dbo.Tmp_regions
|
||||
(
|
||||
uuid uniqueidentifier NOT NULL,
|
||||
regionHandle bigint NULL,
|
||||
regionName varchar(20) NULL,
|
||||
regionRecvKey varchar(128) NULL,
|
||||
regionSendKey varchar(128) NULL,
|
||||
regionSecret varchar(128) NULL,
|
||||
regionDataURI varchar(128) NULL,
|
||||
serverIP varchar(64) NULL,
|
||||
serverPort int NULL,
|
||||
serverURI varchar(255) NULL,
|
||||
locX int NULL,
|
||||
locY int NULL,
|
||||
locZ int NULL,
|
||||
eastOverrideHandle bigint NULL,
|
||||
westOverrideHandle bigint NULL,
|
||||
southOverrideHandle bigint NULL,
|
||||
northOverrideHandle bigint NULL,
|
||||
regionAssetURI varchar(255) NULL,
|
||||
regionAssetRecvKey varchar(128) NULL,
|
||||
regionAssetSendKey varchar(128) NULL,
|
||||
regionUserURI varchar(255) NULL,
|
||||
regionUserRecvKey varchar(128) NULL,
|
||||
regionUserSendKey varchar(128) NULL,
|
||||
regionMapTexture uniqueidentifier NULL,
|
||||
serverHttpPort int NULL,
|
||||
serverRemotingPort int NULL,
|
||||
owner_uuid uniqueidentifier NOT NULL,
|
||||
originUUID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000')
|
||||
) ON [PRIMARY]
|
||||
|
||||
IF EXISTS(SELECT * FROM dbo.regions)
|
||||
EXEC('INSERT INTO dbo.Tmp_regions (uuid, regionHandle, regionName, regionRecvKey, regionSendKey, regionSecret, regionDataURI, serverIP, serverPort, serverURI, locX, locY, locZ, eastOverrideHandle, westOverrideHandle, southOverrideHandle, northOverrideHandle, regionAssetURI, regionAssetRecvKey, regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey, regionMapTexture, serverHttpPort, serverRemotingPort, owner_uuid, originUUID)
|
||||
SELECT CONVERT(uniqueidentifier, uuid), regionHandle, regionName, regionRecvKey, regionSendKey, regionSecret, regionDataURI, serverIP, serverPort, serverURI, locX, locY, locZ, eastOverrideHandle, westOverrideHandle, southOverrideHandle, northOverrideHandle, regionAssetURI, regionAssetRecvKey, regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey, CONVERT(uniqueidentifier, regionMapTexture), serverHttpPort, serverRemotingPort, CONVERT(uniqueidentifier, owner_uuid), CONVERT(uniqueidentifier, originUUID) FROM dbo.regions WITH (HOLDLOCK TABLOCKX)')
|
||||
|
||||
DROP TABLE dbo.regions
|
||||
|
||||
EXECUTE sp_rename N'dbo.Tmp_regions', N'regions', 'OBJECT'
|
||||
|
||||
ALTER TABLE dbo.regions ADD CONSTRAINT
|
||||
PK__regions__uuid PRIMARY KEY CLUSTERED
|
||||
(
|
||||
uuid
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
CREATE NONCLUSTERED INDEX IX_regions_name ON dbo.regions
|
||||
(
|
||||
regionName
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
CREATE NONCLUSTERED INDEX IX_regions_handle ON dbo.regions
|
||||
(
|
||||
regionHandle
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
CREATE NONCLUSTERED INDEX IX_regions_override ON dbo.regions
|
||||
(
|
||||
eastOverrideHandle,
|
||||
westOverrideHandle,
|
||||
southOverrideHandle,
|
||||
northOverrideHandle
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
COMMIT
|
||||
|
||||
|
||||
:VERSION 5
|
||||
|
||||
BEGIN TRANSACTION
|
||||
|
||||
ALTER TABLE regions ADD access int default 0;
|
||||
|
||||
COMMIT
|
||||
|
||||
|
||||
:VERSION 6
|
||||
|
||||
BEGIN TRANSACTION
|
||||
|
||||
ALTER TABLE regions ADD scopeid uniqueidentifier default '00000000-0000-0000-0000-000000000000';
|
||||
ALTER TABLE regions ADD DEFAULT ('00000000-0000-0000-0000-000000000000') FOR [owner_uuid];
|
||||
ALTER TABLE regions ADD sizeX integer not null default 0;
|
||||
ALTER TABLE regions ADD sizeY integer not null default 0;
|
||||
|
||||
COMMIT
|
||||
|
||||
|
||||
:VERSION 7
|
||||
|
||||
BEGIN TRANSACTION
|
||||
|
||||
ALTER TABLE regions ADD [flags] integer NOT NULL DEFAULT 0;
|
||||
CREATE INDEX [flags] ON regions(flags);
|
||||
ALTER TABLE [regions] ADD [last_seen] integer NOT NULL DEFAULT 0;
|
||||
ALTER TABLE [regions] ADD [PrincipalID] uniqueidentifier NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000';
|
||||
ALTER TABLE [regions] ADD [Token] varchar(255) NOT NULL DEFAULT 0;
|
||||
|
||||
COMMIT
|
||||
|
||||
|
|
@ -0,0 +1,244 @@
|
|||
:VERSION 1
|
||||
|
||||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE [inventoryfolders] (
|
||||
[folderID] [varchar](36) NOT NULL default '',
|
||||
[agentID] [varchar](36) default NULL,
|
||||
[parentFolderID] [varchar](36) default NULL,
|
||||
[folderName] [varchar](64) default NULL,
|
||||
[type] [smallint] NOT NULL default 0,
|
||||
[version] [int] NOT NULL default 0,
|
||||
PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[folderID] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
|
||||
CREATE NONCLUSTERED INDEX [owner] ON [inventoryfolders]
|
||||
(
|
||||
[agentID] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
CREATE NONCLUSTERED INDEX [parent] ON [inventoryfolders]
|
||||
(
|
||||
[parentFolderID] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
|
||||
CREATE TABLE [inventoryitems] (
|
||||
[inventoryID] [varchar](36) NOT NULL default '',
|
||||
[assetID] [varchar](36) default NULL,
|
||||
[assetType] [int] default NULL,
|
||||
[parentFolderID] [varchar](36) default NULL,
|
||||
[avatarID] [varchar](36) default NULL,
|
||||
[inventoryName] [varchar](64) default NULL,
|
||||
[inventoryDescription] [varchar](128) default NULL,
|
||||
[inventoryNextPermissions] [int] default NULL,
|
||||
[inventoryCurrentPermissions] [int] default NULL,
|
||||
[invType] [int] default NULL,
|
||||
[creatorID] [varchar](36) default NULL,
|
||||
[inventoryBasePermissions] [int] NOT NULL default 0,
|
||||
[inventoryEveryOnePermissions] [int] NOT NULL default 0,
|
||||
[salePrice] [int] default NULL,
|
||||
[saleType] [tinyint] default NULL,
|
||||
[creationDate] [int] default NULL,
|
||||
[groupID] [varchar](36) default NULL,
|
||||
[groupOwned] [bit] default NULL,
|
||||
[flags] [int] default NULL,
|
||||
PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[inventoryID] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
|
||||
|
||||
CREATE NONCLUSTERED INDEX [owner] ON [inventoryitems]
|
||||
(
|
||||
[avatarID] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
CREATE NONCLUSTERED INDEX [folder] ON [inventoryitems]
|
||||
(
|
||||
[parentFolderID] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
COMMIT
|
||||
|
||||
|
||||
:VERSION 2
|
||||
|
||||
BEGIN TRANSACTION
|
||||
|
||||
ALTER TABLE inventoryitems ADD inventoryGroupPermissions INTEGER NOT NULL default 0
|
||||
|
||||
COMMIT
|
||||
|
||||
:VERSION 3
|
||||
|
||||
/* To prevent any potential data loss issues, you should review this script in detail before running it outside the context of the database designer.*/
|
||||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE dbo.Tmp_inventoryfolders
|
||||
(
|
||||
folderID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
|
||||
agentID uniqueidentifier NULL DEFAULT (NULL),
|
||||
parentFolderID uniqueidentifier NULL DEFAULT (NULL),
|
||||
folderName varchar(64) NULL DEFAULT (NULL),
|
||||
type smallint NOT NULL DEFAULT ((0)),
|
||||
version int NOT NULL DEFAULT ((0))
|
||||
) ON [PRIMARY]
|
||||
|
||||
IF EXISTS(SELECT * FROM dbo.inventoryfolders)
|
||||
EXEC('INSERT INTO dbo.Tmp_inventoryfolders (folderID, agentID, parentFolderID, folderName, type, version)
|
||||
SELECT CONVERT(uniqueidentifier, folderID), CONVERT(uniqueidentifier, agentID), CONVERT(uniqueidentifier, parentFolderID), folderName, type, version FROM dbo.inventoryfolders WITH (HOLDLOCK TABLOCKX)')
|
||||
|
||||
DROP TABLE dbo.inventoryfolders
|
||||
|
||||
EXECUTE sp_rename N'dbo.Tmp_inventoryfolders', N'inventoryfolders', 'OBJECT'
|
||||
|
||||
ALTER TABLE dbo.inventoryfolders ADD CONSTRAINT
|
||||
PK__inventor__C2FABFB3173876EA PRIMARY KEY CLUSTERED
|
||||
(
|
||||
folderID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
CREATE NONCLUSTERED INDEX owner ON dbo.inventoryfolders
|
||||
(
|
||||
agentID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
CREATE NONCLUSTERED INDEX parent ON dbo.inventoryfolders
|
||||
(
|
||||
parentFolderID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
COMMIT
|
||||
|
||||
|
||||
:VERSION 4
|
||||
|
||||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE dbo.Tmp_inventoryitems
|
||||
(
|
||||
inventoryID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
|
||||
assetID uniqueidentifier NULL DEFAULT (NULL),
|
||||
assetType int NULL DEFAULT (NULL),
|
||||
parentFolderID uniqueidentifier NULL DEFAULT (NULL),
|
||||
avatarID uniqueidentifier NULL DEFAULT (NULL),
|
||||
inventoryName varchar(64) NULL DEFAULT (NULL),
|
||||
inventoryDescription varchar(128) NULL DEFAULT (NULL),
|
||||
inventoryNextPermissions int NULL DEFAULT (NULL),
|
||||
inventoryCurrentPermissions int NULL DEFAULT (NULL),
|
||||
invType int NULL DEFAULT (NULL),
|
||||
creatorID uniqueidentifier NULL DEFAULT (NULL),
|
||||
inventoryBasePermissions int NOT NULL DEFAULT ((0)),
|
||||
inventoryEveryOnePermissions int NOT NULL DEFAULT ((0)),
|
||||
salePrice int NULL DEFAULT (NULL),
|
||||
saleType tinyint NULL DEFAULT (NULL),
|
||||
creationDate int NULL DEFAULT (NULL),
|
||||
groupID uniqueidentifier NULL DEFAULT (NULL),
|
||||
groupOwned bit NULL DEFAULT (NULL),
|
||||
flags int NULL DEFAULT (NULL),
|
||||
inventoryGroupPermissions int NOT NULL DEFAULT ((0))
|
||||
) ON [PRIMARY]
|
||||
|
||||
IF EXISTS(SELECT * FROM dbo.inventoryitems)
|
||||
EXEC('INSERT INTO dbo.Tmp_inventoryitems (inventoryID, assetID, assetType, parentFolderID, avatarID, inventoryName, inventoryDescription, inventoryNextPermissions, inventoryCurrentPermissions, invType, creatorID, inventoryBasePermissions, inventoryEveryOnePermissions, salePrice, saleType, creationDate, groupID, groupOwned, flags, inventoryGroupPermissions)
|
||||
SELECT CONVERT(uniqueidentifier, inventoryID), CONVERT(uniqueidentifier, assetID), assetType, CONVERT(uniqueidentifier, parentFolderID), CONVERT(uniqueidentifier, avatarID), inventoryName, inventoryDescription, inventoryNextPermissions, inventoryCurrentPermissions, invType, CONVERT(uniqueidentifier, creatorID), inventoryBasePermissions, inventoryEveryOnePermissions, salePrice, saleType, creationDate, CONVERT(uniqueidentifier, groupID), groupOwned, flags, inventoryGroupPermissions FROM dbo.inventoryitems WITH (HOLDLOCK TABLOCKX)')
|
||||
|
||||
DROP TABLE dbo.inventoryitems
|
||||
|
||||
EXECUTE sp_rename N'dbo.Tmp_inventoryitems', N'inventoryitems', 'OBJECT'
|
||||
|
||||
ALTER TABLE dbo.inventoryitems ADD CONSTRAINT
|
||||
PK__inventor__C4B7BC2220C1E124 PRIMARY KEY CLUSTERED
|
||||
(
|
||||
inventoryID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
|
||||
CREATE NONCLUSTERED INDEX owner ON dbo.inventoryitems
|
||||
(
|
||||
avatarID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
CREATE NONCLUSTERED INDEX folder ON dbo.inventoryitems
|
||||
(
|
||||
parentFolderID
|
||||
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
|
||||
COMMIT
|
||||
|
||||
:VERSION 5
|
||||
|
||||
# It would be totally crazy to have to recreate the whole table just to change one column type,
|
||||
# just because MS SQL treats each DEFAULT as a constraint object that must be dropped
|
||||
# before anything can be done to the column. Since all defaults here are unnamed, there is
|
||||
# no easy way to drop them! The hairy piece of code below removes all DEFAULT constraints
|
||||
# from InventoryItems.
|
||||
|
||||
# SO: anything that's NULLable is by default NULL, so please don't declare DEFAULT(NULL),
|
||||
# they do nothing but prevent changes to the columns. If you really
|
||||
# need to have DEFAULTs or other constraints, give them names so they can be dropped when needed!
|
||||
|
||||
BEGIN TRANSACTION
|
||||
DECLARE @nm varchar(80);
|
||||
DECLARE x CURSOR LOCAL FORWARD_ONLY READ_ONLY
|
||||
FOR SELECT name FROM sys.default_constraints where parent_object_id = OBJECT_ID('inventoryitems');
|
||||
OPEN x;
|
||||
FETCH NEXT FROM x INTO @nm;
|
||||
WHILE @@FETCH_STATUS = 0
|
||||
BEGIN
|
||||
EXEC('alter table inventoryitems drop ' + @nm);
|
||||
FETCH NEXT FROM x INTO @nm;
|
||||
END
|
||||
CLOSE x
|
||||
DEALLOCATE x
|
||||
COMMIT
|
||||
|
||||
# all DEFAULTs dropped!
|
||||
|
||||
:GO
|
||||
|
||||
BEGIN TRANSACTION
|
||||
|
||||
# Restoring defaults:
|
||||
# NOTE: [inventoryID] does NOT need one: it's NOT NULL PK and a unique Guid must be provided every time anyway!
|
||||
|
||||
alter table inventoryitems
|
||||
add constraint def_baseperm default 0 for inventoryBasePermissions
|
||||
alter table inventoryitems
|
||||
add constraint def_allperm default 0 for inventoryEveryOnePermissions
|
||||
alter table inventoryitems
|
||||
add constraint def_grpperm default 0 for inventoryGroupPermissions
|
||||
|
||||
COMMIT
|
||||
|
||||
:VERSION 7
|
||||
|
||||
BEGIN TRANSACTION
|
||||
|
||||
# CreatorID goes back to VARCHAR(36) (???)
|
||||
|
||||
exec sp_rename 'inventoryitems.CreatorID', 'cr_old', 'COLUMN'
|
||||
|
||||
:GO
|
||||
|
||||
alter table inventoryitems
|
||||
add creatorID varchar(36) NULL
|
||||
|
||||
:GO
|
||||
|
||||
update inventoryitems set creatorID = CONVERT(VARCHAR(36), cr_old)
|
||||
|
||||
alter table inventoryitems
|
||||
drop column cr_old
|
||||
|
||||
COMMIT
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,3 +1,5 @@
|
|||
:VERSION 1
|
||||
|
||||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE [logs] (
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue