Merge branch 'Migrations'
This merges AlexRa's work on migration streamlining. This merge is experimental. If it causes issues, feel free to back out. Signed-off-by: Melanie <melanie@t-data.com>soprefactor
commit
e260610c00
|
@ -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,100 @@
|
|||
: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';
|
||||
|
||||
|
|
@ -1,3 +1,5 @@
|
|||
:VERSION 1
|
||||
|
||||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE [auth] (
|
||||
|
@ -14,4 +16,13 @@ CREATE TABLE [tokens] (
|
|||
[validity] [datetime] NOT NULL )
|
||||
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,174 @@
|
|||
: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
|
||||
|
||||
|
|
@ -1,3 +1,5 @@
|
|||
:VERSION 1
|
||||
|
||||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE [logs] (
|
|
@ -1,3 +1,5 @@
|
|||
:VERSION 1
|
||||
|
||||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE [Presence] (
|
||||
|
@ -16,4 +18,13 @@ CREATE TABLE [Presence] (
|
|||
)
|
||||
ON [PRIMARY]
|
||||
|
||||
COMMIT
|
||||
|
||||
:VERSION 2
|
||||
|
||||
BEGIN TRANSACTION
|
||||
|
||||
CREATE UNIQUE INDEX SessionID ON Presence(SessionID);
|
||||
CREATE INDEX UserID ON Presence(UserID);
|
||||
|
||||
COMMIT
|
|
@ -0,0 +1,929 @@
|
|||
|
||||
:VERSION 1
|
||||
|
||||
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]
|
||||
|
||||
:VERSION 2
|
||||
|
||||
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
|
||||
|
||||
:VERSION 3
|
||||
|
||||
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
|
||||
|
||||
:VERSION 4
|
||||
|
||||
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
|
||||
|
||||
|
||||
:VERSION 5
|
||||
|
||||
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
|
||||
|
||||
|
||||
:VERSION 6
|
||||
|
||||
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
|
||||
|
||||
|
||||
:VERSION 7
|
||||
|
||||
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
|
||||
|
||||
|
||||
:VERSION 8
|
||||
|
||||
BEGIN TRANSACTION
|
||||
|
||||
ALTER TABLE land ADD OtherCleanTime integer NOT NULL default 0;
|
||||
ALTER TABLE land ADD Dwell integer NOT NULL default 0;
|
||||
|
||||
COMMIT
|
||||
|
||||
:VERSION 9
|
||||
|
||||
BEGIN TRANSACTION
|
||||
|
||||
ALTER TABLE prims ADD Material tinyint NOT NULL default 3
|
||||
|
||||
COMMIT
|
||||
|
||||
|
||||
:VERSION 10
|
||||
|
||||
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
|
||||
|
||||
|
||||
:VERSION 11
|
||||
|
||||
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
|
||||
|
||||
|
||||
:VERSION 12
|
||||
|
||||
BEGIN TRANSACTION
|
||||
|
||||
ALTER TABLE prims ADD LinkNumber integer not null default 0
|
||||
|
||||
COMMIT
|
||||
|
||||
|
||||
:VERSION 13
|
||||
|
||||
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
|
||||
|
||||
|
||||
:VERSION 14
|
||||
|
||||
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
|
||||
|
||||
|
||||
:VERSION 15
|
||||
|
||||
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
|
||||
|
||||
|
||||
:VERSION 16
|
||||
|
||||
|
||||
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
|
||||
|
||||
|
||||
:VERSION 17
|
||||
|
||||
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
|
||||
|
||||
|
||||
|
||||
:VERSION 18
|
||||
|
||||
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
|
||||
|
||||
|
||||
|
||||
:VERSION 19
|
||||
|
||||
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
|
||||
|
||||
|
||||
:VERSION 20
|
||||
|
||||
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
|
||||
|
||||
|
||||
:VERSION 21
|
||||
|
||||
BEGIN TRANSACTION
|
||||
|
||||
ALTER TABLE prims ADD PassTouches bit not null default 0
|
||||
|
||||
COMMIT
|
||||
|
||||
|
||||
:VERSION 22
|
||||
|
||||
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
|
||||
|
||||
:VERSION 23
|
||||
|
||||
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,55 @@
|
|||
:VERSION 1
|
||||
|
||||
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]
|
||||
|
||||
|
||||
:VERSION 2
|
||||
|
||||
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
|
||||
|
||||
:VERSION 3
|
||||
|
||||
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
|
||||
|
||||
:VERSION 4
|
||||
|
||||
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
|
||||
|
|
@ -0,0 +1,421 @@
|
|||
:VERSION 1
|
||||
|
||||
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]
|
||||
|
||||
:VERSION 2
|
||||
|
||||
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
|
||||
|
||||
|
||||
:VERSION 3
|
||||
|
||||
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
|
||||
|
||||
|
||||
:VERSION 4
|
||||
|
||||
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
|
||||
|
||||
|
||||
:VERSION 5
|
||||
|
||||
BEGIN TRANSACTION
|
||||
|
||||
ALTER TABLE users add email varchar(250);
|
||||
|
||||
COMMIT
|
||||
|
||||
|
||||
:VERSION 6
|
||||
|
||||
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
|
||||
|
||||
|
||||
:VERSION 7
|
||||
|
||||
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
|
||||
|
||||
|
||||
:VERSION 8
|
||||
|
||||
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
|
||||
|
||||
|
||||
:VERSION 9
|
||||
|
||||
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
|
||||
|
||||
|
||||
:VERSION 10
|
||||
|
||||
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
|
||||
|
||||
|
||||
:VERSION 11
|
||||
|
||||
BEGIN TRANSACTION
|
||||
|
||||
ALTER TABLE users ADD scopeID uniqueidentifier not null default '00000000-0000-0000-0000-000000000000'
|
||||
|
||||
COMMIT
|
|
@ -70,61 +70,111 @@ namespace OpenSim.Data
|
|||
|
||||
public class Migration
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
protected static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private string _type;
|
||||
private DbConnection _conn;
|
||||
// private string _subtype;
|
||||
private Assembly _assem;
|
||||
private Regex _match;
|
||||
protected string _type;
|
||||
protected DbConnection _conn;
|
||||
protected Assembly _assem;
|
||||
|
||||
private static readonly string _migrations_create = "create table migrations(name varchar(100), version int)";
|
||||
// private static readonly string _migrations_init = "insert into migrations values('migrations', 1)";
|
||||
// private static readonly string _migrations_find = "select version from migrations where name='migrations'";
|
||||
private Regex _match_old;
|
||||
private Regex _match_new;
|
||||
|
||||
|
||||
public Migration(DbConnection conn, Assembly assem, string type)
|
||||
{
|
||||
_type = type;
|
||||
_conn = conn;
|
||||
_assem = assem;
|
||||
_match = new Regex(@"\.(\d\d\d)_" + _type + @"\.sql");
|
||||
Initialize();
|
||||
/// <summary>Have the parameterless constructor just so we can specify it as a generic parameter with the new() constraint.
|
||||
/// Currently this is only used in the tests. A Migration instance created this way must be then
|
||||
/// initialized with Initialize(). Regular creation should be through the parameterized constructors.
|
||||
/// </summary>
|
||||
public Migration()
|
||||
{
|
||||
}
|
||||
|
||||
public Migration(DbConnection conn, Assembly assem, string subtype, string type)
|
||||
{
|
||||
Initialize(conn, assem, type, subtype);
|
||||
}
|
||||
|
||||
public Migration(DbConnection conn, Assembly assem, string type)
|
||||
{
|
||||
Initialize(conn, assem, type, "");
|
||||
}
|
||||
|
||||
/// <summary>Must be called after creating with the parameterless constructor.
|
||||
/// NOTE that the Migration class now doesn't access database in any way during initialization.
|
||||
/// Specifically, it won't check if the [migrations] table exists. Such checks are done later:
|
||||
/// automatically on Update(), or you can explicitly call InitMigrationsTable().
|
||||
/// </summary>
|
||||
/// <param name="conn"></param>
|
||||
/// <param name="assem"></param>
|
||||
/// <param name="subtype"></param>
|
||||
/// <param name="type"></param>
|
||||
public void Initialize (DbConnection conn, Assembly assem, string type, string subtype)
|
||||
{
|
||||
_type = type;
|
||||
_conn = conn;
|
||||
_assem = assem;
|
||||
_match = new Regex(subtype + @"\.(\d\d\d)_" + _type + @"\.sql");
|
||||
Initialize();
|
||||
_match_old = new Regex(subtype + @"\.(\d\d\d)_" + _type + @"\.sql");
|
||||
string s = String.IsNullOrEmpty(subtype) ? _type : _type + @"\." + subtype;
|
||||
_match_new = new Regex(@"\." + s + @"\.migrations(?:\.(?<ver>\d+)$|.*)");
|
||||
}
|
||||
|
||||
private void Initialize()
|
||||
public void InitMigrationsTable()
|
||||
{
|
||||
// clever, eh, we figure out which migrations version we are
|
||||
int migration_version = FindVersion(_conn, "migrations");
|
||||
|
||||
if (migration_version > 0)
|
||||
return;
|
||||
|
||||
// If not, create the migration tables
|
||||
using (DbCommand cmd = _conn.CreateCommand())
|
||||
// NOTE: normally when the [migrations] table is created, the version record for 'migrations' is
|
||||
// added immediately. However, if for some reason the table is there but empty, we want to handle that as well.
|
||||
int ver = FindVersion(_conn, "migrations");
|
||||
if (ver <= 0) // -1 = no table, 0 = no version record
|
||||
{
|
||||
cmd.CommandText = _migrations_create;
|
||||
cmd.ExecuteNonQuery();
|
||||
if( ver < 0 )
|
||||
ExecuteScript("create table migrations(name varchar(100), version int)");
|
||||
InsertVersion("migrations", 1);
|
||||
}
|
||||
|
||||
InsertVersion("migrations", 1);
|
||||
}
|
||||
|
||||
/// <summary>Executes a script, possibly in a database-specific way.
|
||||
/// It can be redefined for a specific DBMS, if necessary. Specifically,
|
||||
/// to avoid problems with proc definitions in MySQL, we must use
|
||||
/// MySqlScript class instead of just DbCommand. We don't want to bring
|
||||
/// MySQL references here, so instead define a MySQLMigration class
|
||||
/// in OpenSim.Data.MySQL
|
||||
/// </summary>
|
||||
/// <param name="conn"></param>
|
||||
/// <param name="script">Array of strings, one-per-batch (often just one)</param>
|
||||
protected virtual void ExecuteScript(DbConnection conn, string[] script)
|
||||
{
|
||||
using (DbCommand cmd = conn.CreateCommand())
|
||||
{
|
||||
cmd.CommandTimeout = 0;
|
||||
foreach (string sql in script)
|
||||
{
|
||||
cmd.CommandText = sql;
|
||||
cmd.ExecuteNonQuery();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void ExecuteScript(DbConnection conn, string sql)
|
||||
{
|
||||
ExecuteScript(conn, new string[]{sql});
|
||||
}
|
||||
|
||||
protected void ExecuteScript(string sql)
|
||||
{
|
||||
ExecuteScript(_conn, sql);
|
||||
}
|
||||
|
||||
protected void ExecuteScript(string[] script)
|
||||
{
|
||||
ExecuteScript(_conn, script);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void Update()
|
||||
{
|
||||
int version = 0;
|
||||
version = FindVersion(_conn, _type);
|
||||
InitMigrationsTable();
|
||||
|
||||
SortedList<int, string> migrations = GetMigrationsAfter(version);
|
||||
int version = FindVersion(_conn, _type);
|
||||
|
||||
SortedList<int, string[]> migrations = GetMigrationsAfter(version);
|
||||
if (migrations.Count < 1)
|
||||
return;
|
||||
|
||||
|
@ -132,57 +182,41 @@ namespace OpenSim.Data
|
|||
m_log.InfoFormat("[MIGRATIONS] Upgrading {0} to latest revision {1}.", _type, migrations.Keys[migrations.Count - 1]);
|
||||
m_log.Info("[MIGRATIONS] NOTE: this may take a while, don't interupt this process!");
|
||||
|
||||
using (DbCommand cmd = _conn.CreateCommand())
|
||||
foreach (KeyValuePair<int, string[]> kvp in migrations)
|
||||
{
|
||||
foreach (KeyValuePair<int, string> kvp in migrations)
|
||||
{
|
||||
int newversion = kvp.Key;
|
||||
cmd.CommandText = kvp.Value;
|
||||
// we need to up the command timeout to infinite as we might be doing long migrations.
|
||||
cmd.CommandTimeout = 0;
|
||||
try
|
||||
{
|
||||
cmd.ExecuteNonQuery();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.DebugFormat("[MIGRATIONS] Cmd was {0}", cmd.CommandText);
|
||||
m_log.DebugFormat("[MIGRATIONS]: An error has occurred in the migration {0}.\n This may mean you could see errors trying to run OpenSim. If you see database related errors, you will need to fix the issue manually. Continuing.", e.Message);
|
||||
cmd.CommandText = "ROLLBACK;";
|
||||
cmd.ExecuteNonQuery();
|
||||
}
|
||||
int newversion = kvp.Key;
|
||||
// we need to up the command timeout to infinite as we might be doing long migrations.
|
||||
|
||||
if (version == 0)
|
||||
{
|
||||
InsertVersion(_type, newversion);
|
||||
}
|
||||
else
|
||||
{
|
||||
UpdateVersion(_type, newversion);
|
||||
}
|
||||
version = newversion;
|
||||
/* [AlexRa 01-May-10]: We can't always just run any SQL in a single batch (= ExecuteNonQuery()). Things like
|
||||
* stored proc definitions might have to be sent to the server each in a separate batch.
|
||||
* This is certainly so for MS SQL; not sure how the MySQL connector sorts out the mess
|
||||
* with 'delimiter @@'/'delimiter ;' around procs. So each "script" this code executes now is not
|
||||
* a single string, but an array of strings, executed separately.
|
||||
*/
|
||||
try
|
||||
{
|
||||
ExecuteScript(kvp.Value);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
m_log.DebugFormat("[MIGRATIONS] Cmd was {0}", kvp.Value.ToString());
|
||||
m_log.DebugFormat("[MIGRATIONS]: An error has occurred in the migration {0}.\n This may mean you could see errors trying to run OpenSim. If you see database related errors, you will need to fix the issue manually. Migration aborted.", e.Message);
|
||||
ExecuteScript("ROLLBACK;");
|
||||
return;
|
||||
}
|
||||
|
||||
if (version == 0)
|
||||
{
|
||||
InsertVersion(_type, newversion);
|
||||
}
|
||||
else
|
||||
{
|
||||
UpdateVersion(_type, newversion);
|
||||
}
|
||||
version = newversion;
|
||||
}
|
||||
}
|
||||
|
||||
// private int MaxVersion()
|
||||
// {
|
||||
// int max = 0;
|
||||
// string[] names = _assem.GetManifestResourceNames();
|
||||
|
||||
// foreach (string s in names)
|
||||
// {
|
||||
// Match m = _match.Match(s);
|
||||
// if (m.Success)
|
||||
// {
|
||||
// int MigrationVersion = int.Parse(m.Groups[1].ToString());
|
||||
// if (MigrationVersion > max)
|
||||
// max = MigrationVersion;
|
||||
// }
|
||||
// }
|
||||
// return max;
|
||||
// }
|
||||
|
||||
public int Version
|
||||
{
|
||||
get { return FindVersion(_conn, _type); }
|
||||
|
@ -206,7 +240,7 @@ namespace OpenSim.Data
|
|||
try
|
||||
{
|
||||
cmd.CommandText = "select version from migrations where name='" + type + "' order by version desc";
|
||||
using (IDataReader reader = cmd.ExecuteReader())
|
||||
using (DbDataReader reader = cmd.ExecuteReader())
|
||||
{
|
||||
if (reader.Read())
|
||||
{
|
||||
|
@ -217,7 +251,8 @@ namespace OpenSim.Data
|
|||
}
|
||||
catch
|
||||
{
|
||||
// Something went wrong, so we're version 0
|
||||
// Something went wrong (probably no table), so we're at version -1
|
||||
version = -1;
|
||||
}
|
||||
}
|
||||
return version;
|
||||
|
@ -225,57 +260,151 @@ namespace OpenSim.Data
|
|||
|
||||
private void InsertVersion(string type, int version)
|
||||
{
|
||||
using (DbCommand cmd = _conn.CreateCommand())
|
||||
{
|
||||
cmd.CommandText = "insert into migrations(name, version) values('" + type + "', " + version + ")";
|
||||
m_log.InfoFormat("[MIGRATIONS]: Creating {0} at version {1}", type, version);
|
||||
cmd.ExecuteNonQuery();
|
||||
}
|
||||
m_log.InfoFormat("[MIGRATIONS]: Creating {0} at version {1}", type, version);
|
||||
ExecuteScript("insert into migrations(name, version) values('" + type + "', " + version + ")");
|
||||
}
|
||||
|
||||
private void UpdateVersion(string type, int version)
|
||||
{
|
||||
using (DbCommand cmd = _conn.CreateCommand())
|
||||
{
|
||||
cmd.CommandText = "update migrations set version=" + version + " where name='" + type + "'";
|
||||
m_log.InfoFormat("[MIGRATIONS]: Updating {0} to version {1}", type, version);
|
||||
cmd.ExecuteNonQuery();
|
||||
}
|
||||
m_log.InfoFormat("[MIGRATIONS]: Updating {0} to version {1}", type, version);
|
||||
ExecuteScript("update migrations set version=" + version + " where name='" + type + "'");
|
||||
}
|
||||
|
||||
// private SortedList<int, string> GetAllMigrations()
|
||||
// {
|
||||
// return GetMigrationsAfter(0);
|
||||
// }
|
||||
private delegate void FlushProc();
|
||||
|
||||
private SortedList<int, string> GetMigrationsAfter(int after)
|
||||
/// <summary>Scans for migration resources in either old-style "scattered" (one file per version)
|
||||
/// or new-style "integrated" format (single file with ":VERSION nnn" sections).
|
||||
/// In the new-style migrations it also recognizes ':GO' separators for parts of the SQL script
|
||||
/// that must be sent to the server separately. The old-style migrations are loaded each in one piece
|
||||
/// and don't support the ':GO' feature.
|
||||
/// </summary>
|
||||
/// <param name="after">The version we are currently at. Scan for any higher versions</param>
|
||||
/// <returns>A list of string arrays, representing the scripts.</returns>
|
||||
private SortedList<int, string[]> GetMigrationsAfter(int after)
|
||||
{
|
||||
string[] names = _assem.GetManifestResourceNames();
|
||||
SortedList<int, string> migrations = new SortedList<int, string>();
|
||||
// because life is funny if we don't
|
||||
Array.Sort(names);
|
||||
SortedList<int, string[]> migrations = new SortedList<int, string[]>();
|
||||
|
||||
string[] names = _assem.GetManifestResourceNames();
|
||||
if( names.Length == 0 ) // should never happen
|
||||
return migrations;
|
||||
|
||||
Array.Sort(names); // we want all the migrations ordered
|
||||
|
||||
int nLastVerFound = 0;
|
||||
Match m = null;
|
||||
string sFile = Array.FindLast(names, nm => { m = _match_new.Match(nm); return m.Success; }); // ; nm.StartsWith(sPrefix, StringComparison.InvariantCultureIgnoreCase
|
||||
|
||||
if( (m != null) && !String.IsNullOrEmpty(sFile) )
|
||||
{
|
||||
/* The filename should be '<StoreName>.migrations[.NNN]' where NNN
|
||||
* is the last version number defined in the file. If the '.NNN' part is recognized, the code can skip
|
||||
* the file without looking inside if we have a higher version already. Without the suffix we read
|
||||
* the file anyway and use the version numbers inside. Any unrecognized suffix (such as '.sql')
|
||||
* is valid but ignored.
|
||||
*
|
||||
* NOTE that we expect only one 'merged' migration file. If there are several, we take the last one.
|
||||
* If you are numbering them, leave only the latest one in the project or at least make sure they numbered
|
||||
* to come up in the correct order (e.g. 'SomeStore.migrations.001' rather than 'SomeStore.migrations.1')
|
||||
*/
|
||||
|
||||
if (m.Groups.Count > 1 && int.TryParse(m.Groups[1].Value, out nLastVerFound))
|
||||
{
|
||||
if( nLastVerFound <= after )
|
||||
goto scan_old_style;
|
||||
}
|
||||
|
||||
System.Text.StringBuilder sb = new System.Text.StringBuilder(4096);
|
||||
int nVersion = -1;
|
||||
|
||||
List<string> script = new List<string>();
|
||||
|
||||
FlushProc flush = delegate()
|
||||
{
|
||||
if (sb.Length > 0) // last SQL stmt to script list
|
||||
{
|
||||
script.Add(sb.ToString());
|
||||
sb.Length = 0;
|
||||
}
|
||||
|
||||
if ( (nVersion > 0) && (nVersion > after) && (script.Count > 0) && !migrations.ContainsKey(nVersion)) // script to the versioned script list
|
||||
{
|
||||
migrations[nVersion] = script.ToArray();
|
||||
}
|
||||
script.Clear();
|
||||
};
|
||||
|
||||
using (Stream resource = _assem.GetManifestResourceStream(sFile))
|
||||
using (StreamReader resourceReader = new StreamReader(resource))
|
||||
{
|
||||
int nLineNo = 0;
|
||||
while (!resourceReader.EndOfStream)
|
||||
{
|
||||
string sLine = resourceReader.ReadLine();
|
||||
nLineNo++;
|
||||
|
||||
if( String.IsNullOrEmpty(sLine) || sLine.StartsWith("#") ) // ignore a comment or empty line
|
||||
continue;
|
||||
|
||||
if (sLine.Trim().Equals(":GO", StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
if (sb.Length == 0) continue;
|
||||
if (nVersion > after)
|
||||
script.Add(sb.ToString());
|
||||
sb.Length = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (sLine.StartsWith(":VERSION ", StringComparison.InvariantCultureIgnoreCase)) // ":VERSION nnn"
|
||||
{
|
||||
flush();
|
||||
|
||||
int n = sLine.IndexOf('#'); // Comment is allowed in version sections, ignored
|
||||
if (n >= 0)
|
||||
sLine = sLine.Substring(0, n);
|
||||
|
||||
if (!int.TryParse(sLine.Substring(9).Trim(), out nVersion))
|
||||
{
|
||||
m_log.ErrorFormat("[MIGRATIONS]: invalid version marker at {0}: line {1}. Migration failed!", sFile, nLineNo);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.AppendLine(sLine);
|
||||
}
|
||||
}
|
||||
flush();
|
||||
|
||||
// If there are scattered migration files as well, only look for those with higher version numbers.
|
||||
if (after < nVersion)
|
||||
after = nVersion;
|
||||
}
|
||||
}
|
||||
|
||||
scan_old_style:
|
||||
// scan "old style" migration pieces anyway, ignore any versions already filled from the single file
|
||||
foreach (string s in names)
|
||||
{
|
||||
Match m = _match.Match(s);
|
||||
m = _match_old.Match(s);
|
||||
if (m.Success)
|
||||
{
|
||||
int version = int.Parse(m.Groups[1].ToString());
|
||||
if (version > after)
|
||||
if ( (version > after) && !migrations.ContainsKey(version) )
|
||||
{
|
||||
using (Stream resource = _assem.GetManifestResourceStream(s))
|
||||
{
|
||||
using (StreamReader resourceReader = new StreamReader(resource))
|
||||
{
|
||||
string resourceString = resourceReader.ReadToEnd();
|
||||
migrations.Add(version, resourceString);
|
||||
string sql = resourceReader.ReadToEnd();
|
||||
migrations.Add(version, new string[]{sql});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (migrations.Count < 1) {
|
||||
|
||||
if (migrations.Count < 1)
|
||||
{
|
||||
m_log.InfoFormat("[MIGRATIONS]: {0} up to date, no migrations to apply", _type);
|
||||
}
|
||||
return migrations;
|
||||
|
|
|
@ -0,0 +1,85 @@
|
|||
/*
|
||||
* Copyright (c) Contributors, http://opensimulator.org/
|
||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of the OpenSimulator Project nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Text.RegularExpressions;
|
||||
using log4net;
|
||||
using MySql.Data.MySqlClient;
|
||||
|
||||
namespace OpenSim.Data.MySQL
|
||||
{
|
||||
/// <summary>This is a MySQL-customized migration processor. The only difference is in how
|
||||
/// it executes SQL scripts (using MySqlScript instead of MyCommand)
|
||||
///
|
||||
/// </summary>
|
||||
public class MySqlMigration : Migration
|
||||
{
|
||||
public MySqlMigration()
|
||||
: base()
|
||||
{
|
||||
}
|
||||
|
||||
public MySqlMigration(DbConnection conn, Assembly assem, string subtype, string type) :
|
||||
base(conn, assem, subtype, type)
|
||||
{
|
||||
}
|
||||
|
||||
public MySqlMigration(DbConnection conn, Assembly assem, string type) :
|
||||
base(conn, assem, type)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void ExecuteScript(DbConnection conn, string[] script)
|
||||
{
|
||||
if (!(conn is MySqlConnection))
|
||||
{
|
||||
base.ExecuteScript(conn, script);
|
||||
return;
|
||||
}
|
||||
|
||||
MySqlScript scr = new MySqlScript((MySqlConnection)conn);
|
||||
{
|
||||
foreach (string sql in script)
|
||||
{
|
||||
scr.Query = sql;
|
||||
scr.Error += delegate(object sender, MySqlScriptErrorEventArgs args)
|
||||
{
|
||||
m_log.ErrorFormat("[MySQL MIGRATION]: Error {0}", args.Exception.Message);
|
||||
m_log.ErrorFormat("[MySQL MIGRATION]: In SQL: {0}", args.StatementText);
|
||||
throw args.Exception;
|
||||
};
|
||||
scr.Execute();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
BEGIN;
|
||||
|
||||
CREATE TABLE `assets` (
|
||||
`id` binary(16) NOT NULL,
|
||||
`name` varchar(64) NOT NULL,
|
||||
`description` varchar(64) NOT NULL,
|
||||
`assetType` tinyint(4) NOT NULL,
|
||||
`invType` tinyint(4) NOT NULL,
|
||||
`local` tinyint(1) NOT NULL,
|
||||
`temporary` tinyint(1) NOT NULL,
|
||||
`data` longblob NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
|
||||
|
||||
COMMIT;
|
|
@ -1,5 +0,0 @@
|
|||
BEGIN;
|
||||
|
||||
CREATE TABLE Avatars (PrincipalID CHAR(36) NOT NULL, Name VARCHAR(32) NOT NULL, Value VARCHAR(255) NOT NULL DEFAULT '', PRIMARY KEY(PrincipalID, Name), KEY(PrincipalID));
|
||||
|
||||
COMMIT;
|
|
@ -1,9 +0,0 @@
|
|||
BEGIN;
|
||||
|
||||
CREATE TABLE `Friends` (
|
||||
`PrincipalID` CHAR(36) NOT NULL,
|
||||
`FriendID` VARCHAR(255) NOT NULL,
|
||||
`Flags` CHAR(16) NOT NULL DEFAULT '0'
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
COMMIT;
|
|
@ -1,5 +0,0 @@
|
|||
BEGIN;
|
||||
|
||||
CREATE TABLE `Friends` (`PrincipalID` CHAR(36) NOT NULL, `Friend` VARCHAR(255) NOT NULL, `Flags` VARCHAR(16) NOT NULL DEFAULT 0, `Offered` VARCHAR(32) NOT NULL DEFAULT 0, PRIMARY KEY(`PrincipalID`, `Friend`), KEY(`PrincipalID`));
|
||||
|
||||
COMMIT;
|
|
@ -1,40 +0,0 @@
|
|||
BEGIN;
|
||||
|
||||
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 (`folderID`),
|
||||
KEY `owner` (`agentID`),
|
||||
KEY `parent` (`parentFolderID`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `inventoryitems` (
|
||||
`inventoryID` varchar(36) NOT NULL default '',
|
||||
`assetID` varchar(36) default NULL,
|
||||
`assetType` int(11) default NULL,
|
||||
`parentFolderID` varchar(36) default NULL,
|
||||
`avatarID` varchar(36) default NULL,
|
||||
`inventoryName` varchar(64) default NULL,
|
||||
`inventoryDescription` varchar(128) default NULL,
|
||||
`inventoryNextPermissions` int(10) unsigned default NULL,
|
||||
`inventoryCurrentPermissions` int(10) unsigned default NULL,
|
||||
`invType` int(11) default NULL,
|
||||
`creatorID` varchar(36) default NULL,
|
||||
`inventoryBasePermissions` int(10) unsigned NOT NULL default 0,
|
||||
`inventoryEveryOnePermissions` int(10) unsigned NOT NULL default 0,
|
||||
`salePrice` int(11) NOT NULL default 0,
|
||||
`saleType` tinyint(4) NOT NULL default 0,
|
||||
`creationDate` int(11) NOT NULL default 0,
|
||||
`groupID` varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000',
|
||||
`groupOwned` tinyint(4) NOT NULL default 0,
|
||||
`flags` int(11) unsigned NOT NULL default 0,
|
||||
PRIMARY KEY (`inventoryID`),
|
||||
KEY `owner` (`avatarID`),
|
||||
KEY `folder` (`parentFolderID`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
COMMIT;
|
|
@ -1,13 +0,0 @@
|
|||
BEGIN;
|
||||
|
||||
CREATE TABLE `Presence` (
|
||||
`UserID` VARCHAR(255) NOT NULL,
|
||||
`RegionID` CHAR(36) NOT NULL,
|
||||
`SessionID` CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
|
||||
`SecureSessionID` CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000'
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
CREATE UNIQUE INDEX SessionID ON Presence(SessionID);
|
||||
CREATE INDEX UserID ON Presence(UserID);
|
||||
|
||||
COMMIT;
|
|
@ -1,154 +0,0 @@
|
|||
BEGIN;
|
||||
|
||||
CREATE TABLE `prims` (
|
||||
`UUID` varchar(255) NOT NULL,
|
||||
`RegionUUID` varchar(255) default NULL,
|
||||
`ParentID` int(11) default NULL,
|
||||
`CreationDate` int(11) default NULL,
|
||||
`Name` varchar(255) default NULL,
|
||||
`SceneGroupID` varchar(255) default NULL,
|
||||
`Text` varchar(255) default NULL,
|
||||
`Description` varchar(255) default NULL,
|
||||
`SitName` varchar(255) default NULL,
|
||||
`TouchName` varchar(255) default NULL,
|
||||
`ObjectFlags` int(11) default NULL,
|
||||
`CreatorID` varchar(255) default NULL,
|
||||
`OwnerID` varchar(255) default NULL,
|
||||
`GroupID` varchar(255) default NULL,
|
||||
`LastOwnerID` varchar(255) default NULL,
|
||||
`OwnerMask` int(11) default NULL,
|
||||
`NextOwnerMask` int(11) default NULL,
|
||||
`GroupMask` int(11) default NULL,
|
||||
`EveryoneMask` int(11) default NULL,
|
||||
`BaseMask` int(11) default NULL,
|
||||
`PositionX` float default NULL,
|
||||
`PositionY` float default NULL,
|
||||
`PositionZ` float default NULL,
|
||||
`GroupPositionX` float default NULL,
|
||||
`GroupPositionY` float default NULL,
|
||||
`GroupPositionZ` float default NULL,
|
||||
`VelocityX` float default NULL,
|
||||
`VelocityY` float default NULL,
|
||||
`VelocityZ` float default NULL,
|
||||
`AngularVelocityX` float default NULL,
|
||||
`AngularVelocityY` float default NULL,
|
||||
`AngularVelocityZ` float default NULL,
|
||||
`AccelerationX` float default NULL,
|
||||
`AccelerationY` float default NULL,
|
||||
`AccelerationZ` float default NULL,
|
||||
`RotationX` float default NULL,
|
||||
`RotationY` float default NULL,
|
||||
`RotationZ` float default NULL,
|
||||
`RotationW` float default NULL,
|
||||
`SitTargetOffsetX` float default NULL,
|
||||
`SitTargetOffsetY` float default NULL,
|
||||
`SitTargetOffsetZ` float default NULL,
|
||||
`SitTargetOrientW` float default NULL,
|
||||
`SitTargetOrientX` float default NULL,
|
||||
`SitTargetOrientY` float default NULL,
|
||||
`SitTargetOrientZ` float default NULL,
|
||||
PRIMARY KEY (`UUID`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
CREATE TABLE `primshapes` (
|
||||
`UUID` varchar(255) NOT NULL,
|
||||
`Shape` int(11) default NULL,
|
||||
`ScaleX` float default NULL,
|
||||
`ScaleY` float default NULL,
|
||||
`ScaleZ` float default NULL,
|
||||
`PCode` int(11) default NULL,
|
||||
`PathBegin` int(11) default NULL,
|
||||
`PathEnd` int(11) default NULL,
|
||||
`PathScaleX` int(11) default NULL,
|
||||
`PathScaleY` int(11) default NULL,
|
||||
`PathShearX` int(11) default NULL,
|
||||
`PathShearY` int(11) default NULL,
|
||||
`PathSkew` int(11) default NULL,
|
||||
`PathCurve` int(11) default NULL,
|
||||
`PathRadiusOffset` int(11) default NULL,
|
||||
`PathRevolutions` int(11) default NULL,
|
||||
`PathTaperX` int(11) default NULL,
|
||||
`PathTaperY` int(11) default NULL,
|
||||
`PathTwist` int(11) default NULL,
|
||||
`PathTwistBegin` int(11) default NULL,
|
||||
`ProfileBegin` int(11) default NULL,
|
||||
`ProfileEnd` int(11) default NULL,
|
||||
`ProfileCurve` int(11) default NULL,
|
||||
`ProfileHollow` int(11) default NULL,
|
||||
`State` int(11) default NULL,
|
||||
`Texture` longblob,
|
||||
`ExtraParams` longblob,
|
||||
PRIMARY KEY (`UUID`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
CREATE TABLE `primitems` (
|
||||
`itemID` varchar(255) NOT NULL,
|
||||
`primID` varchar(255) default NULL,
|
||||
`assetID` varchar(255) default NULL,
|
||||
`parentFolderID` varchar(255) default NULL,
|
||||
`invType` int(11) default NULL,
|
||||
`assetType` int(11) default NULL,
|
||||
`name` varchar(255) default NULL,
|
||||
`description` varchar(255) default NULL,
|
||||
`creationDate` bigint(20) default NULL,
|
||||
`creatorID` varchar(255) default NULL,
|
||||
`ownerID` varchar(255) default NULL,
|
||||
`lastOwnerID` varchar(255) default NULL,
|
||||
`groupID` varchar(255) default NULL,
|
||||
`nextPermissions` int(11) default NULL,
|
||||
`currentPermissions` int(11) default NULL,
|
||||
`basePermissions` int(11) default NULL,
|
||||
`everyonePermissions` int(11) default NULL,
|
||||
`groupPermissions` int(11) default NULL,
|
||||
PRIMARY KEY (`itemID`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
CREATE TABLE `terrain` (
|
||||
`RegionUUID` varchar(255) default NULL,
|
||||
`Revision` int(11) default NULL,
|
||||
`Heightfield` longblob
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
CREATE TABLE `land` (
|
||||
`UUID` varchar(255) NOT NULL,
|
||||
`RegionUUID` varchar(255) default NULL,
|
||||
`LocalLandID` int(11) default NULL,
|
||||
`Bitmap` longblob,
|
||||
`Name` varchar(255) default NULL,
|
||||
`Description` varchar(255) default NULL,
|
||||
`OwnerUUID` varchar(255) default NULL,
|
||||
`IsGroupOwned` int(11) default NULL,
|
||||
`Area` int(11) default NULL,
|
||||
`AuctionID` int(11) default NULL,
|
||||
`Category` int(11) default NULL,
|
||||
`ClaimDate` int(11) default NULL,
|
||||
`ClaimPrice` int(11) default NULL,
|
||||
`GroupUUID` varchar(255) default NULL,
|
||||
`SalePrice` int(11) default NULL,
|
||||
`LandStatus` int(11) default NULL,
|
||||
`LandFlags` int(11) default NULL,
|
||||
`LandingType` int(11) default NULL,
|
||||
`MediaAutoScale` int(11) default NULL,
|
||||
`MediaTextureUUID` varchar(255) default NULL,
|
||||
`MediaURL` varchar(255) default NULL,
|
||||
`MusicURL` varchar(255) default NULL,
|
||||
`PassHours` float default NULL,
|
||||
`PassPrice` int(11) default NULL,
|
||||
`SnapshotUUID` varchar(255) default NULL,
|
||||
`UserLocationX` float default NULL,
|
||||
`UserLocationY` float default NULL,
|
||||
`UserLocationZ` float default NULL,
|
||||
`UserLookAtX` float default NULL,
|
||||
`UserLookAtY` float default NULL,
|
||||
`UserLookAtZ` float default NULL,
|
||||
`AuthbuyerID` varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000',
|
||||
PRIMARY KEY (`UUID`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `landaccesslist` (
|
||||
`LandUUID` varchar(255) default NULL,
|
||||
`AccessUUID` varchar(255) default NULL,
|
||||
`Flags` int(11) default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
COMMIT;
|
|
@ -1,13 +0,0 @@
|
|||
BEGIN;
|
||||
|
||||
CREATE TABLE `UserAccounts` (
|
||||
`PrincipalID` CHAR(36) NOT NULL,
|
||||
`ScopeID` CHAR(36) NOT NULL,
|
||||
`FirstName` VARCHAR(64) NOT NULL,
|
||||
`LastName` VARCHAR(64) NOT NULL,
|
||||
`Email` VARCHAR(64),
|
||||
`ServiceURLs` TEXT,
|
||||
`Created` INT(11)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
COMMIT;
|
|
@ -1,9 +0,0 @@
|
|||
BEGIN;
|
||||
|
||||
ALTER TABLE assets change id oldid binary(16);
|
||||
ALTER TABLE assets add id varchar(36) not null default '';
|
||||
UPDATE assets set id = concat(substr(hex(oldid),1,8),"-",substr(hex(oldid),9,4),"-",substr(hex(oldid),13,4),"-",substr(hex(oldid),17,4),"-",substr(hex(oldid),21,12));
|
||||
ALTER TABLE assets drop oldid;
|
||||
ALTER TABLE assets add constraint primary key(id);
|
||||
|
||||
COMMIT;
|
|
@ -1,5 +0,0 @@
|
|||
BEGIN;
|
||||
|
||||
INSERT INTO auth (UUID, passwordHash, passwordSalt, webLoginKey) SELECT `UUID` AS UUID, `passwordHash` AS passwordHash, `passwordSalt` AS passwordSalt, `webLoginKey` AS webLoginKey FROM users;
|
||||
|
||||
COMMIT;
|
|
@ -1,5 +0,0 @@
|
|||
BEGIN;
|
||||
|
||||
INSERT INTO Friends (PrincipalID, FriendID, Flags) SELECT ownerID, friendID, friendPerms FROM userfriends;
|
||||
|
||||
COMMIT;
|
|
@ -1,5 +0,0 @@
|
|||
BEGIN;
|
||||
|
||||
INSERT INTO `Friends` SELECT `ownerID`, `friendID`, `friendPerms`, 0 FROM `userfriends`;
|
||||
|
||||
COMMIT;
|
|
@ -1,5 +0,0 @@
|
|||
BEGIN;
|
||||
|
||||
ALTER TABLE regions add column access integer unsigned default 1;
|
||||
|
||||
COMMIT;
|
|
@ -1,31 +0,0 @@
|
|||
BEGIN;
|
||||
|
||||
ALTER TABLE inventoryfolders change folderID folderIDold varchar(36);
|
||||
ALTER TABLE inventoryfolders change agentID agentIDold varchar(36);
|
||||
ALTER TABLE inventoryfolders change parentFolderID parentFolderIDold varchar(36);
|
||||
ALTER TABLE inventoryfolders add folderID char(36) not null default '00000000-0000-0000-0000-000000000000';
|
||||
ALTER TABLE inventoryfolders add agentID char(36) default NULL;
|
||||
ALTER TABLE inventoryfolders add parentFolderID char(36) default NULL;
|
||||
UPDATE inventoryfolders set folderID = folderIDold, agentID = agentIDold, parentFolderID = parentFolderIDold;
|
||||
ALTER TABLE inventoryfolders drop folderIDold;
|
||||
ALTER TABLE inventoryfolders drop agentIDold;
|
||||
ALTER TABLE inventoryfolders drop parentFolderIDold;
|
||||
ALTER TABLE inventoryfolders add constraint primary key(folderID);
|
||||
ALTER TABLE inventoryfolders add index inventoryfolders_agentid(agentID);
|
||||
ALTER TABLE inventoryfolders add index inventoryfolders_parentFolderid(parentFolderID);
|
||||
|
||||
ALTER TABLE inventoryitems change inventoryID inventoryIDold varchar(36);
|
||||
ALTER TABLE inventoryitems change avatarID avatarIDold varchar(36);
|
||||
ALTER TABLE inventoryitems change parentFolderID parentFolderIDold varchar(36);
|
||||
ALTER TABLE inventoryitems add inventoryID char(36) not null default '00000000-0000-0000-0000-000000000000';
|
||||
ALTER TABLE inventoryitems add avatarID char(36) default NULL;
|
||||
ALTER TABLE inventoryitems add parentFolderID char(36) default NULL;
|
||||
UPDATE inventoryitems set inventoryID = inventoryIDold, avatarID = avatarIDold, parentFolderID = parentFolderIDold;
|
||||
ALTER TABLE inventoryitems drop inventoryIDold;
|
||||
ALTER TABLE inventoryitems drop avatarIDold;
|
||||
ALTER TABLE inventoryitems drop parentFolderIDold;
|
||||
ALTER TABLE inventoryitems add constraint primary key(inventoryID);
|
||||
ALTER TABLE inventoryitems add index inventoryitems_avatarid(avatarID);
|
||||
ALTER TABLE inventoryitems add index inventoryitems_parentFolderid(parentFolderID);
|
||||
|
||||
COMMIT;
|
|
@ -1,6 +0,0 @@
|
|||
BEGIN;
|
||||
|
||||
CREATE index prims_regionuuid on prims(RegionUUID);
|
||||
CREATE index primitems_primid on primitems(primID);
|
||||
|
||||
COMMIT;
|
|
@ -1,5 +0,0 @@
|
|||
BEGIN;
|
||||
|
||||
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, CONCAT('AssetServerURI=', userAssetURI, ' InventoryServerURI=', userInventoryURI, ' GatewayURI= HomeURI=') AS ServiceURLs, created as Created FROM users;
|
||||
|
||||
COMMIT;
|
|
@ -1,5 +0,0 @@
|
|||
BEGIN;
|
||||
|
||||
ALTER TABLE users add homeRegionID char(36) NOT NULL default '00000000-0000-0000-0000-000000000000';
|
||||
|
||||
COMMIT;
|
|
@ -1,9 +0,0 @@
|
|||
BEGIN;
|
||||
|
||||
ALTER TABLE assets change id oldid varchar(36);
|
||||
ALTER TABLE assets add id char(36) not null default '00000000-0000-0000-0000-000000000000';
|
||||
UPDATE assets set id = oldid;
|
||||
ALTER TABLE assets drop oldid;
|
||||
ALTER TABLE assets add constraint primary key(id);
|
||||
|
||||
COMMIT;
|
|
@ -1,5 +0,0 @@
|
|||
BEGIN;
|
||||
|
||||
ALTER TABLE `auth` ADD COLUMN `accountType` VARCHAR(32) NOT NULL DEFAULT 'UserAccount';
|
||||
|
||||
COMMIT;
|
|
@ -1,7 +0,0 @@
|
|||
BEGIN;
|
||||
|
||||
ALTER TABLE regions add column ScopeID char(36) not null default '00000000-0000-0000-0000-000000000000';
|
||||
|
||||
create index ScopeID on regions(ScopeID);
|
||||
|
||||
COMMIT;
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue