aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MSSQL
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/MSSQL/Resources/001_AssetStore.sql13
-rw-r--r--OpenSim/Data/MSSQL/Resources/001_EstateStore.sql85
-rw-r--r--OpenSim/Data/MSSQL/Resources/001_GridStore.sql37
-rw-r--r--OpenSim/Data/MSSQL/Resources/001_InventoryStore.sql64
-rw-r--r--OpenSim/Data/MSSQL/Resources/001_RegionStore.sql161
-rw-r--r--OpenSim/Data/MSSQL/Resources/001_UserAccount.sql14
-rw-r--r--OpenSim/Data/MSSQL/Resources/001_UserStore.sql112
-rw-r--r--OpenSim/Data/MSSQL/Resources/002_AssetStore.sql29
-rw-r--r--OpenSim/Data/MSSQL/Resources/002_AuthStore.sql6
-rw-r--r--OpenSim/Data/MSSQL/Resources/002_EstateStore.sql25
-rw-r--r--OpenSim/Data/MSSQL/Resources/002_FriendsStore.sql6
-rw-r--r--OpenSim/Data/MSSQL/Resources/002_GridStore.sql49
-rw-r--r--OpenSim/Data/MSSQL/Resources/002_InventoryStore.sql5
-rw-r--r--OpenSim/Data/MSSQL/Resources/002_RegionStore.sql50
-rw-r--r--OpenSim/Data/MSSQL/Resources/002_UserAccount.sql12
-rw-r--r--OpenSim/Data/MSSQL/Resources/002_UserStore.sql9
-rw-r--r--OpenSim/Data/MSSQL/Resources/003_AssetStore.sql6
-rw-r--r--OpenSim/Data/MSSQL/Resources/003_EstateStore.sql25
-rw-r--r--OpenSim/Data/MSSQL/Resources/003_GridStore.sql22
-rw-r--r--OpenSim/Data/MSSQL/Resources/003_InventoryStore.sql38
-rw-r--r--OpenSim/Data/MSSQL/Resources/003_RegionStore.sql67
-rw-r--r--OpenSim/Data/MSSQL/Resources/003_UserAccount.sql9
-rw-r--r--OpenSim/Data/MSSQL/Resources/003_UserStore.sql15
-rw-r--r--OpenSim/Data/MSSQL/Resources/004_AssetStore.sql31
-rw-r--r--OpenSim/Data/MSSQL/Resources/004_EstateStore.sql22
-rw-r--r--OpenSim/Data/MSSQL/Resources/004_GridStore.sql68
-rw-r--r--OpenSim/Data/MSSQL/Resources/004_InventoryStore.sql52
-rw-r--r--OpenSim/Data/MSSQL/Resources/004_RegionStore.sql40
-rw-r--r--OpenSim/Data/MSSQL/Resources/004_UserAccount.sql7
-rw-r--r--OpenSim/Data/MSSQL/Resources/004_UserStore.sql29
-rw-r--r--OpenSim/Data/MSSQL/Resources/005_AssetStore.sql1
-rw-r--r--OpenSim/Data/MSSQL/Resources/005_EstateStore.sql22
-rw-r--r--OpenSim/Data/MSSQL/Resources/005_GridStore.sql5
-rw-r--r--OpenSim/Data/MSSQL/Resources/005_RegionStore.sql49
-rw-r--r--OpenSim/Data/MSSQL/Resources/005_UserStore.sql5
-rw-r--r--OpenSim/Data/MSSQL/Resources/006_EstateStore.sql22
-rw-r--r--OpenSim/Data/MSSQL/Resources/006_GridStore.sql8
-rw-r--r--OpenSim/Data/MSSQL/Resources/006_RegionStore.sql36
-rw-r--r--OpenSim/Data/MSSQL/Resources/006_UserStore.sql57
-rw-r--r--OpenSim/Data/MSSQL/Resources/007_EstateStore.sql25
-rw-r--r--OpenSim/Data/MSSQL/Resources/007_GridStore.sql9
-rw-r--r--OpenSim/Data/MSSQL/Resources/007_RegionStore.sql10
-rw-r--r--OpenSim/Data/MSSQL/Resources/007_UserStore.sql42
-rw-r--r--OpenSim/Data/MSSQL/Resources/008_EstateStore.sql49
-rw-r--r--OpenSim/Data/MSSQL/Resources/008_RegionStore.sql7
-rw-r--r--OpenSim/Data/MSSQL/Resources/008_UserStore.sql29
-rw-r--r--OpenSim/Data/MSSQL/Resources/009_EstateStore.sql24
-rw-r--r--OpenSim/Data/MSSQL/Resources/009_RegionStore.sql5
-rw-r--r--OpenSim/Data/MSSQL/Resources/009_UserStore.sql53
-rw-r--r--OpenSim/Data/MSSQL/Resources/010_RegionStore.sql7
-rw-r--r--OpenSim/Data/MSSQL/Resources/010_UserStore.sql24
-rw-r--r--OpenSim/Data/MSSQL/Resources/011_RegionStore.sql6
-rw-r--r--OpenSim/Data/MSSQL/Resources/011_UserStore.sql5
-rw-r--r--OpenSim/Data/MSSQL/Resources/012_RegionStore.sql5
-rw-r--r--OpenSim/Data/MSSQL/Resources/013_RegionStore.sql112
-rw-r--r--OpenSim/Data/MSSQL/Resources/014_RegionStore.sql49
-rw-r--r--OpenSim/Data/MSSQL/Resources/015_RegionStore.sql45
-rw-r--r--OpenSim/Data/MSSQL/Resources/016_RegionStore.sql19
-rw-r--r--OpenSim/Data/MSSQL/Resources/017_RegionStore.sql56
-rw-r--r--OpenSim/Data/MSSQL/Resources/018_RegionStore.sql18
-rw-r--r--OpenSim/Data/MSSQL/Resources/019_RegionStore.sql19
-rw-r--r--OpenSim/Data/MSSQL/Resources/020_RegionStore.sql58
-rw-r--r--OpenSim/Data/MSSQL/Resources/021_RegionStore.sql5
-rw-r--r--OpenSim/Data/MSSQL/Resources/022_RegionStore.sql7
-rw-r--r--OpenSim/Data/MSSQL/Resources/023_RegionStore.sql7
-rw-r--r--OpenSim/Data/MSSQL/Resources/AssetStore.migrations100
-rw-r--r--OpenSim/Data/MSSQL/Resources/AuthStore.migrations (renamed from OpenSim/Data/MSSQL/Resources/001_AuthStore.sql)11
-rw-r--r--OpenSim/Data/MSSQL/Resources/Avatar.migrations (renamed from OpenSim/Data/MSSQL/Resources/001_Avatar.sql)2
-rw-r--r--OpenSim/Data/MSSQL/Resources/EstateStore.migrations334
-rw-r--r--OpenSim/Data/MSSQL/Resources/FriendsStore.migrations (renamed from OpenSim/Data/MSSQL/Resources/001_FriendsStore.sql)9
-rw-r--r--OpenSim/Data/MSSQL/Resources/GridStore.migrations225
-rw-r--r--OpenSim/Data/MSSQL/Resources/InventoryStore.migrations174
-rw-r--r--OpenSim/Data/MSSQL/Resources/LogStore.migrations (renamed from OpenSim/Data/MSSQL/Resources/001_LogStore.sql)2
-rw-r--r--OpenSim/Data/MSSQL/Resources/Presence.migrations (renamed from OpenSim/Data/MSSQL/Resources/001_Presence.sql)11
-rw-r--r--OpenSim/Data/MSSQL/Resources/RegionStore.migrations929
-rw-r--r--OpenSim/Data/MSSQL/Resources/UserAccount.migrations55
-rw-r--r--OpenSim/Data/MSSQL/Resources/UserStore.migrations421
77 files changed, 2273 insertions, 2008 deletions
diff --git a/OpenSim/Data/MSSQL/Resources/001_AssetStore.sql b/OpenSim/Data/MSSQL/Resources/001_AssetStore.sql
deleted file mode 100644
index 2b293c7..0000000
--- a/OpenSim/Data/MSSQL/Resources/001_AssetStore.sql
+++ /dev/null
@@ -1,13 +0,0 @@
1CREATE TABLE [assets] (
2 [id] [varchar](36) NOT NULL,
3 [name] [varchar](64) NOT NULL,
4 [description] [varchar](64) NOT NULL,
5 [assetType] [tinyint] NOT NULL,
6 [local] [tinyint] NOT NULL,
7 [temporary] [tinyint] NOT NULL,
8 [data] [image] NOT NULL,
9PRIMARY KEY CLUSTERED
10(
11 [id] ASC
12)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
13) ON [PRIMARY]
diff --git a/OpenSim/Data/MSSQL/Resources/001_EstateStore.sql b/OpenSim/Data/MSSQL/Resources/001_EstateStore.sql
deleted file mode 100644
index 9bb2f75..0000000
--- a/OpenSim/Data/MSSQL/Resources/001_EstateStore.sql
+++ /dev/null
@@ -1,85 +0,0 @@
1BEGIN TRANSACTION
2
3CREATE TABLE [dbo].[estate_managers](
4 [EstateID] [int] NOT NULL,
5 [uuid] [varchar](36) NOT NULL,
6 CONSTRAINT [PK_estate_managers] PRIMARY KEY CLUSTERED
7(
8 [EstateID] ASC
9)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
10) ON [PRIMARY];
11
12CREATE TABLE [dbo].[estate_groups](
13 [EstateID] [int] NOT NULL,
14 [uuid] [varchar](36) NOT NULL,
15 CONSTRAINT [PK_estate_groups] PRIMARY KEY CLUSTERED
16(
17 [EstateID] ASC
18)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
19) ON [PRIMARY];
20
21
22CREATE TABLE [dbo].[estate_users](
23 [EstateID] [int] NOT NULL,
24 [uuid] [varchar](36) NOT NULL,
25 CONSTRAINT [PK_estate_users] PRIMARY KEY CLUSTERED
26(
27 [EstateID] ASC
28)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
29) ON [PRIMARY];
30
31
32CREATE TABLE [dbo].[estateban](
33 [EstateID] [int] NOT NULL,
34 [bannedUUID] [varchar](36) NOT NULL,
35 [bannedIp] [varchar](16) NOT NULL,
36 [bannedIpHostMask] [varchar](16) NOT NULL,
37 [bannedNameMask] [varchar](64) NULL DEFAULT (NULL),
38 CONSTRAINT [PK_estateban] PRIMARY KEY CLUSTERED
39(
40 [EstateID] ASC
41)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
42) ON [PRIMARY];
43
44CREATE TABLE [dbo].[estate_settings](
45 [EstateID] [int] IDENTITY(1,100) NOT NULL,
46 [EstateName] [varchar](64) NULL DEFAULT (NULL),
47 [AbuseEmailToEstateOwner] [bit] NOT NULL,
48 [DenyAnonymous] [bit] NOT NULL,
49 [ResetHomeOnTeleport] [bit] NOT NULL,
50 [FixedSun] [bit] NOT NULL,
51 [DenyTransacted] [bit] NOT NULL,
52 [BlockDwell] [bit] NOT NULL,
53 [DenyIdentified] [bit] NOT NULL,
54 [AllowVoice] [bit] NOT NULL,
55 [UseGlobalTime] [bit] NOT NULL,
56 [PricePerMeter] [int] NOT NULL,
57 [TaxFree] [bit] NOT NULL,
58 [AllowDirectTeleport] [bit] NOT NULL,
59 [RedirectGridX] [int] NOT NULL,
60 [RedirectGridY] [int] NOT NULL,
61 [ParentEstateID] [int] NOT NULL,
62 [SunPosition] [float] NOT NULL,
63 [EstateSkipScripts] [bit] NOT NULL,
64 [BillableFactor] [float] NOT NULL,
65 [PublicAccess] [bit] NOT NULL,
66 [AbuseEmail] [varchar](255) NOT NULL,
67 [EstateOwner] [varchar](36) NOT NULL,
68 [DenyMinors] [bit] NOT NULL,
69 CONSTRAINT [PK_estate_settings] PRIMARY KEY CLUSTERED
70(
71 [EstateID] ASC
72)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
73) ON [PRIMARY];
74
75
76CREATE TABLE [dbo].[estate_map](
77 [RegionID] [varchar](36) NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
78 [EstateID] [int] NOT NULL,
79 CONSTRAINT [PK_estate_map] PRIMARY KEY CLUSTERED
80(
81 [RegionID] ASC
82)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
83) ON [PRIMARY];
84
85COMMIT \ No newline at end of file
diff --git a/OpenSim/Data/MSSQL/Resources/001_GridStore.sql b/OpenSim/Data/MSSQL/Resources/001_GridStore.sql
deleted file mode 100644
index ff15f54..0000000
--- a/OpenSim/Data/MSSQL/Resources/001_GridStore.sql
+++ /dev/null
@@ -1,37 +0,0 @@
1BEGIN TRANSACTION
2
3CREATE TABLE [dbo].[regions](
4 [regionHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
5 [regionName] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
6 [uuid] [varchar](255) COLLATE Latin1_General_CI_AS NOT NULL,
7 [regionRecvKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
8 [regionSecret] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
9 [regionSendKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
10 [regionDataURI] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
11 [serverIP] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
12 [serverPort] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
13 [serverURI] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
14 [locX] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
15 [locY] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
16 [locZ] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
17 [eastOverrideHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
18 [westOverrideHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
19 [southOverrideHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
20 [northOverrideHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
21 [regionAssetURI] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
22 [regionAssetRecvKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
23 [regionAssetSendKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
24 [regionUserURI] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
25 [regionUserRecvKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
26 [regionUserSendKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
27 [regionMapTexture] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
28 [serverHttpPort] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
29 [serverRemotingPort] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
30 [owner_uuid] [varchar](36) COLLATE Latin1_General_CI_AS NULL,
31PRIMARY KEY CLUSTERED
32(
33 [uuid] ASC
34)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
35) ON [PRIMARY]
36
37COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/001_InventoryStore.sql b/OpenSim/Data/MSSQL/Resources/001_InventoryStore.sql
deleted file mode 100644
index 836d2d1..0000000
--- a/OpenSim/Data/MSSQL/Resources/001_InventoryStore.sql
+++ /dev/null
@@ -1,64 +0,0 @@
1BEGIN TRANSACTION
2
3CREATE TABLE [inventoryfolders] (
4 [folderID] [varchar](36) NOT NULL default '',
5 [agentID] [varchar](36) default NULL,
6 [parentFolderID] [varchar](36) default NULL,
7 [folderName] [varchar](64) default NULL,
8 [type] [smallint] NOT NULL default 0,
9 [version] [int] NOT NULL default 0,
10 PRIMARY KEY CLUSTERED
11(
12 [folderID] ASC
13)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
14) ON [PRIMARY]
15
16CREATE NONCLUSTERED INDEX [owner] ON [inventoryfolders]
17(
18 [agentID] ASC
19)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]
20
21CREATE NONCLUSTERED INDEX [parent] ON [inventoryfolders]
22(
23 [parentFolderID] ASC
24)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]
25
26
27CREATE TABLE [inventoryitems] (
28 [inventoryID] [varchar](36) NOT NULL default '',
29 [assetID] [varchar](36) default NULL,
30 [assetType] [int] default NULL,
31 [parentFolderID] [varchar](36) default NULL,
32 [avatarID] [varchar](36) default NULL,
33 [inventoryName] [varchar](64) default NULL,
34 [inventoryDescription] [varchar](128) default NULL,
35 [inventoryNextPermissions] [int] default NULL,
36 [inventoryCurrentPermissions] [int] default NULL,
37 [invType] [int] default NULL,
38 [creatorID] [varchar](36) default NULL,
39 [inventoryBasePermissions] [int] NOT NULL default 0,
40 [inventoryEveryOnePermissions] [int] NOT NULL default 0,
41 [salePrice] [int] default NULL,
42 [saleType] [tinyint] default NULL,
43 [creationDate] [int] default NULL,
44 [groupID] [varchar](36) default NULL,
45 [groupOwned] [bit] default NULL,
46 [flags] [int] default NULL,
47 PRIMARY KEY CLUSTERED
48(
49 [inventoryID] ASC
50)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
51) ON [PRIMARY]
52
53
54CREATE NONCLUSTERED INDEX [owner] ON [inventoryitems]
55(
56 [avatarID] ASC
57)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]
58
59CREATE NONCLUSTERED INDEX [folder] ON [inventoryitems]
60(
61 [parentFolderID] ASC
62)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]
63
64COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/001_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/001_RegionStore.sql
deleted file mode 100644
index fe7c58f..0000000
--- a/OpenSim/Data/MSSQL/Resources/001_RegionStore.sql
+++ /dev/null
@@ -1,161 +0,0 @@
1CREATE TABLE [dbo].[prims](
2 [UUID] [varchar](255) NOT NULL,
3 [RegionUUID] [varchar](255) NULL,
4 [ParentID] [int] NULL,
5 [CreationDate] [int] NULL,
6 [Name] [varchar](255) NULL,
7 [SceneGroupID] [varchar](255) NULL,
8 [Text] [varchar](255) NULL,
9 [Description] [varchar](255) NULL,
10 [SitName] [varchar](255) NULL,
11 [TouchName] [varchar](255) NULL,
12 [ObjectFlags] [int] NULL,
13 [CreatorID] [varchar](255) NULL,
14 [OwnerID] [varchar](255) NULL,
15 [GroupID] [varchar](255) NULL,
16 [LastOwnerID] [varchar](255) NULL,
17 [OwnerMask] [int] NULL,
18 [NextOwnerMask] [int] NULL,
19 [GroupMask] [int] NULL,
20 [EveryoneMask] [int] NULL,
21 [BaseMask] [int] NULL,
22 [PositionX] [float] NULL,
23 [PositionY] [float] NULL,
24 [PositionZ] [float] NULL,
25 [GroupPositionX] [float] NULL,
26 [GroupPositionY] [float] NULL,
27 [GroupPositionZ] [float] NULL,
28 [VelocityX] [float] NULL,
29 [VelocityY] [float] NULL,
30 [VelocityZ] [float] NULL,
31 [AngularVelocityX] [float] NULL,
32 [AngularVelocityY] [float] NULL,
33 [AngularVelocityZ] [float] NULL,
34 [AccelerationX] [float] NULL,
35 [AccelerationY] [float] NULL,
36 [AccelerationZ] [float] NULL,
37 [RotationX] [float] NULL,
38 [RotationY] [float] NULL,
39 [RotationZ] [float] NULL,
40 [RotationW] [float] NULL,
41 [SitTargetOffsetX] [float] NULL,
42 [SitTargetOffsetY] [float] NULL,
43 [SitTargetOffsetZ] [float] NULL,
44 [SitTargetOrientW] [float] NULL,
45 [SitTargetOrientX] [float] NULL,
46 [SitTargetOrientY] [float] NULL,
47 [SitTargetOrientZ] [float] NULL,
48PRIMARY KEY CLUSTERED
49(
50 [UUID] ASC
51)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
52) ON [PRIMARY]
53
54CREATE TABLE [dbo].[primshapes](
55 [UUID] [varchar](255) NOT NULL,
56 [Shape] [int] NULL,
57 [ScaleX] [float] NULL,
58 [ScaleY] [float] NULL,
59 [ScaleZ] [float] NULL,
60 [PCode] [int] NULL,
61 [PathBegin] [int] NULL,
62 [PathEnd] [int] NULL,
63 [PathScaleX] [int] NULL,
64 [PathScaleY] [int] NULL,
65 [PathShearX] [int] NULL,
66 [PathShearY] [int] NULL,
67 [PathSkew] [int] NULL,
68 [PathCurve] [int] NULL,
69 [PathRadiusOffset] [int] NULL,
70 [PathRevolutions] [int] NULL,
71 [PathTaperX] [int] NULL,
72 [PathTaperY] [int] NULL,
73 [PathTwist] [int] NULL,
74 [PathTwistBegin] [int] NULL,
75 [ProfileBegin] [int] NULL,
76 [ProfileEnd] [int] NULL,
77 [ProfileCurve] [int] NULL,
78 [ProfileHollow] [int] NULL,
79 [State] [int] NULL,
80 [Texture] [image] NULL,
81 [ExtraParams] [image] NULL,
82PRIMARY KEY CLUSTERED
83(
84 [UUID] ASC
85)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
86) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
87
88CREATE TABLE [dbo].[primitems](
89 [itemID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
90 [primID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
91 [assetID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
92 [parentFolderID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
93 [invType] [int] NULL,
94 [assetType] [int] NULL,
95 [name] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
96 [description] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
97 [creationDate] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
98 [creatorID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
99 [ownerID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
100 [lastOwnerID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
101 [groupID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
102 [nextPermissions] [int] NULL,
103 [currentPermissions] [int] NULL,
104 [basePermissions] [int] NULL,
105 [everyonePermissions] [int] NULL,
106 [groupPermissions] [int] NULL,
107PRIMARY KEY CLUSTERED
108(
109 [itemID] ASC
110)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
111) ON [PRIMARY]
112
113CREATE TABLE [dbo].[terrain](
114 [RegionUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
115 [Revision] [int] NULL,
116 [Heightfield] [image] NULL
117) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
118
119CREATE TABLE [dbo].[land](
120 [UUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
121 [RegionUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
122 [LocalLandID] [int] NULL,
123 [Bitmap] [image] NULL,
124 [Name] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
125 [Description] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
126 [OwnerUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
127 [IsGroupOwned] [int] NULL,
128 [Area] [int] NULL,
129 [AuctionID] [int] NULL,
130 [Category] [int] NULL,
131 [ClaimDate] [int] NULL,
132 [ClaimPrice] [int] NULL,
133 [GroupUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
134 [SalePrice] [int] NULL,
135 [LandStatus] [int] NULL,
136 [LandFlags] [int] NULL,
137 [LandingType] [int] NULL,
138 [MediaAutoScale] [int] NULL,
139 [MediaTextureUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
140 [MediaURL] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
141 [MusicURL] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
142 [PassHours] [float] NULL,
143 [PassPrice] [int] NULL,
144 [SnapshotUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
145 [UserLocationX] [float] NULL,
146 [UserLocationY] [float] NULL,
147 [UserLocationZ] [float] NULL,
148 [UserLookAtX] [float] NULL,
149 [UserLookAtY] [float] NULL,
150 [UserLookAtZ] [float] NULL,
151PRIMARY KEY CLUSTERED
152(
153 [UUID] ASC
154)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
155) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
156
157CREATE TABLE [dbo].[landaccesslist](
158 [LandUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
159 [AccessUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
160 [Flags] [int] NULL
161) ON [PRIMARY] \ No newline at end of file
diff --git a/OpenSim/Data/MSSQL/Resources/001_UserAccount.sql b/OpenSim/Data/MSSQL/Resources/001_UserAccount.sql
deleted file mode 100644
index 3dbf8a4..0000000
--- a/OpenSim/Data/MSSQL/Resources/001_UserAccount.sql
+++ /dev/null
@@ -1,14 +0,0 @@
1CREATE TABLE [UserAccounts] (
2 [PrincipalID] uniqueidentifier NOT NULL,
3 [ScopeID] uniqueidentifier NOT NULL,
4 [FirstName] [varchar](64) NOT NULL,
5 [LastName] [varchar](64) NOT NULL,
6 [Email] [varchar](64) NULL,
7 [ServiceURLs] [text] NULL,
8 [Created] [int] default NULL,
9
10 PRIMARY KEY CLUSTERED
11(
12 [PrincipalID] ASC
13)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
14) ON [PRIMARY]
diff --git a/OpenSim/Data/MSSQL/Resources/001_UserStore.sql b/OpenSim/Data/MSSQL/Resources/001_UserStore.sql
deleted file mode 100644
index 160c457..0000000
--- a/OpenSim/Data/MSSQL/Resources/001_UserStore.sql
+++ /dev/null
@@ -1,112 +0,0 @@
1CREATE TABLE [users] (
2 [UUID] [varchar](36) NOT NULL default '',
3 [username] [varchar](32) NOT NULL,
4 [lastname] [varchar](32) NOT NULL,
5 [passwordHash] [varchar](32) NOT NULL,
6 [passwordSalt] [varchar](32) NOT NULL,
7 [homeRegion] [bigint] default NULL,
8 [homeLocationX] [float] default NULL,
9 [homeLocationY] [float] default NULL,
10 [homeLocationZ] [float] default NULL,
11 [homeLookAtX] [float] default NULL,
12 [homeLookAtY] [float] default NULL,
13 [homeLookAtZ] [float] default NULL,
14 [created] [int] NOT NULL,
15 [lastLogin] [int] NOT NULL,
16 [userInventoryURI] [varchar](255) default NULL,
17 [userAssetURI] [varchar](255) default NULL,
18 [profileCanDoMask] [int] default NULL,
19 [profileWantDoMask] [int] default NULL,
20 [profileAboutText] [ntext],
21 [profileFirstText] [ntext],
22 [profileImage] [varchar](36) default NULL,
23 [profileFirstImage] [varchar](36) default NULL,
24 [webLoginKey] [varchar](36) default NULL,
25 PRIMARY KEY CLUSTERED
26(
27 [UUID] ASC
28)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
29) ON [PRIMARY]
30
31
32CREATE NONCLUSTERED INDEX [usernames] ON [users]
33(
34 [username] ASC,
35 [lastname] ASC
36)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]
37
38
39CREATE TABLE [agents] (
40 [UUID] [varchar](36) NOT NULL,
41 [sessionID] [varchar](36) NOT NULL,
42 [secureSessionID] [varchar](36) NOT NULL,
43 [agentIP] [varchar](16) NOT NULL,
44 [agentPort] [int] NOT NULL,
45 [agentOnline] [tinyint] NOT NULL,
46 [loginTime] [int] NOT NULL,
47 [logoutTime] [int] NOT NULL,
48 [currentRegion] [varchar](36) NOT NULL,
49 [currentHandle] [bigint] NOT NULL,
50 [currentPos] [varchar](64) NOT NULL,
51 PRIMARY KEY CLUSTERED
52(
53 [UUID] ASC
54)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
55) ON [PRIMARY]
56
57
58CREATE NONCLUSTERED INDEX [session] ON [agents]
59(
60 [sessionID] ASC
61)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]
62
63CREATE NONCLUSTERED INDEX [ssession] ON [agents]
64(
65 [secureSessionID] ASC
66)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]
67
68
69CREATE TABLE [dbo].[userfriends](
70 [ownerID] [varchar](50) COLLATE Latin1_General_CI_AS NOT NULL,
71 [friendID] [varchar](50) COLLATE Latin1_General_CI_AS NOT NULL,
72 [friendPerms] [nvarchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
73 [datetimestamp] [nvarchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
74) ON [PRIMARY]
75
76CREATE TABLE [avatarappearance] (
77 [Owner] [varchar](36) NOT NULL,
78 [Serial] int NOT NULL,
79 [Visual_Params] [image] NOT NULL,
80 [Texture] [image] NOT NULL,
81 [Avatar_Height] float NOT NULL,
82 [Body_Item] [varchar](36) NOT NULL,
83 [Body_Asset] [varchar](36) NOT NULL,
84 [Skin_Item] [varchar](36) NOT NULL,
85 [Skin_Asset] [varchar](36) NOT NULL,
86 [Hair_Item] [varchar](36) NOT NULL,
87 [Hair_Asset] [varchar](36) NOT NULL,
88 [Eyes_Item] [varchar](36) NOT NULL,
89 [Eyes_Asset] [varchar](36) NOT NULL,
90 [Shirt_Item] [varchar](36) NOT NULL,
91 [Shirt_Asset] [varchar](36) NOT NULL,
92 [Pants_Item] [varchar](36) NOT NULL,
93 [Pants_Asset] [varchar](36) NOT NULL,
94 [Shoes_Item] [varchar](36) NOT NULL,
95 [Shoes_Asset] [varchar](36) NOT NULL,
96 [Socks_Item] [varchar](36) NOT NULL,
97 [Socks_Asset] [varchar](36) NOT NULL,
98 [Jacket_Item] [varchar](36) NOT NULL,
99 [Jacket_Asset] [varchar](36) NOT NULL,
100 [Gloves_Item] [varchar](36) NOT NULL,
101 [Gloves_Asset] [varchar](36) NOT NULL,
102 [Undershirt_Item] [varchar](36) NOT NULL,
103 [Undershirt_Asset] [varchar](36) NOT NULL,
104 [Underpants_Item] [varchar](36) NOT NULL,
105 [Underpants_Asset] [varchar](36) NOT NULL,
106 [Skirt_Item] [varchar](36) NOT NULL,
107 [Skirt_Asset] [varchar](36) NOT NULL,
108
109 PRIMARY KEY CLUSTERED (
110 [Owner]
111 ) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
112) ON [PRIMARY]
diff --git a/OpenSim/Data/MSSQL/Resources/002_AssetStore.sql b/OpenSim/Data/MSSQL/Resources/002_AssetStore.sql
deleted file mode 100644
index 3e24543..0000000
--- a/OpenSim/Data/MSSQL/Resources/002_AssetStore.sql
+++ /dev/null
@@ -1,29 +0,0 @@
1BEGIN TRANSACTION
2
3CREATE TABLE Tmp_assets
4 (
5 id varchar(36) NOT NULL,
6 name varchar(64) NOT NULL,
7 description varchar(64) NOT NULL,
8 assetType tinyint NOT NULL,
9 local bit NOT NULL,
10 temporary bit NOT NULL,
11 data image NOT NULL
12 ) ON [PRIMARY]
13 TEXTIMAGE_ON [PRIMARY]
14
15IF EXISTS(SELECT * FROM assets)
16 EXEC('INSERT INTO Tmp_assets (id, name, description, assetType, local, temporary, data)
17 SELECT id, name, description, assetType, CONVERT(bit, local), CONVERT(bit, temporary), data FROM assets WITH (HOLDLOCK TABLOCKX)')
18
19DROP TABLE assets
20
21EXECUTE sp_rename N'Tmp_assets', N'assets', 'OBJECT'
22
23ALTER TABLE dbo.assets ADD CONSTRAINT
24 PK__assets__id PRIMARY KEY CLUSTERED
25 (
26 id
27 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
28
29COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/002_AuthStore.sql b/OpenSim/Data/MSSQL/Resources/002_AuthStore.sql
deleted file mode 100644
index daed955..0000000
--- a/OpenSim/Data/MSSQL/Resources/002_AuthStore.sql
+++ /dev/null
@@ -1,6 +0,0 @@
1BEGIN TRANSACTION
2
3INSERT 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;
4
5
6COMMIT \ No newline at end of file
diff --git a/OpenSim/Data/MSSQL/Resources/002_EstateStore.sql b/OpenSim/Data/MSSQL/Resources/002_EstateStore.sql
deleted file mode 100644
index 18c12c0..0000000
--- a/OpenSim/Data/MSSQL/Resources/002_EstateStore.sql
+++ /dev/null
@@ -1,25 +0,0 @@
1BEGIN TRANSACTION
2
3ALTER TABLE dbo.estate_managers DROP CONSTRAINT PK_estate_managers
4
5CREATE NONCLUSTERED INDEX IX_estate_managers ON dbo.estate_managers
6 (
7 EstateID
8 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
9
10ALTER TABLE dbo.estate_groups DROP CONSTRAINT PK_estate_groups
11
12CREATE NONCLUSTERED INDEX IX_estate_groups ON dbo.estate_groups
13 (
14 EstateID
15 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
16
17
18ALTER TABLE dbo.estate_users DROP CONSTRAINT PK_estate_users
19
20CREATE NONCLUSTERED INDEX IX_estate_users ON dbo.estate_users
21 (
22 EstateID
23 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
24
25COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/002_FriendsStore.sql b/OpenSim/Data/MSSQL/Resources/002_FriendsStore.sql
deleted file mode 100644
index e67d20e..0000000
--- a/OpenSim/Data/MSSQL/Resources/002_FriendsStore.sql
+++ /dev/null
@@ -1,6 +0,0 @@
1BEGIN TRANSACTION
2
3INSERT INTO Friends (PrincipalID, Friend, Flags, Offered) SELECT [ownerID], [friendID], [friendPerms], 0 FROM userfriends;
4
5
6COMMIT \ No newline at end of file
diff --git a/OpenSim/Data/MSSQL/Resources/002_GridStore.sql b/OpenSim/Data/MSSQL/Resources/002_GridStore.sql
deleted file mode 100644
index f5901cb..0000000
--- a/OpenSim/Data/MSSQL/Resources/002_GridStore.sql
+++ /dev/null
@@ -1,49 +0,0 @@
1BEGIN TRANSACTION
2
3CREATE TABLE Tmp_regions
4 (
5 uuid varchar(36) COLLATE Latin1_General_CI_AS NOT NULL,
6 regionHandle bigint NULL,
7 regionName varchar(20) NULL,
8 regionRecvKey varchar(128) NULL,
9 regionSendKey varchar(128) NULL,
10 regionSecret varchar(128) NULL,
11 regionDataURI varchar(128) NULL,
12 serverIP varchar(64) NULL,
13 serverPort int NULL,
14 serverURI varchar(255) NULL,
15 locX int NULL,
16 locY int NULL,
17 locZ int NULL,
18 eastOverrideHandle bigint NULL,
19 westOverrideHandle bigint NULL,
20 southOverrideHandle bigint NULL,
21 northOverrideHandle bigint NULL,
22 regionAssetURI varchar(255) NULL,
23 regionAssetRecvKey varchar(128) NULL,
24 regionAssetSendKey varchar(128) NULL,
25 regionUserURI varchar(255) NULL,
26 regionUserRecvKey varchar(128) NULL,
27 regionUserSendKey varchar(128) NULL,
28 regionMapTexture varchar(36) NULL,
29 serverHttpPort int NULL,
30 serverRemotingPort int NULL,
31 owner_uuid varchar(36) NULL,
32 originUUID varchar(36) NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000')
33 ) ON [PRIMARY]
34
35IF EXISTS(SELECT * FROM regions)
36 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)
37 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')
38
39DROP TABLE regions
40
41EXECUTE sp_rename N'Tmp_regions', N'regions', 'OBJECT'
42
43ALTER TABLE regions ADD CONSTRAINT
44 PK__regions__uuid PRIMARY KEY CLUSTERED
45 (
46 uuid
47 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
48
49COMMIT \ No newline at end of file
diff --git a/OpenSim/Data/MSSQL/Resources/002_InventoryStore.sql b/OpenSim/Data/MSSQL/Resources/002_InventoryStore.sql
deleted file mode 100644
index bcc26b8..0000000
--- a/OpenSim/Data/MSSQL/Resources/002_InventoryStore.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN TRANSACTION
2
3ALTER TABLE inventoryitems ADD inventoryGroupPermissions INTEGER NOT NULL default 0
4
5COMMIT \ No newline at end of file
diff --git a/OpenSim/Data/MSSQL/Resources/002_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/002_RegionStore.sql
deleted file mode 100644
index 1801035..0000000
--- a/OpenSim/Data/MSSQL/Resources/002_RegionStore.sql
+++ /dev/null
@@ -1,50 +0,0 @@
1BEGIN TRANSACTION
2
3CREATE TABLE regionban (
4 [regionUUID] VARCHAR(36) NOT NULL,
5 [bannedUUID] VARCHAR(36) NOT NULL,
6 [bannedIp] VARCHAR(16) NOT NULL,
7 [bannedIpHostMask] VARCHAR(16) NOT NULL)
8
9create table [dbo].[regionsettings] (
10 [regionUUID] [varchar](36) not null,
11 [block_terraform] [bit] not null,
12 [block_fly] [bit] not null,
13 [allow_damage] [bit] not null,
14 [restrict_pushing] [bit] not null,
15 [allow_land_resell] [bit] not null,
16 [allow_land_join_divide] [bit] not null,
17 [block_show_in_search] [bit] not null,
18 [agent_limit] [int] not null,
19 [object_bonus] [float] not null,
20 [maturity] [int] not null,
21 [disable_scripts] [bit] not null,
22 [disable_collisions] [bit] not null,
23 [disable_physics] [bit] not null,
24 [terrain_texture_1] [varchar](36) not null,
25 [terrain_texture_2] [varchar](36) not null,
26 [terrain_texture_3] [varchar](36) not null,
27 [terrain_texture_4] [varchar](36) not null,
28 [elevation_1_nw] [float] not null,
29 [elevation_2_nw] [float] not null,
30 [elevation_1_ne] [float] not null,
31 [elevation_2_ne] [float] not null,
32 [elevation_1_se] [float] not null,
33 [elevation_2_se] [float] not null,
34 [elevation_1_sw] [float] not null,
35 [elevation_2_sw] [float] not null,
36 [water_height] [float] not null,
37 [terrain_raise_limit] [float] not null,
38 [terrain_lower_limit] [float] not null,
39 [use_estate_sun] [bit] not null,
40 [fixed_sun] [bit] not null,
41 [sun_position] [float] not null,
42 [covenant] [varchar](36) default NULL,
43 [Sandbox] [bit] NOT NULL,
44PRIMARY KEY CLUSTERED
45(
46 [regionUUID] ASC
47)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
48) ON [PRIMARY]
49
50COMMIT \ No newline at end of file
diff --git a/OpenSim/Data/MSSQL/Resources/002_UserAccount.sql b/OpenSim/Data/MSSQL/Resources/002_UserAccount.sql
deleted file mode 100644
index 89d1f34..0000000
--- a/OpenSim/Data/MSSQL/Resources/002_UserAccount.sql
+++ /dev/null
@@ -1,12 +0,0 @@
1BEGIN TRANSACTION
2
3INSERT INTO UserAccounts (PrincipalID, ScopeID, FirstName, LastName, Email, ServiceURLs, Created) SELECT [UUID] AS PrincipalID, '00000000-0000-0000-0000-000000000000' AS ScopeID,
4username AS FirstName,
5lastname AS LastName,
6email as Email, (
7'AssetServerURI=' +
8userAssetURI + ' InventoryServerURI=' + userInventoryURI + ' GatewayURI= HomeURI=') AS ServiceURLs,
9created as Created FROM users;
10
11
12COMMIT \ No newline at end of file
diff --git a/OpenSim/Data/MSSQL/Resources/002_UserStore.sql b/OpenSim/Data/MSSQL/Resources/002_UserStore.sql
deleted file mode 100644
index 402eddf..0000000
--- a/OpenSim/Data/MSSQL/Resources/002_UserStore.sql
+++ /dev/null
@@ -1,9 +0,0 @@
1BEGIN TRANSACTION
2
3ALTER TABLE users ADD homeRegionID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000';
4ALTER TABLE users ADD userFlags int NOT NULL default 0;
5ALTER TABLE users ADD godLevel int NOT NULL default 0;
6ALTER TABLE users ADD customType varchar(32) not null default '';
7ALTER TABLE users ADD partner varchar(36) not null default '00000000-0000-0000-0000-000000000000';
8
9COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/003_AssetStore.sql b/OpenSim/Data/MSSQL/Resources/003_AssetStore.sql
deleted file mode 100644
index 1434330..0000000
--- a/OpenSim/Data/MSSQL/Resources/003_AssetStore.sql
+++ /dev/null
@@ -1,6 +0,0 @@
1BEGIN TRANSACTION
2
3ALTER TABLE assets add create_time integer default 0
4ALTER TABLE assets add access_time integer default 0
5
6COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/003_EstateStore.sql b/OpenSim/Data/MSSQL/Resources/003_EstateStore.sql
deleted file mode 100644
index 120966a..0000000
--- a/OpenSim/Data/MSSQL/Resources/003_EstateStore.sql
+++ /dev/null
@@ -1,25 +0,0 @@
1BEGIN TRANSACTION
2
3CREATE TABLE dbo.Tmp_estateban
4 (
5 EstateID int NOT NULL,
6 bannedUUID varchar(36) NOT NULL,
7 bannedIp varchar(16) NULL,
8 bannedIpHostMask varchar(16) NULL,
9 bannedNameMask varchar(64) NULL
10 ) ON [PRIMARY]
11
12IF EXISTS(SELECT * FROM dbo.estateban)
13 EXEC('INSERT INTO dbo.Tmp_estateban (EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask)
14 SELECT EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask FROM dbo.estateban')
15
16DROP TABLE dbo.estateban
17
18EXECUTE sp_rename N'dbo.Tmp_estateban', N'estateban', 'OBJECT'
19
20CREATE NONCLUSTERED INDEX IX_estateban ON dbo.estateban
21 (
22 EstateID
23 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
24
25COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/003_GridStore.sql b/OpenSim/Data/MSSQL/Resources/003_GridStore.sql
deleted file mode 100644
index e080947..0000000
--- a/OpenSim/Data/MSSQL/Resources/003_GridStore.sql
+++ /dev/null
@@ -1,22 +0,0 @@
1BEGIN TRANSACTION
2
3CREATE NONCLUSTERED INDEX IX_regions_name ON dbo.regions
4 (
5 regionName
6 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
7
8CREATE NONCLUSTERED INDEX IX_regions_handle ON dbo.regions
9 (
10 regionHandle
11 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
12
13
14CREATE NONCLUSTERED INDEX IX_regions_override ON dbo.regions
15 (
16 eastOverrideHandle,
17 westOverrideHandle,
18 southOverrideHandle,
19 northOverrideHandle
20 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
21
22COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/003_InventoryStore.sql b/OpenSim/Data/MSSQL/Resources/003_InventoryStore.sql
deleted file mode 100644
index 2f623ec..0000000
--- a/OpenSim/Data/MSSQL/Resources/003_InventoryStore.sql
+++ /dev/null
@@ -1,38 +0,0 @@
1/* To prevent any potential data loss issues, you should review this script in detail before running it outside the context of the database designer.*/
2BEGIN TRANSACTION
3
4CREATE TABLE dbo.Tmp_inventoryfolders
5 (
6 folderID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
7 agentID uniqueidentifier NULL DEFAULT (NULL),
8 parentFolderID uniqueidentifier NULL DEFAULT (NULL),
9 folderName varchar(64) NULL DEFAULT (NULL),
10 type smallint NOT NULL DEFAULT ((0)),
11 version int NOT NULL DEFAULT ((0))
12 ) ON [PRIMARY]
13
14IF EXISTS(SELECT * FROM dbo.inventoryfolders)
15 EXEC('INSERT INTO dbo.Tmp_inventoryfolders (folderID, agentID, parentFolderID, folderName, type, version)
16 SELECT CONVERT(uniqueidentifier, folderID), CONVERT(uniqueidentifier, agentID), CONVERT(uniqueidentifier, parentFolderID), folderName, type, version FROM dbo.inventoryfolders WITH (HOLDLOCK TABLOCKX)')
17
18DROP TABLE dbo.inventoryfolders
19
20EXECUTE sp_rename N'dbo.Tmp_inventoryfolders', N'inventoryfolders', 'OBJECT'
21
22ALTER TABLE dbo.inventoryfolders ADD CONSTRAINT
23 PK__inventor__C2FABFB3173876EA PRIMARY KEY CLUSTERED
24 (
25 folderID
26 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
27
28CREATE NONCLUSTERED INDEX owner ON dbo.inventoryfolders
29 (
30 agentID
31 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
32
33CREATE NONCLUSTERED INDEX parent ON dbo.inventoryfolders
34 (
35 parentFolderID
36 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
37
38COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/003_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/003_RegionStore.sql
deleted file mode 100644
index a8f40c2..0000000
--- a/OpenSim/Data/MSSQL/Resources/003_RegionStore.sql
+++ /dev/null
@@ -1,67 +0,0 @@
1BEGIN TRANSACTION
2
3CREATE TABLE dbo.Tmp_prims
4 (
5 UUID varchar(36) NOT NULL,
6 RegionUUID varchar(36) NULL,
7 ParentID int NULL,
8 CreationDate int NULL,
9 Name varchar(255) NULL,
10 SceneGroupID varchar(36) NULL,
11 Text varchar(255) NULL,
12 Description varchar(255) NULL,
13 SitName varchar(255) NULL,
14 TouchName varchar(255) NULL,
15 ObjectFlags int NULL,
16 CreatorID varchar(36) NULL,
17 OwnerID varchar(36) NULL,
18 GroupID varchar(36) NULL,
19 LastOwnerID varchar(36) NULL,
20 OwnerMask int NULL,
21 NextOwnerMask int NULL,
22 GroupMask int NULL,
23 EveryoneMask int NULL,
24 BaseMask int NULL,
25 PositionX float(53) NULL,
26 PositionY float(53) NULL,
27 PositionZ float(53) NULL,
28 GroupPositionX float(53) NULL,
29 GroupPositionY float(53) NULL,
30 GroupPositionZ float(53) NULL,
31 VelocityX float(53) NULL,
32 VelocityY float(53) NULL,
33 VelocityZ float(53) NULL,
34 AngularVelocityX float(53) NULL,
35 AngularVelocityY float(53) NULL,
36 AngularVelocityZ float(53) NULL,
37 AccelerationX float(53) NULL,
38 AccelerationY float(53) NULL,
39 AccelerationZ float(53) NULL,
40 RotationX float(53) NULL,
41 RotationY float(53) NULL,
42 RotationZ float(53) NULL,
43 RotationW float(53) NULL,
44 SitTargetOffsetX float(53) NULL,
45 SitTargetOffsetY float(53) NULL,
46 SitTargetOffsetZ float(53) NULL,
47 SitTargetOrientW float(53) NULL,
48 SitTargetOrientX float(53) NULL,
49 SitTargetOrientY float(53) NULL,
50 SitTargetOrientZ float(53) NULL
51 ) ON [PRIMARY]
52
53IF EXISTS(SELECT * FROM dbo.prims)
54 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)
55 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)')
56
57DROP TABLE dbo.prims
58
59EXECUTE sp_rename N'dbo.Tmp_prims', N'prims', 'OBJECT'
60
61ALTER TABLE dbo.prims ADD CONSTRAINT
62 PK__prims__10566F31 PRIMARY KEY CLUSTERED
63 (
64 UUID
65 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
66
67COMMIT \ No newline at end of file
diff --git a/OpenSim/Data/MSSQL/Resources/003_UserAccount.sql b/OpenSim/Data/MSSQL/Resources/003_UserAccount.sql
deleted file mode 100644
index da0395b..0000000
--- a/OpenSim/Data/MSSQL/Resources/003_UserAccount.sql
+++ /dev/null
@@ -1,9 +0,0 @@
1BEGIN TRANSACTION
2
3CREATE UNIQUE INDEX PrincipalID ON UserAccounts(PrincipalID);
4CREATE INDEX Email ON UserAccounts(Email);
5CREATE INDEX FirstName ON UserAccounts(FirstName);
6CREATE INDEX LastName ON UserAccounts(LastName);
7CREATE INDEX Name ON UserAccounts(FirstName,LastName);
8
9COMMIT \ No newline at end of file
diff --git a/OpenSim/Data/MSSQL/Resources/003_UserStore.sql b/OpenSim/Data/MSSQL/Resources/003_UserStore.sql
deleted file mode 100644
index cb507c9..0000000
--- a/OpenSim/Data/MSSQL/Resources/003_UserStore.sql
+++ /dev/null
@@ -1,15 +0,0 @@
1BEGIN TRANSACTION
2
3CREATE TABLE [avatarattachments] (
4 [UUID] varchar(36) NOT NULL
5 , [attachpoint] int NOT NULL
6 , [item] varchar(36) NOT NULL
7 , [asset] varchar(36) NOT NULL)
8
9CREATE NONCLUSTERED INDEX IX_avatarattachments ON dbo.avatarattachments
10 (
11 UUID
12 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
13
14
15COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/004_AssetStore.sql b/OpenSim/Data/MSSQL/Resources/004_AssetStore.sql
deleted file mode 100644
index 215cf3a..0000000
--- a/OpenSim/Data/MSSQL/Resources/004_AssetStore.sql
+++ /dev/null
@@ -1,31 +0,0 @@
1BEGIN TRANSACTION
2
3CREATE TABLE dbo.Tmp_assets
4 (
5 id uniqueidentifier NOT NULL,
6 name varchar(64) NOT NULL,
7 description varchar(64) NOT NULL,
8 assetType tinyint NOT NULL,
9 local bit NOT NULL,
10 temporary bit NOT NULL,
11 data image NOT NULL,
12 create_time int NULL,
13 access_time int NULL
14 ) ON [PRIMARY]
15 TEXTIMAGE_ON [PRIMARY]
16
17IF EXISTS(SELECT * FROM dbo.assets)
18 EXEC('INSERT INTO dbo.Tmp_assets (id, name, description, assetType, local, temporary, data, create_time, access_time)
19 SELECT CONVERT(uniqueidentifier, id), name, description, assetType, local, temporary, data, create_time, access_time FROM dbo.assets WITH (HOLDLOCK TABLOCKX)')
20
21DROP TABLE assets
22
23EXECUTE sp_rename N'Tmp_assets', N'assets', 'OBJECT'
24
25ALTER TABLE dbo.assets ADD CONSTRAINT
26 PK__assets__id PRIMARY KEY CLUSTERED
27 (
28 id
29 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
30
31COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/004_EstateStore.sql b/OpenSim/Data/MSSQL/Resources/004_EstateStore.sql
deleted file mode 100644
index 0a132c1..0000000
--- a/OpenSim/Data/MSSQL/Resources/004_EstateStore.sql
+++ /dev/null
@@ -1,22 +0,0 @@
1BEGIN TRANSACTION
2
3CREATE TABLE dbo.Tmp_estate_managers
4 (
5 EstateID int NOT NULL,
6 uuid uniqueidentifier NOT NULL
7 ) ON [PRIMARY]
8
9IF EXISTS(SELECT * FROM dbo.estate_managers)
10 EXEC('INSERT INTO dbo.Tmp_estate_managers (EstateID, uuid)
11 SELECT EstateID, CONVERT(uniqueidentifier, uuid) FROM dbo.estate_managers WITH (HOLDLOCK TABLOCKX)')
12
13DROP TABLE dbo.estate_managers
14
15EXECUTE sp_rename N'dbo.Tmp_estate_managers', N'estate_managers', 'OBJECT'
16
17CREATE NONCLUSTERED INDEX IX_estate_managers ON dbo.estate_managers
18 (
19 EstateID
20 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
21
22COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/004_GridStore.sql b/OpenSim/Data/MSSQL/Resources/004_GridStore.sql
deleted file mode 100644
index 6456c95..0000000
--- a/OpenSim/Data/MSSQL/Resources/004_GridStore.sql
+++ /dev/null
@@ -1,68 +0,0 @@
1/* To prevent any potential data loss issues, you should review this script in detail before running it outside the context of the database designer.*/
2BEGIN TRANSACTION
3
4CREATE TABLE dbo.Tmp_regions
5 (
6 uuid uniqueidentifier NOT NULL,
7 regionHandle bigint NULL,
8 regionName varchar(20) NULL,
9 regionRecvKey varchar(128) NULL,
10 regionSendKey varchar(128) NULL,
11 regionSecret varchar(128) NULL,
12 regionDataURI varchar(128) NULL,
13 serverIP varchar(64) NULL,
14 serverPort int NULL,
15 serverURI varchar(255) NULL,
16 locX int NULL,
17 locY int NULL,
18 locZ int NULL,
19 eastOverrideHandle bigint NULL,
20 westOverrideHandle bigint NULL,
21 southOverrideHandle bigint NULL,
22 northOverrideHandle bigint NULL,
23 regionAssetURI varchar(255) NULL,
24 regionAssetRecvKey varchar(128) NULL,
25 regionAssetSendKey varchar(128) NULL,
26 regionUserURI varchar(255) NULL,
27 regionUserRecvKey varchar(128) NULL,
28 regionUserSendKey varchar(128) NULL,
29 regionMapTexture uniqueidentifier NULL,
30 serverHttpPort int NULL,
31 serverRemotingPort int NULL,
32 owner_uuid uniqueidentifier NOT NULL,
33 originUUID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000')
34 ) ON [PRIMARY]
35
36IF EXISTS(SELECT * FROM dbo.regions)
37 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)
38 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)')
39
40DROP TABLE dbo.regions
41
42EXECUTE sp_rename N'dbo.Tmp_regions', N'regions', 'OBJECT'
43
44ALTER TABLE dbo.regions ADD CONSTRAINT
45 PK__regions__uuid PRIMARY KEY CLUSTERED
46 (
47 uuid
48 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
49
50CREATE NONCLUSTERED INDEX IX_regions_name ON dbo.regions
51 (
52 regionName
53 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
54
55CREATE NONCLUSTERED INDEX IX_regions_handle ON dbo.regions
56 (
57 regionHandle
58 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
59
60CREATE NONCLUSTERED INDEX IX_regions_override ON dbo.regions
61 (
62 eastOverrideHandle,
63 westOverrideHandle,
64 southOverrideHandle,
65 northOverrideHandle
66 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
67
68COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/004_InventoryStore.sql b/OpenSim/Data/MSSQL/Resources/004_InventoryStore.sql
deleted file mode 100644
index 96ef1c0..0000000
--- a/OpenSim/Data/MSSQL/Resources/004_InventoryStore.sql
+++ /dev/null
@@ -1,52 +0,0 @@
1BEGIN TRANSACTION
2
3CREATE TABLE dbo.Tmp_inventoryitems
4 (
5 inventoryID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
6 assetID uniqueidentifier NULL DEFAULT (NULL),
7 assetType int NULL DEFAULT (NULL),
8 parentFolderID uniqueidentifier NULL DEFAULT (NULL),
9 avatarID uniqueidentifier NULL DEFAULT (NULL),
10 inventoryName varchar(64) NULL DEFAULT (NULL),
11 inventoryDescription varchar(128) NULL DEFAULT (NULL),
12 inventoryNextPermissions int NULL DEFAULT (NULL),
13 inventoryCurrentPermissions int NULL DEFAULT (NULL),
14 invType int NULL DEFAULT (NULL),
15 creatorID uniqueidentifier NULL DEFAULT (NULL),
16 inventoryBasePermissions int NOT NULL DEFAULT ((0)),
17 inventoryEveryOnePermissions int NOT NULL DEFAULT ((0)),
18 salePrice int NULL DEFAULT (NULL),
19 saleType tinyint NULL DEFAULT (NULL),
20 creationDate int NULL DEFAULT (NULL),
21 groupID uniqueidentifier NULL DEFAULT (NULL),
22 groupOwned bit NULL DEFAULT (NULL),
23 flags int NULL DEFAULT (NULL),
24 inventoryGroupPermissions int NOT NULL DEFAULT ((0))
25 ) ON [PRIMARY]
26
27IF EXISTS(SELECT * FROM dbo.inventoryitems)
28 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)
29 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)')
30
31DROP TABLE dbo.inventoryitems
32
33EXECUTE sp_rename N'dbo.Tmp_inventoryitems', N'inventoryitems', 'OBJECT'
34
35ALTER TABLE dbo.inventoryitems ADD CONSTRAINT
36 PK__inventor__C4B7BC2220C1E124 PRIMARY KEY CLUSTERED
37 (
38 inventoryID
39 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
40
41
42CREATE NONCLUSTERED INDEX owner ON dbo.inventoryitems
43 (
44 avatarID
45 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
46
47CREATE NONCLUSTERED INDEX folder ON dbo.inventoryitems
48 (
49 parentFolderID
50 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
51
52COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/004_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/004_RegionStore.sql
deleted file mode 100644
index 15b39a7..0000000
--- a/OpenSim/Data/MSSQL/Resources/004_RegionStore.sql
+++ /dev/null
@@ -1,40 +0,0 @@
1BEGIN TRANSACTION
2
3CREATE TABLE Tmp_primitems
4 (
5 itemID varchar(36) NOT NULL,
6 primID varchar(36) NULL,
7 assetID varchar(36) NULL,
8 parentFolderID varchar(36) NULL,
9 invType int NULL,
10 assetType int NULL,
11 name varchar(255) NULL,
12 description varchar(255) NULL,
13 creationDate varchar(255) NULL,
14 creatorID varchar(36) NULL,
15 ownerID varchar(36) NULL,
16 lastOwnerID varchar(36) NULL,
17 groupID varchar(36) NULL,
18 nextPermissions int NULL,
19 currentPermissions int NULL,
20 basePermissions int NULL,
21 everyonePermissions int NULL,
22 groupPermissions int NULL
23 ) ON [PRIMARY]
24
25IF EXISTS(SELECT * FROM primitems)
26 EXEC('INSERT INTO Tmp_primitems (itemID, primID, assetID, parentFolderID, invType, assetType, name, description, creationDate, creatorID, ownerID, lastOwnerID, groupID, nextPermissions, currentPermissions, basePermissions, everyonePermissions, groupPermissions)
27 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')
28
29DROP TABLE primitems
30
31EXECUTE sp_rename N'Tmp_primitems', N'primitems', 'OBJECT'
32
33ALTER TABLE primitems ADD CONSTRAINT
34 PK__primitems__0A688BB1 PRIMARY KEY CLUSTERED
35 (
36 itemID
37 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
38
39
40COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/004_UserAccount.sql b/OpenSim/Data/MSSQL/Resources/004_UserAccount.sql
deleted file mode 100644
index a9a9021..0000000
--- a/OpenSim/Data/MSSQL/Resources/004_UserAccount.sql
+++ /dev/null
@@ -1,7 +0,0 @@
1BEGIN TRANSACTION
2
3ALTER TABLE UserAccounts ADD UserLevel integer NOT NULL DEFAULT 0;
4ALTER TABLE UserAccounts ADD UserFlags integer NOT NULL DEFAULT 0;
5ALTER TABLE UserAccounts ADD UserTitle varchar(64) NOT NULL DEFAULT '';
6
7COMMIT \ No newline at end of file
diff --git a/OpenSim/Data/MSSQL/Resources/004_UserStore.sql b/OpenSim/Data/MSSQL/Resources/004_UserStore.sql
deleted file mode 100644
index 08f1a1d..0000000
--- a/OpenSim/Data/MSSQL/Resources/004_UserStore.sql
+++ /dev/null
@@ -1,29 +0,0 @@
1BEGIN TRANSACTION
2
3CREATE TABLE Tmp_userfriends
4 (
5 ownerID varchar(36) NOT NULL,
6 friendID varchar(36) NOT NULL,
7 friendPerms int NOT NULL,
8 datetimestamp int NOT NULL
9 ) ON [PRIMARY]
10
11IF EXISTS(SELECT * FROM userfriends)
12 EXEC('INSERT INTO dbo.Tmp_userfriends (ownerID, friendID, friendPerms, datetimestamp)
13 SELECT CONVERT(varchar(36), ownerID), CONVERT(varchar(36), friendID), CONVERT(int, friendPerms), CONVERT(int, datetimestamp) FROM dbo.userfriends WITH (HOLDLOCK TABLOCKX)')
14
15DROP TABLE dbo.userfriends
16
17EXECUTE sp_rename N'Tmp_userfriends', N'userfriends', 'OBJECT'
18
19CREATE NONCLUSTERED INDEX IX_userfriends_ownerID ON userfriends
20 (
21 ownerID
22 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
23
24CREATE NONCLUSTERED INDEX IX_userfriends_friendID ON userfriends
25 (
26 friendID
27 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
28
29COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/005_AssetStore.sql b/OpenSim/Data/MSSQL/Resources/005_AssetStore.sql
deleted file mode 100644
index 4e95b2b..0000000
--- a/OpenSim/Data/MSSQL/Resources/005_AssetStore.sql
+++ /dev/null
@@ -1 +0,0 @@
1DELETE FROM assets WHERE id = 'dc4b9f0b-d008-45c6-96a4-01dd947ac621';
diff --git a/OpenSim/Data/MSSQL/Resources/005_EstateStore.sql b/OpenSim/Data/MSSQL/Resources/005_EstateStore.sql
deleted file mode 100644
index ba93b39..0000000
--- a/OpenSim/Data/MSSQL/Resources/005_EstateStore.sql
+++ /dev/null
@@ -1,22 +0,0 @@
1BEGIN TRANSACTION
2
3CREATE TABLE dbo.Tmp_estate_groups
4 (
5 EstateID int NOT NULL,
6 uuid uniqueidentifier NOT NULL
7 ) ON [PRIMARY]
8
9IF EXISTS(SELECT * FROM dbo.estate_groups)
10 EXEC('INSERT INTO dbo.Tmp_estate_groups (EstateID, uuid)
11 SELECT EstateID, CONVERT(uniqueidentifier, uuid) FROM dbo.estate_groups WITH (HOLDLOCK TABLOCKX)')
12
13DROP TABLE dbo.estate_groups
14
15EXECUTE sp_rename N'dbo.Tmp_estate_groups', N'estate_groups', 'OBJECT'
16
17CREATE NONCLUSTERED INDEX IX_estate_groups ON dbo.estate_groups
18 (
19 EstateID
20 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
21
22COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/005_GridStore.sql b/OpenSim/Data/MSSQL/Resources/005_GridStore.sql
deleted file mode 100644
index aa04a33..0000000
--- a/OpenSim/Data/MSSQL/Resources/005_GridStore.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN TRANSACTION
2
3ALTER TABLE regions ADD access int default 0;
4
5COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/005_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/005_RegionStore.sql
deleted file mode 100644
index eb0862c..0000000
--- a/OpenSim/Data/MSSQL/Resources/005_RegionStore.sql
+++ /dev/null
@@ -1,49 +0,0 @@
1BEGIN TRANSACTION
2
3CREATE TABLE Tmp_primshapes
4 (
5 UUID varchar(36) NOT NULL,
6 Shape int NULL,
7 ScaleX float(53) NULL,
8 ScaleY float(53) NULL,
9 ScaleZ float(53) NULL,
10 PCode int NULL,
11 PathBegin int NULL,
12 PathEnd int NULL,
13 PathScaleX int NULL,
14 PathScaleY int NULL,
15 PathShearX int NULL,
16 PathShearY int NULL,
17 PathSkew int NULL,
18 PathCurve int NULL,
19 PathRadiusOffset int NULL,
20 PathRevolutions int NULL,
21 PathTaperX int NULL,
22 PathTaperY int NULL,
23 PathTwist int NULL,
24 PathTwistBegin int NULL,
25 ProfileBegin int NULL,
26 ProfileEnd int NULL,
27 ProfileCurve int NULL,
28 ProfileHollow int NULL,
29 State int NULL,
30 Texture image NULL,
31 ExtraParams image NULL
32 ) ON [PRIMARY]
33 TEXTIMAGE_ON [PRIMARY]
34
35IF EXISTS(SELECT * FROM primshapes)
36 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)
37 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)')
38
39DROP TABLE primshapes
40
41EXECUTE sp_rename N'Tmp_primshapes', N'primshapes', 'OBJECT'
42
43ALTER TABLE primshapes ADD CONSTRAINT
44 PK__primshapes__0880433F PRIMARY KEY CLUSTERED
45 (
46 UUID
47 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
48
49COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/005_UserStore.sql b/OpenSim/Data/MSSQL/Resources/005_UserStore.sql
deleted file mode 100644
index 1b6ab8f..0000000
--- a/OpenSim/Data/MSSQL/Resources/005_UserStore.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN TRANSACTION
2
3 ALTER TABLE users add email varchar(250);
4
5COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/006_EstateStore.sql b/OpenSim/Data/MSSQL/Resources/006_EstateStore.sql
deleted file mode 100644
index f7df8fd..0000000
--- a/OpenSim/Data/MSSQL/Resources/006_EstateStore.sql
+++ /dev/null
@@ -1,22 +0,0 @@
1BEGIN TRANSACTION
2
3CREATE TABLE dbo.Tmp_estate_users
4 (
5 EstateID int NOT NULL,
6 uuid uniqueidentifier NOT NULL
7 ) ON [PRIMARY]
8
9IF EXISTS(SELECT * FROM dbo.estate_users)
10 EXEC('INSERT INTO dbo.Tmp_estate_users (EstateID, uuid)
11 SELECT EstateID, CONVERT(uniqueidentifier, uuid) FROM dbo.estate_users WITH (HOLDLOCK TABLOCKX)')
12
13DROP TABLE dbo.estate_users
14
15EXECUTE sp_rename N'dbo.Tmp_estate_users', N'estate_users', 'OBJECT'
16
17CREATE NONCLUSTERED INDEX IX_estate_users ON dbo.estate_users
18 (
19 EstateID
20 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
21
22COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/006_GridStore.sql b/OpenSim/Data/MSSQL/Resources/006_GridStore.sql
deleted file mode 100644
index 42010ce..0000000
--- a/OpenSim/Data/MSSQL/Resources/006_GridStore.sql
+++ /dev/null
@@ -1,8 +0,0 @@
1BEGIN TRANSACTION
2
3ALTER TABLE regions ADD scopeid uniqueidentifier default '00000000-0000-0000-0000-000000000000';
4ALTER TABLE regions ADD DEFAULT ('00000000-0000-0000-0000-000000000000') FOR [owner_uuid];
5ALTER TABLE regions ADD sizeX integer not null default 0;
6ALTER TABLE regions ADD sizeY integer not null default 0;
7
8COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/006_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/006_RegionStore.sql
deleted file mode 100644
index 0419c0c..0000000
--- a/OpenSim/Data/MSSQL/Resources/006_RegionStore.sql
+++ /dev/null
@@ -1,36 +0,0 @@
1BEGIN TRANSACTION
2
3ALTER TABLE prims ADD PayPrice int not null default 0
4ALTER TABLE prims ADD PayButton1 int not null default 0
5ALTER TABLE prims ADD PayButton2 int not null default 0
6ALTER TABLE prims ADD PayButton3 int not null default 0
7ALTER TABLE prims ADD PayButton4 int not null default 0
8ALTER TABLE prims ADD LoopedSound varchar(36) not null default '00000000-0000-0000-0000-000000000000';
9ALTER TABLE prims ADD LoopedSoundGain float not null default 0.0;
10ALTER TABLE prims ADD TextureAnimation image
11ALTER TABLE prims ADD OmegaX float not null default 0.0
12ALTER TABLE prims ADD OmegaY float not null default 0.0
13ALTER TABLE prims ADD OmegaZ float not null default 0.0
14ALTER TABLE prims ADD CameraEyeOffsetX float not null default 0.0
15ALTER TABLE prims ADD CameraEyeOffsetY float not null default 0.0
16ALTER TABLE prims ADD CameraEyeOffsetZ float not null default 0.0
17ALTER TABLE prims ADD CameraAtOffsetX float not null default 0.0
18ALTER TABLE prims ADD CameraAtOffsetY float not null default 0.0
19ALTER TABLE prims ADD CameraAtOffsetZ float not null default 0.0
20ALTER TABLE prims ADD ForceMouselook tinyint not null default 0
21ALTER TABLE prims ADD ScriptAccessPin int not null default 0
22ALTER TABLE prims ADD AllowedDrop tinyint not null default 0
23ALTER TABLE prims ADD DieAtEdge tinyint not null default 0
24ALTER TABLE prims ADD SalePrice int not null default 10
25ALTER TABLE prims ADD SaleType tinyint not null default 0
26
27ALTER TABLE primitems add flags integer not null default 0
28
29ALTER TABLE land ADD AuthbuyerID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000'
30
31CREATE index prims_regionuuid on prims(RegionUUID)
32CREATE index prims_parentid on prims(ParentID)
33
34CREATE index primitems_primid on primitems(primID)
35
36COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/006_UserStore.sql b/OpenSim/Data/MSSQL/Resources/006_UserStore.sql
deleted file mode 100644
index 67fe581..0000000
--- a/OpenSim/Data/MSSQL/Resources/006_UserStore.sql
+++ /dev/null
@@ -1,57 +0,0 @@
1BEGIN TRANSACTION
2
3CREATE TABLE dbo.Tmp_users
4 (
5 UUID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
6 username varchar(32) NOT NULL,
7 lastname varchar(32) NOT NULL,
8 passwordHash varchar(32) NOT NULL,
9 passwordSalt varchar(32) NOT NULL,
10 homeRegion bigint NULL DEFAULT (NULL),
11 homeLocationX float(53) NULL DEFAULT (NULL),
12 homeLocationY float(53) NULL DEFAULT (NULL),
13 homeLocationZ float(53) NULL DEFAULT (NULL),
14 homeLookAtX float(53) NULL DEFAULT (NULL),
15 homeLookAtY float(53) NULL DEFAULT (NULL),
16 homeLookAtZ float(53) NULL DEFAULT (NULL),
17 created int NOT NULL,
18 lastLogin int NOT NULL,
19 userInventoryURI varchar(255) NULL DEFAULT (NULL),
20 userAssetURI varchar(255) NULL DEFAULT (NULL),
21 profileCanDoMask int NULL DEFAULT (NULL),
22 profileWantDoMask int NULL DEFAULT (NULL),
23 profileAboutText ntext NULL,
24 profileFirstText ntext NULL,
25 profileImage uniqueidentifier NULL DEFAULT (NULL),
26 profileFirstImage uniqueidentifier NULL DEFAULT (NULL),
27 webLoginKey uniqueidentifier NULL DEFAULT (NULL),
28 homeRegionID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
29 userFlags int NOT NULL DEFAULT ((0)),
30 godLevel int NOT NULL DEFAULT ((0)),
31 customType varchar(32) NOT NULL DEFAULT (''),
32 partner uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
33 email varchar(250) NULL
34 ) ON [PRIMARY]
35 TEXTIMAGE_ON [PRIMARY]
36
37IF EXISTS(SELECT * FROM dbo.users)
38 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)
39 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)')
40
41DROP TABLE dbo.users
42
43EXECUTE sp_rename N'dbo.Tmp_users', N'users', 'OBJECT'
44
45ALTER TABLE dbo.users ADD CONSTRAINT
46 PK__users__65A475E737A5467C PRIMARY KEY CLUSTERED
47 (
48 UUID
49 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
50
51CREATE NONCLUSTERED INDEX usernames ON dbo.users
52 (
53 username,
54 lastname
55 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
56
57COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/007_EstateStore.sql b/OpenSim/Data/MSSQL/Resources/007_EstateStore.sql
deleted file mode 100644
index c9165b0..0000000
--- a/OpenSim/Data/MSSQL/Resources/007_EstateStore.sql
+++ /dev/null
@@ -1,25 +0,0 @@
1BEGIN TRANSACTION
2
3CREATE TABLE dbo.Tmp_estateban
4 (
5 EstateID int NOT NULL,
6 bannedUUID uniqueidentifier NOT NULL,
7 bannedIp varchar(16) NULL,
8 bannedIpHostMask varchar(16) NULL,
9 bannedNameMask varchar(64) NULL
10 ) ON [PRIMARY]
11
12IF EXISTS(SELECT * FROM dbo.estateban)
13 EXEC('INSERT INTO dbo.Tmp_estateban (EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask)
14 SELECT EstateID, CONVERT(uniqueidentifier, bannedUUID), bannedIp, bannedIpHostMask, bannedNameMask FROM dbo.estateban WITH (HOLDLOCK TABLOCKX)')
15
16DROP TABLE dbo.estateban
17
18EXECUTE sp_rename N'dbo.Tmp_estateban', N'estateban', 'OBJECT'
19
20CREATE NONCLUSTERED INDEX IX_estateban ON dbo.estateban
21 (
22 EstateID
23 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
24
25COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/007_GridStore.sql b/OpenSim/Data/MSSQL/Resources/007_GridStore.sql
deleted file mode 100644
index 0b66d40..0000000
--- a/OpenSim/Data/MSSQL/Resources/007_GridStore.sql
+++ /dev/null
@@ -1,9 +0,0 @@
1BEGIN TRANSACTION
2
3ALTER TABLE regions ADD [flags] integer NOT NULL DEFAULT 0;
4CREATE INDEX [flags] ON regions(flags);
5ALTER TABLE [regions] ADD [last_seen] integer NOT NULL DEFAULT 0;
6ALTER TABLE [regions] ADD [PrincipalID] uniqueidentifier NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000';
7ALTER TABLE [regions] ADD [Token] varchar(255) NOT NULL DEFAULT 0;
8
9COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/007_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/007_RegionStore.sql
deleted file mode 100644
index 684f937..0000000
--- a/OpenSim/Data/MSSQL/Resources/007_RegionStore.sql
+++ /dev/null
@@ -1,10 +0,0 @@
1BEGIN TRANSACTION
2
3ALTER TABLE prims ADD ColorR int not null default 0;
4ALTER TABLE prims ADD ColorG int not null default 0;
5ALTER TABLE prims ADD ColorB int not null default 0;
6ALTER TABLE prims ADD ColorA int not null default 0;
7ALTER TABLE prims ADD ParticleSystem IMAGE;
8ALTER TABLE prims ADD ClickAction tinyint NOT NULL default 0;
9
10COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/007_UserStore.sql b/OpenSim/Data/MSSQL/Resources/007_UserStore.sql
deleted file mode 100644
index 92a8fc5..0000000
--- a/OpenSim/Data/MSSQL/Resources/007_UserStore.sql
+++ /dev/null
@@ -1,42 +0,0 @@
1BEGIN TRANSACTION
2
3CREATE TABLE dbo.Tmp_agents
4 (
5 UUID uniqueidentifier NOT NULL,
6 sessionID uniqueidentifier NOT NULL,
7 secureSessionID uniqueidentifier NOT NULL,
8 agentIP varchar(16) NOT NULL,
9 agentPort int NOT NULL,
10 agentOnline tinyint NOT NULL,
11 loginTime int NOT NULL,
12 logoutTime int NOT NULL,
13 currentRegion uniqueidentifier NOT NULL,
14 currentHandle bigint NOT NULL,
15 currentPos varchar(64) NOT NULL
16 ) ON [PRIMARY]
17
18IF EXISTS(SELECT * FROM dbo.agents)
19 EXEC('INSERT INTO dbo.Tmp_agents (UUID, sessionID, secureSessionID, agentIP, agentPort, agentOnline, loginTime, logoutTime, currentRegion, currentHandle, currentPos)
20 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)')
21
22DROP TABLE dbo.agents
23
24EXECUTE sp_rename N'dbo.Tmp_agents', N'agents', 'OBJECT'
25
26ALTER TABLE dbo.agents ADD CONSTRAINT
27 PK__agents__65A475E749C3F6B7 PRIMARY KEY CLUSTERED
28 (
29 UUID
30 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
31
32CREATE NONCLUSTERED INDEX session ON dbo.agents
33 (
34 sessionID
35 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
36
37CREATE NONCLUSTERED INDEX ssession ON dbo.agents
38 (
39 secureSessionID
40 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
41
42COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/008_EstateStore.sql b/OpenSim/Data/MSSQL/Resources/008_EstateStore.sql
deleted file mode 100644
index 9c5355e..0000000
--- a/OpenSim/Data/MSSQL/Resources/008_EstateStore.sql
+++ /dev/null
@@ -1,49 +0,0 @@
1BEGIN TRANSACTION
2
3CREATE TABLE dbo.Tmp_estate_settings
4 (
5 EstateID int NOT NULL IDENTITY (1, 100),
6 EstateName varchar(64) NULL DEFAULT (NULL),
7 AbuseEmailToEstateOwner bit NOT NULL,
8 DenyAnonymous bit NOT NULL,
9 ResetHomeOnTeleport bit NOT NULL,
10 FixedSun bit NOT NULL,
11 DenyTransacted bit NOT NULL,
12 BlockDwell bit NOT NULL,
13 DenyIdentified bit NOT NULL,
14 AllowVoice bit NOT NULL,
15 UseGlobalTime bit NOT NULL,
16 PricePerMeter int NOT NULL,
17 TaxFree bit NOT NULL,
18 AllowDirectTeleport bit NOT NULL,
19 RedirectGridX int NOT NULL,
20 RedirectGridY int NOT NULL,
21 ParentEstateID int NOT NULL,
22 SunPosition float(53) NOT NULL,
23 EstateSkipScripts bit NOT NULL,
24 BillableFactor float(53) NOT NULL,
25 PublicAccess bit NOT NULL,
26 AbuseEmail varchar(255) NOT NULL,
27 EstateOwner uniqueidentifier NOT NULL,
28 DenyMinors bit NOT NULL
29 ) ON [PRIMARY]
30
31SET IDENTITY_INSERT dbo.Tmp_estate_settings ON
32
33IF EXISTS(SELECT * FROM dbo.estate_settings)
34 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)
35 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)')
36
37SET IDENTITY_INSERT dbo.Tmp_estate_settings OFF
38
39DROP TABLE dbo.estate_settings
40
41EXECUTE sp_rename N'dbo.Tmp_estate_settings', N'estate_settings', 'OBJECT'
42
43ALTER TABLE dbo.estate_settings ADD CONSTRAINT
44 PK_estate_settings PRIMARY KEY CLUSTERED
45 (
46 EstateID
47 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
48
49COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/008_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/008_RegionStore.sql
deleted file mode 100644
index 87d6d80..0000000
--- a/OpenSim/Data/MSSQL/Resources/008_RegionStore.sql
+++ /dev/null
@@ -1,7 +0,0 @@
1BEGIN TRANSACTION
2
3ALTER TABLE land ADD OtherCleanTime integer NOT NULL default 0;
4ALTER TABLE land ADD Dwell integer NOT NULL default 0;
5
6COMMIT
7
diff --git a/OpenSim/Data/MSSQL/Resources/008_UserStore.sql b/OpenSim/Data/MSSQL/Resources/008_UserStore.sql
deleted file mode 100644
index 505252b..0000000
--- a/OpenSim/Data/MSSQL/Resources/008_UserStore.sql
+++ /dev/null
@@ -1,29 +0,0 @@
1BEGIN TRANSACTION
2
3CREATE TABLE dbo.Tmp_userfriends
4 (
5 ownerID uniqueidentifier NOT NULL,
6 friendID uniqueidentifier NOT NULL,
7 friendPerms int NOT NULL,
8 datetimestamp int NOT NULL
9 ) ON [PRIMARY]
10
11IF EXISTS(SELECT * FROM dbo.userfriends)
12 EXEC('INSERT INTO dbo.Tmp_userfriends (ownerID, friendID, friendPerms, datetimestamp)
13 SELECT CONVERT(uniqueidentifier, ownerID), CONVERT(uniqueidentifier, friendID), friendPerms, datetimestamp FROM dbo.userfriends WITH (HOLDLOCK TABLOCKX)')
14
15DROP TABLE dbo.userfriends
16
17EXECUTE sp_rename N'dbo.Tmp_userfriends', N'userfriends', 'OBJECT'
18
19CREATE NONCLUSTERED INDEX IX_userfriends_ownerID ON dbo.userfriends
20 (
21 ownerID
22 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
23
24CREATE NONCLUSTERED INDEX IX_userfriends_friendID ON dbo.userfriends
25 (
26 friendID
27 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
28
29COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/009_EstateStore.sql b/OpenSim/Data/MSSQL/Resources/009_EstateStore.sql
deleted file mode 100644
index f91557c..0000000
--- a/OpenSim/Data/MSSQL/Resources/009_EstateStore.sql
+++ /dev/null
@@ -1,24 +0,0 @@
1BEGIN TRANSACTION
2
3CREATE TABLE dbo.Tmp_estate_map
4 (
5 RegionID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
6 EstateID int NOT NULL
7 ) ON [PRIMARY]
8
9IF EXISTS(SELECT * FROM dbo.estate_map)
10 EXEC('INSERT INTO dbo.Tmp_estate_map (RegionID, EstateID)
11 SELECT CONVERT(uniqueidentifier, RegionID), EstateID FROM dbo.estate_map WITH (HOLDLOCK TABLOCKX)')
12
13DROP TABLE dbo.estate_map
14
15EXECUTE sp_rename N'dbo.Tmp_estate_map', N'estate_map', 'OBJECT'
16
17ALTER TABLE dbo.estate_map ADD CONSTRAINT
18 PK_estate_map PRIMARY KEY CLUSTERED
19 (
20 RegionID
21 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
22
23
24COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/009_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/009_RegionStore.sql
deleted file mode 100644
index 4ef3b3f..0000000
--- a/OpenSim/Data/MSSQL/Resources/009_RegionStore.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN TRANSACTION
2
3ALTER TABLE prims ADD Material tinyint NOT NULL default 3
4
5COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/009_UserStore.sql b/OpenSim/Data/MSSQL/Resources/009_UserStore.sql
deleted file mode 100644
index b1ab8ba..0000000
--- a/OpenSim/Data/MSSQL/Resources/009_UserStore.sql
+++ /dev/null
@@ -1,53 +0,0 @@
1BEGIN TRANSACTION
2
3CREATE TABLE dbo.Tmp_avatarappearance
4 (
5 Owner uniqueidentifier NOT NULL,
6 Serial int NOT NULL,
7 Visual_Params image NOT NULL,
8 Texture image NOT NULL,
9 Avatar_Height float(53) NOT NULL,
10 Body_Item uniqueidentifier NOT NULL,
11 Body_Asset uniqueidentifier NOT NULL,
12 Skin_Item uniqueidentifier NOT NULL,
13 Skin_Asset uniqueidentifier NOT NULL,
14 Hair_Item uniqueidentifier NOT NULL,
15 Hair_Asset uniqueidentifier NOT NULL,
16 Eyes_Item uniqueidentifier NOT NULL,
17 Eyes_Asset uniqueidentifier NOT NULL,
18 Shirt_Item uniqueidentifier NOT NULL,
19 Shirt_Asset uniqueidentifier NOT NULL,
20 Pants_Item uniqueidentifier NOT NULL,
21 Pants_Asset uniqueidentifier NOT NULL,
22 Shoes_Item uniqueidentifier NOT NULL,
23 Shoes_Asset uniqueidentifier NOT NULL,
24 Socks_Item uniqueidentifier NOT NULL,
25 Socks_Asset uniqueidentifier NOT NULL,
26 Jacket_Item uniqueidentifier NOT NULL,
27 Jacket_Asset uniqueidentifier NOT NULL,
28 Gloves_Item uniqueidentifier NOT NULL,
29 Gloves_Asset uniqueidentifier NOT NULL,
30 Undershirt_Item uniqueidentifier NOT NULL,
31 Undershirt_Asset uniqueidentifier NOT NULL,
32 Underpants_Item uniqueidentifier NOT NULL,
33 Underpants_Asset uniqueidentifier NOT NULL,
34 Skirt_Item uniqueidentifier NOT NULL,
35 Skirt_Asset uniqueidentifier NOT NULL
36 ) ON [PRIMARY]
37 TEXTIMAGE_ON [PRIMARY]
38
39IF EXISTS(SELECT * FROM dbo.avatarappearance)
40 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)
41 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)')
42
43DROP TABLE dbo.avatarappearance
44
45EXECUTE sp_rename N'dbo.Tmp_avatarappearance', N'avatarappearance', 'OBJECT'
46
47ALTER TABLE dbo.avatarappearance ADD CONSTRAINT
48 PK__avatarap__7DD115CC4E88ABD4 PRIMARY KEY CLUSTERED
49 (
50 Owner
51 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
52
53COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/010_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/010_RegionStore.sql
deleted file mode 100644
index 74ad9c2..0000000
--- a/OpenSim/Data/MSSQL/Resources/010_RegionStore.sql
+++ /dev/null
@@ -1,7 +0,0 @@
1BEGIN TRANSACTION
2
3ALTER TABLE regionsettings ADD sunvectorx float NOT NULL default 0;
4ALTER TABLE regionsettings ADD sunvectory float NOT NULL default 0;
5ALTER TABLE regionsettings ADD sunvectorz float NOT NULL default 0;
6
7COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/010_UserStore.sql b/OpenSim/Data/MSSQL/Resources/010_UserStore.sql
deleted file mode 100644
index 0af008a..0000000
--- a/OpenSim/Data/MSSQL/Resources/010_UserStore.sql
+++ /dev/null
@@ -1,24 +0,0 @@
1BEGIN TRANSACTION
2
3CREATE TABLE dbo.Tmp_avatarattachments
4 (
5 UUID uniqueidentifier NOT NULL,
6 attachpoint int NOT NULL,
7 item uniqueidentifier NOT NULL,
8 asset uniqueidentifier NOT NULL
9 ) ON [PRIMARY]
10
11IF EXISTS(SELECT * FROM dbo.avatarattachments)
12 EXEC('INSERT INTO dbo.Tmp_avatarattachments (UUID, attachpoint, item, asset)
13 SELECT CONVERT(uniqueidentifier, UUID), attachpoint, CONVERT(uniqueidentifier, item), CONVERT(uniqueidentifier, asset) FROM dbo.avatarattachments WITH (HOLDLOCK TABLOCKX)')
14
15DROP TABLE dbo.avatarattachments
16
17EXECUTE sp_rename N'dbo.Tmp_avatarattachments', N'avatarattachments', 'OBJECT'
18
19CREATE NONCLUSTERED INDEX IX_avatarattachments ON dbo.avatarattachments
20 (
21 UUID
22 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
23
24COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/011_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/011_RegionStore.sql
deleted file mode 100644
index 14c71a3..0000000
--- a/OpenSim/Data/MSSQL/Resources/011_RegionStore.sql
+++ /dev/null
@@ -1,6 +0,0 @@
1BEGIN TRANSACTION
2
3ALTER TABLE prims ADD CollisionSound char(36) not null default '00000000-0000-0000-0000-000000000000'
4ALTER TABLE prims ADD CollisionSoundVolume float not null default 0.0
5
6COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/011_UserStore.sql b/OpenSim/Data/MSSQL/Resources/011_UserStore.sql
deleted file mode 100644
index 5aa064f..0000000
--- a/OpenSim/Data/MSSQL/Resources/011_UserStore.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN TRANSACTION
2
3ALTER TABLE users ADD scopeID uniqueidentifier not null default '00000000-0000-0000-0000-000000000000'
4
5COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/012_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/012_RegionStore.sql
deleted file mode 100644
index eef8d90..0000000
--- a/OpenSim/Data/MSSQL/Resources/012_RegionStore.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN TRANSACTION
2
3ALTER TABLE prims ADD LinkNumber integer not null default 0
4
5COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/013_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/013_RegionStore.sql
deleted file mode 100644
index ef5d4c0..0000000
--- a/OpenSim/Data/MSSQL/Resources/013_RegionStore.sql
+++ /dev/null
@@ -1,112 +0,0 @@
1BEGIN TRANSACTION
2
3CREATE TABLE dbo.Tmp_prims
4 (
5 UUID uniqueidentifier NOT NULL,
6 RegionUUID uniqueidentifier NULL,
7 ParentID int NULL,
8 CreationDate int NULL,
9 Name varchar(255) NULL,
10 SceneGroupID uniqueidentifier NULL,
11 Text varchar(255) NULL,
12 Description varchar(255) NULL,
13 SitName varchar(255) NULL,
14 TouchName varchar(255) NULL,
15 ObjectFlags int NULL,
16 CreatorID uniqueidentifier NULL,
17 OwnerID uniqueidentifier NULL,
18 GroupID uniqueidentifier NULL,
19 LastOwnerID uniqueidentifier NULL,
20 OwnerMask int NULL,
21 NextOwnerMask int NULL,
22 GroupMask int NULL,
23 EveryoneMask int NULL,
24 BaseMask int NULL,
25 PositionX float(53) NULL,
26 PositionY float(53) NULL,
27 PositionZ float(53) NULL,
28 GroupPositionX float(53) NULL,
29 GroupPositionY float(53) NULL,
30 GroupPositionZ float(53) NULL,
31 VelocityX float(53) NULL,
32 VelocityY float(53) NULL,
33 VelocityZ float(53) NULL,
34 AngularVelocityX float(53) NULL,
35 AngularVelocityY float(53) NULL,
36 AngularVelocityZ float(53) NULL,
37 AccelerationX float(53) NULL,
38 AccelerationY float(53) NULL,
39 AccelerationZ float(53) NULL,
40 RotationX float(53) NULL,
41 RotationY float(53) NULL,
42 RotationZ float(53) NULL,
43 RotationW float(53) NULL,
44 SitTargetOffsetX float(53) NULL,
45 SitTargetOffsetY float(53) NULL,
46 SitTargetOffsetZ float(53) NULL,
47 SitTargetOrientW float(53) NULL,
48 SitTargetOrientX float(53) NULL,
49 SitTargetOrientY float(53) NULL,
50 SitTargetOrientZ float(53) NULL,
51 PayPrice int NOT NULL DEFAULT ((0)),
52 PayButton1 int NOT NULL DEFAULT ((0)),
53 PayButton2 int NOT NULL DEFAULT ((0)),
54 PayButton3 int NOT NULL DEFAULT ((0)),
55 PayButton4 int NOT NULL DEFAULT ((0)),
56 LoopedSound uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
57 LoopedSoundGain float(53) NOT NULL DEFAULT ((0.0)),
58 TextureAnimation image NULL,
59 OmegaX float(53) NOT NULL DEFAULT ((0.0)),
60 OmegaY float(53) NOT NULL DEFAULT ((0.0)),
61 OmegaZ float(53) NOT NULL DEFAULT ((0.0)),
62 CameraEyeOffsetX float(53) NOT NULL DEFAULT ((0.0)),
63 CameraEyeOffsetY float(53) NOT NULL DEFAULT ((0.0)),
64 CameraEyeOffsetZ float(53) NOT NULL DEFAULT ((0.0)),
65 CameraAtOffsetX float(53) NOT NULL DEFAULT ((0.0)),
66 CameraAtOffsetY float(53) NOT NULL DEFAULT ((0.0)),
67 CameraAtOffsetZ float(53) NOT NULL DEFAULT ((0.0)),
68 ForceMouselook tinyint NOT NULL DEFAULT ((0)),
69 ScriptAccessPin int NOT NULL DEFAULT ((0)),
70 AllowedDrop tinyint NOT NULL DEFAULT ((0)),
71 DieAtEdge tinyint NOT NULL DEFAULT ((0)),
72 SalePrice int NOT NULL DEFAULT ((10)),
73 SaleType tinyint NOT NULL DEFAULT ((0)),
74 ColorR int NOT NULL DEFAULT ((0)),
75 ColorG int NOT NULL DEFAULT ((0)),
76 ColorB int NOT NULL DEFAULT ((0)),
77 ColorA int NOT NULL DEFAULT ((0)),
78 ParticleSystem image NULL,
79 ClickAction tinyint NOT NULL DEFAULT ((0)),
80 Material tinyint NOT NULL DEFAULT ((3)),
81 CollisionSound uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
82 CollisionSoundVolume float(53) NOT NULL DEFAULT ((0.0)),
83 LinkNumber int NOT NULL DEFAULT ((0))
84 ) ON [PRIMARY]
85 TEXTIMAGE_ON [PRIMARY]
86
87IF EXISTS(SELECT * FROM dbo.prims)
88 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)
89 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)')
90
91DROP TABLE dbo.prims
92
93EXECUTE sp_rename N'dbo.Tmp_prims', N'prims', 'OBJECT'
94
95ALTER TABLE dbo.prims ADD CONSTRAINT
96 PK__prims__10566F31 PRIMARY KEY CLUSTERED
97 (
98 UUID
99 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
100
101
102CREATE NONCLUSTERED INDEX prims_regionuuid ON dbo.prims
103 (
104 RegionUUID
105 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
106
107CREATE NONCLUSTERED INDEX prims_parentid ON dbo.prims
108 (
109 ParentID
110 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
111
112COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/014_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/014_RegionStore.sql
deleted file mode 100644
index 02f6f55..0000000
--- a/OpenSim/Data/MSSQL/Resources/014_RegionStore.sql
+++ /dev/null
@@ -1,49 +0,0 @@
1BEGIN TRANSACTION
2
3CREATE TABLE dbo.Tmp_primshapes
4 (
5 UUID uniqueidentifier NOT NULL,
6 Shape int NULL,
7 ScaleX float(53) NULL,
8 ScaleY float(53) NULL,
9 ScaleZ float(53) NULL,
10 PCode int NULL,
11 PathBegin int NULL,
12 PathEnd int NULL,
13 PathScaleX int NULL,
14 PathScaleY int NULL,
15 PathShearX int NULL,
16 PathShearY int NULL,
17 PathSkew int NULL,
18 PathCurve int NULL,
19 PathRadiusOffset int NULL,
20 PathRevolutions int NULL,
21 PathTaperX int NULL,
22 PathTaperY int NULL,
23 PathTwist int NULL,
24 PathTwistBegin int NULL,
25 ProfileBegin int NULL,
26 ProfileEnd int NULL,
27 ProfileCurve int NULL,
28 ProfileHollow int NULL,
29 State int NULL,
30 Texture image NULL,
31 ExtraParams image NULL
32 ) ON [PRIMARY]
33 TEXTIMAGE_ON [PRIMARY]
34
35IF EXISTS(SELECT * FROM dbo.primshapes)
36 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)
37 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)')
38
39DROP TABLE dbo.primshapes
40
41EXECUTE sp_rename N'dbo.Tmp_primshapes', N'primshapes', 'OBJECT'
42
43ALTER TABLE dbo.primshapes ADD CONSTRAINT
44 PK__primshapes__0880433F PRIMARY KEY CLUSTERED
45 (
46 UUID
47 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
48
49COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/015_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/015_RegionStore.sql
deleted file mode 100644
index cbaaf88..0000000
--- a/OpenSim/Data/MSSQL/Resources/015_RegionStore.sql
+++ /dev/null
@@ -1,45 +0,0 @@
1BEGIN TRANSACTION
2
3CREATE TABLE dbo.Tmp_primitems
4 (
5 itemID uniqueidentifier NOT NULL,
6 primID uniqueidentifier NULL,
7 assetID uniqueidentifier NULL,
8 parentFolderID uniqueidentifier NULL,
9 invType int NULL,
10 assetType int NULL,
11 name varchar(255) NULL,
12 description varchar(255) NULL,
13 creationDate varchar(255) NULL,
14 creatorID uniqueidentifier NULL,
15 ownerID uniqueidentifier NULL,
16 lastOwnerID uniqueidentifier NULL,
17 groupID uniqueidentifier NULL,
18 nextPermissions int NULL,
19 currentPermissions int NULL,
20 basePermissions int NULL,
21 everyonePermissions int NULL,
22 groupPermissions int NULL,
23 flags int NOT NULL DEFAULT ((0))
24 ) ON [PRIMARY]
25
26IF EXISTS(SELECT * FROM dbo.primitems)
27 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)
28 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)')
29
30DROP TABLE dbo.primitems
31
32EXECUTE sp_rename N'dbo.Tmp_primitems', N'primitems', 'OBJECT'
33
34ALTER TABLE dbo.primitems ADD CONSTRAINT
35 PK__primitems__0A688BB1 PRIMARY KEY CLUSTERED
36 (
37 itemID
38 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
39
40CREATE NONCLUSTERED INDEX primitems_primid ON dbo.primitems
41 (
42 primID
43 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
44
45COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/016_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/016_RegionStore.sql
deleted file mode 100644
index e91da19..0000000
--- a/OpenSim/Data/MSSQL/Resources/016_RegionStore.sql
+++ /dev/null
@@ -1,19 +0,0 @@
1BEGIN TRANSACTION
2
3CREATE TABLE dbo.Tmp_terrain
4 (
5 RegionUUID uniqueidentifier NULL,
6 Revision int NULL,
7 Heightfield image NULL
8 ) ON [PRIMARY]
9 TEXTIMAGE_ON [PRIMARY]
10
11IF EXISTS(SELECT * FROM dbo.terrain)
12 EXEC('INSERT INTO dbo.Tmp_terrain (RegionUUID, Revision, Heightfield)
13 SELECT CONVERT(uniqueidentifier, RegionUUID), Revision, Heightfield FROM dbo.terrain WITH (HOLDLOCK TABLOCKX)')
14
15DROP TABLE dbo.terrain
16
17EXECUTE sp_rename N'dbo.Tmp_terrain', N'terrain', 'OBJECT'
18
19COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/017_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/017_RegionStore.sql
deleted file mode 100644
index 3d3dbc0..0000000
--- a/OpenSim/Data/MSSQL/Resources/017_RegionStore.sql
+++ /dev/null
@@ -1,56 +0,0 @@
1BEGIN TRANSACTION
2
3CREATE TABLE dbo.Tmp_land
4 (
5 UUID uniqueidentifier NOT NULL,
6 RegionUUID uniqueidentifier NULL,
7 LocalLandID int NULL,
8 Bitmap image NULL,
9 Name varchar(255) NULL,
10 Description varchar(255) NULL,
11 OwnerUUID uniqueidentifier NULL,
12 IsGroupOwned int NULL,
13 Area int NULL,
14 AuctionID int NULL,
15 Category int NULL,
16 ClaimDate int NULL,
17 ClaimPrice int NULL,
18 GroupUUID uniqueidentifier NULL,
19 SalePrice int NULL,
20 LandStatus int NULL,
21 LandFlags int NULL,
22 LandingType int NULL,
23 MediaAutoScale int NULL,
24 MediaTextureUUID uniqueidentifier NULL,
25 MediaURL varchar(255) NULL,
26 MusicURL varchar(255) NULL,
27 PassHours float(53) NULL,
28 PassPrice int NULL,
29 SnapshotUUID uniqueidentifier NULL,
30 UserLocationX float(53) NULL,
31 UserLocationY float(53) NULL,
32 UserLocationZ float(53) NULL,
33 UserLookAtX float(53) NULL,
34 UserLookAtY float(53) NULL,
35 UserLookAtZ float(53) NULL,
36 AuthbuyerID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
37 OtherCleanTime int NOT NULL DEFAULT ((0)),
38 Dwell int NOT NULL DEFAULT ((0))
39 ) ON [PRIMARY]
40 TEXTIMAGE_ON [PRIMARY]
41
42IF EXISTS(SELECT * FROM dbo.land)
43 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)
44 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)')
45
46DROP TABLE dbo.land
47
48EXECUTE sp_rename N'dbo.Tmp_land', N'land', 'OBJECT'
49
50ALTER TABLE dbo.land ADD CONSTRAINT
51 PK__land__65A475E71BFD2C07 PRIMARY KEY CLUSTERED
52 (
53 UUID
54 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
55
56COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/018_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/018_RegionStore.sql
deleted file mode 100644
index 6157e35..0000000
--- a/OpenSim/Data/MSSQL/Resources/018_RegionStore.sql
+++ /dev/null
@@ -1,18 +0,0 @@
1BEGIN TRANSACTION
2
3CREATE TABLE dbo.Tmp_landaccesslist
4 (
5 LandUUID uniqueidentifier NULL,
6 AccessUUID uniqueidentifier NULL,
7 Flags int NULL
8 ) ON [PRIMARY]
9
10IF EXISTS(SELECT * FROM dbo.landaccesslist)
11 EXEC('INSERT INTO dbo.Tmp_landaccesslist (LandUUID, AccessUUID, Flags)
12 SELECT CONVERT(uniqueidentifier, LandUUID), CONVERT(uniqueidentifier, AccessUUID), Flags FROM dbo.landaccesslist WITH (HOLDLOCK TABLOCKX)')
13
14DROP TABLE dbo.landaccesslist
15
16EXECUTE sp_rename N'dbo.Tmp_landaccesslist', N'landaccesslist', 'OBJECT'
17
18COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/019_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/019_RegionStore.sql
deleted file mode 100644
index 8e613b9..0000000
--- a/OpenSim/Data/MSSQL/Resources/019_RegionStore.sql
+++ /dev/null
@@ -1,19 +0,0 @@
1BEGIN TRANSACTION
2
3CREATE TABLE dbo.Tmp_regionban
4 (
5 regionUUID uniqueidentifier NOT NULL,
6 bannedUUID uniqueidentifier NOT NULL,
7 bannedIp varchar(16) NOT NULL,
8 bannedIpHostMask varchar(16) NOT NULL
9 ) ON [PRIMARY]
10
11IF EXISTS(SELECT * FROM dbo.regionban)
12 EXEC('INSERT INTO dbo.Tmp_regionban (regionUUID, bannedUUID, bannedIp, bannedIpHostMask)
13 SELECT CONVERT(uniqueidentifier, regionUUID), CONVERT(uniqueidentifier, bannedUUID), bannedIp, bannedIpHostMask FROM dbo.regionban WITH (HOLDLOCK TABLOCKX)')
14
15DROP TABLE dbo.regionban
16
17EXECUTE sp_rename N'dbo.Tmp_regionban', N'regionban', 'OBJECT'
18
19COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/020_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/020_RegionStore.sql
deleted file mode 100644
index 2ce91f6..0000000
--- a/OpenSim/Data/MSSQL/Resources/020_RegionStore.sql
+++ /dev/null
@@ -1,58 +0,0 @@
1BEGIN TRANSACTION
2
3CREATE TABLE dbo.Tmp_regionsettings
4 (
5 regionUUID uniqueidentifier NOT NULL,
6 block_terraform bit NOT NULL,
7 block_fly bit NOT NULL,
8 allow_damage bit NOT NULL,
9 restrict_pushing bit NOT NULL,
10 allow_land_resell bit NOT NULL,
11 allow_land_join_divide bit NOT NULL,
12 block_show_in_search bit NOT NULL,
13 agent_limit int NOT NULL,
14 object_bonus float(53) NOT NULL,
15 maturity int NOT NULL,
16 disable_scripts bit NOT NULL,
17 disable_collisions bit NOT NULL,
18 disable_physics bit NOT NULL,
19 terrain_texture_1 uniqueidentifier NOT NULL,
20 terrain_texture_2 uniqueidentifier NOT NULL,
21 terrain_texture_3 uniqueidentifier NOT NULL,
22 terrain_texture_4 uniqueidentifier NOT NULL,
23 elevation_1_nw float(53) NOT NULL,
24 elevation_2_nw float(53) NOT NULL,
25 elevation_1_ne float(53) NOT NULL,
26 elevation_2_ne float(53) NOT NULL,
27 elevation_1_se float(53) NOT NULL,
28 elevation_2_se float(53) NOT NULL,
29 elevation_1_sw float(53) NOT NULL,
30 elevation_2_sw float(53) NOT NULL,
31 water_height float(53) NOT NULL,
32 terrain_raise_limit float(53) NOT NULL,
33 terrain_lower_limit float(53) NOT NULL,
34 use_estate_sun bit NOT NULL,
35 fixed_sun bit NOT NULL,
36 sun_position float(53) NOT NULL,
37 covenant uniqueidentifier NULL DEFAULT (NULL),
38 Sandbox bit NOT NULL,
39 sunvectorx float(53) NOT NULL DEFAULT ((0)),
40 sunvectory float(53) NOT NULL DEFAULT ((0)),
41 sunvectorz float(53) NOT NULL DEFAULT ((0))
42 ) ON [PRIMARY]
43
44IF EXISTS(SELECT * FROM dbo.regionsettings)
45 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)
46 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)')
47
48DROP TABLE dbo.regionsettings
49
50EXECUTE sp_rename N'dbo.Tmp_regionsettings', N'regionsettings', 'OBJECT'
51
52ALTER TABLE dbo.regionsettings ADD CONSTRAINT
53 PK__regionse__5B35159D21B6055D PRIMARY KEY CLUSTERED
54 (
55 regionUUID
56 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
57
58COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/021_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/021_RegionStore.sql
deleted file mode 100644
index ac59182..0000000
--- a/OpenSim/Data/MSSQL/Resources/021_RegionStore.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN TRANSACTION
2
3ALTER TABLE prims ADD PassTouches bit not null default 0
4
5COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/022_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/022_RegionStore.sql
deleted file mode 100644
index 421e8d3..0000000
--- a/OpenSim/Data/MSSQL/Resources/022_RegionStore.sql
+++ /dev/null
@@ -1,7 +0,0 @@
1BEGIN TRANSACTION
2
3ALTER TABLE regionsettings ADD loaded_creation_date varchar(20)
4ALTER TABLE regionsettings ADD loaded_creation_time varchar(20)
5ALTER TABLE regionsettings ADD loaded_creation_id varchar(64)
6
7COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/023_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/023_RegionStore.sql
deleted file mode 100644
index 75a16f3..0000000
--- a/OpenSim/Data/MSSQL/Resources/023_RegionStore.sql
+++ /dev/null
@@ -1,7 +0,0 @@
1BEGIN TRANSACTION
2
3ALTER TABLE regionsettings DROP COLUMN loaded_creation_date
4ALTER TABLE regionsettings DROP COLUMN loaded_creation_time
5ALTER TABLE regionsettings ADD loaded_creation_datetime int NOT NULL default 0
6
7COMMIT
diff --git a/OpenSim/Data/MSSQL/Resources/AssetStore.migrations b/OpenSim/Data/MSSQL/Resources/AssetStore.migrations
new file mode 100644
index 0000000..beb82b9
--- /dev/null
+++ b/OpenSim/Data/MSSQL/Resources/AssetStore.migrations
@@ -0,0 +1,100 @@
1:VERSION 1
2
3CREATE TABLE [assets] (
4 [id] [varchar](36) NOT NULL,
5 [name] [varchar](64) NOT NULL,
6 [description] [varchar](64) NOT NULL,
7 [assetType] [tinyint] NOT NULL,
8 [local] [tinyint] NOT NULL,
9 [temporary] [tinyint] NOT NULL,
10 [data] [image] NOT NULL,
11PRIMARY KEY CLUSTERED
12(
13 [id] ASC
14)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
15) ON [PRIMARY]
16
17
18:VERSION 2
19
20BEGIN TRANSACTION
21
22CREATE TABLE Tmp_assets
23 (
24 id varchar(36) NOT NULL,
25 name varchar(64) NOT NULL,
26 description varchar(64) NOT NULL,
27 assetType tinyint NOT NULL,
28 local bit NOT NULL,
29 temporary bit NOT NULL,
30 data image NOT NULL
31 ) ON [PRIMARY]
32 TEXTIMAGE_ON [PRIMARY]
33
34IF EXISTS(SELECT * FROM assets)
35 EXEC('INSERT INTO Tmp_assets (id, name, description, assetType, local, temporary, data)
36 SELECT id, name, description, assetType, CONVERT(bit, local), CONVERT(bit, temporary), data FROM assets WITH (HOLDLOCK TABLOCKX)')
37
38DROP TABLE assets
39
40EXECUTE sp_rename N'Tmp_assets', N'assets', 'OBJECT'
41
42ALTER TABLE dbo.assets ADD CONSTRAINT
43 PK__assets__id PRIMARY KEY CLUSTERED
44 (
45 id
46 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
47
48COMMIT
49
50
51:VERSION 3
52
53BEGIN TRANSACTION
54
55ALTER TABLE assets add create_time integer default 0
56ALTER TABLE assets add access_time integer default 0
57
58COMMIT
59
60
61:VERSION 4
62
63BEGIN TRANSACTION
64
65CREATE TABLE dbo.Tmp_assets
66 (
67 id uniqueidentifier NOT NULL,
68 name varchar(64) NOT NULL,
69 description varchar(64) NOT NULL,
70 assetType tinyint NOT NULL,
71 local bit NOT NULL,
72 temporary bit NOT NULL,
73 data image NOT NULL,
74 create_time int NULL,
75 access_time int NULL
76 ) ON [PRIMARY]
77 TEXTIMAGE_ON [PRIMARY]
78
79IF EXISTS(SELECT * FROM dbo.assets)
80 EXEC('INSERT INTO dbo.Tmp_assets (id, name, description, assetType, local, temporary, data, create_time, access_time)
81 SELECT CONVERT(uniqueidentifier, id), name, description, assetType, local, temporary, data, create_time, access_time FROM dbo.assets WITH (HOLDLOCK TABLOCKX)')
82
83DROP TABLE assets
84
85EXECUTE sp_rename N'Tmp_assets', N'assets', 'OBJECT'
86
87ALTER TABLE dbo.assets ADD CONSTRAINT
88 PK__assets__id PRIMARY KEY CLUSTERED
89 (
90 id
91 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
92
93COMMIT
94
95
96:VERSION 5
97
98DELETE FROM assets WHERE id = 'dc4b9f0b-d008-45c6-96a4-01dd947ac621';
99
100
diff --git a/OpenSim/Data/MSSQL/Resources/001_AuthStore.sql b/OpenSim/Data/MSSQL/Resources/AuthStore.migrations
index c70a193..5b90ca3 100644
--- a/OpenSim/Data/MSSQL/Resources/001_AuthStore.sql
+++ b/OpenSim/Data/MSSQL/Resources/AuthStore.migrations
@@ -1,3 +1,5 @@
1:VERSION 1
2
1BEGIN TRANSACTION 3BEGIN TRANSACTION
2 4
3CREATE TABLE [auth] ( 5CREATE TABLE [auth] (
@@ -14,4 +16,13 @@ CREATE TABLE [tokens] (
14 [validity] [datetime] NOT NULL ) 16 [validity] [datetime] NOT NULL )
15 ON [PRIMARY] 17 ON [PRIMARY]
16 18
19COMMIT
20
21:VERSION 2
22
23BEGIN TRANSACTION
24
25INSERT 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;
26
27
17COMMIT \ No newline at end of file 28COMMIT \ No newline at end of file
diff --git a/OpenSim/Data/MSSQL/Resources/001_Avatar.sql b/OpenSim/Data/MSSQL/Resources/Avatar.migrations
index 48f4c00..759e939 100644
--- a/OpenSim/Data/MSSQL/Resources/001_Avatar.sql
+++ b/OpenSim/Data/MSSQL/Resources/Avatar.migrations
@@ -1,3 +1,5 @@
1:VERSION 1
2
1BEGIN TRANSACTION 3BEGIN TRANSACTION
2 4
3CREATE TABLE [Avatars] ( 5CREATE TABLE [Avatars] (
diff --git a/OpenSim/Data/MSSQL/Resources/EstateStore.migrations b/OpenSim/Data/MSSQL/Resources/EstateStore.migrations
new file mode 100644
index 0000000..64b2d2b
--- /dev/null
+++ b/OpenSim/Data/MSSQL/Resources/EstateStore.migrations
@@ -0,0 +1,334 @@
1:VERSION 1
2
3BEGIN TRANSACTION
4
5CREATE TABLE [dbo].[estate_managers](
6 [EstateID] [int] NOT NULL,
7 [uuid] [varchar](36) NOT NULL,
8 CONSTRAINT [PK_estate_managers] PRIMARY KEY CLUSTERED
9(
10 [EstateID] ASC
11)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
12) ON [PRIMARY];
13
14CREATE TABLE [dbo].[estate_groups](
15 [EstateID] [int] NOT NULL,
16 [uuid] [varchar](36) NOT NULL,
17 CONSTRAINT [PK_estate_groups] PRIMARY KEY CLUSTERED
18(
19 [EstateID] ASC
20)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
21) ON [PRIMARY];
22
23
24CREATE TABLE [dbo].[estate_users](
25 [EstateID] [int] NOT NULL,
26 [uuid] [varchar](36) NOT NULL,
27 CONSTRAINT [PK_estate_users] PRIMARY KEY CLUSTERED
28(
29 [EstateID] ASC
30)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
31) ON [PRIMARY];
32
33
34CREATE TABLE [dbo].[estateban](
35 [EstateID] [int] NOT NULL,
36 [bannedUUID] [varchar](36) NOT NULL,
37 [bannedIp] [varchar](16) NOT NULL,
38 [bannedIpHostMask] [varchar](16) NOT NULL,
39 [bannedNameMask] [varchar](64) NULL DEFAULT (NULL),
40 CONSTRAINT [PK_estateban] PRIMARY KEY CLUSTERED
41(
42 [EstateID] ASC
43)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
44) ON [PRIMARY];
45
46CREATE TABLE [dbo].[estate_settings](
47 [EstateID] [int] IDENTITY(1,100) NOT NULL,
48 [EstateName] [varchar](64) NULL DEFAULT (NULL),
49 [AbuseEmailToEstateOwner] [bit] NOT NULL,
50 [DenyAnonymous] [bit] NOT NULL,
51 [ResetHomeOnTeleport] [bit] NOT NULL,
52 [FixedSun] [bit] NOT NULL,
53 [DenyTransacted] [bit] NOT NULL,
54 [BlockDwell] [bit] NOT NULL,
55 [DenyIdentified] [bit] NOT NULL,
56 [AllowVoice] [bit] NOT NULL,
57 [UseGlobalTime] [bit] NOT NULL,
58 [PricePerMeter] [int] NOT NULL,
59 [TaxFree] [bit] NOT NULL,
60 [AllowDirectTeleport] [bit] NOT NULL,
61 [RedirectGridX] [int] NOT NULL,
62 [RedirectGridY] [int] NOT NULL,
63 [ParentEstateID] [int] NOT NULL,
64 [SunPosition] [float] NOT NULL,
65 [EstateSkipScripts] [bit] NOT NULL,
66 [BillableFactor] [float] NOT NULL,
67 [PublicAccess] [bit] NOT NULL,
68 [AbuseEmail] [varchar](255) NOT NULL,
69 [EstateOwner] [varchar](36) NOT NULL,
70 [DenyMinors] [bit] NOT NULL,
71 CONSTRAINT [PK_estate_settings] PRIMARY KEY CLUSTERED
72(
73 [EstateID] ASC
74)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
75) ON [PRIMARY];
76
77
78CREATE TABLE [dbo].[estate_map](
79 [RegionID] [varchar](36) NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
80 [EstateID] [int] NOT NULL,
81 CONSTRAINT [PK_estate_map] PRIMARY KEY CLUSTERED
82(
83 [RegionID] ASC
84)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
85) ON [PRIMARY];
86
87COMMIT
88
89:VERSION 2
90
91BEGIN TRANSACTION
92
93ALTER TABLE dbo.estate_managers DROP CONSTRAINT PK_estate_managers
94
95CREATE NONCLUSTERED INDEX IX_estate_managers ON dbo.estate_managers
96 (
97 EstateID
98 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
99
100ALTER TABLE dbo.estate_groups DROP CONSTRAINT PK_estate_groups
101
102CREATE NONCLUSTERED INDEX IX_estate_groups ON dbo.estate_groups
103 (
104 EstateID
105 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
106
107
108ALTER TABLE dbo.estate_users DROP CONSTRAINT PK_estate_users
109
110CREATE NONCLUSTERED INDEX IX_estate_users ON dbo.estate_users
111 (
112 EstateID
113 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
114
115COMMIT
116
117
118:VERSION 3
119
120BEGIN TRANSACTION
121
122CREATE TABLE dbo.Tmp_estateban
123 (
124 EstateID int NOT NULL,
125 bannedUUID varchar(36) NOT NULL,
126 bannedIp varchar(16) NULL,
127 bannedIpHostMask varchar(16) NULL,
128 bannedNameMask varchar(64) NULL
129 ) ON [PRIMARY]
130
131IF EXISTS(SELECT * FROM dbo.estateban)
132 EXEC('INSERT INTO dbo.Tmp_estateban (EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask)
133 SELECT EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask FROM dbo.estateban')
134
135DROP TABLE dbo.estateban
136
137EXECUTE sp_rename N'dbo.Tmp_estateban', N'estateban', 'OBJECT'
138
139CREATE NONCLUSTERED INDEX IX_estateban ON dbo.estateban
140 (
141 EstateID
142 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
143
144COMMIT
145
146
147:VERSION 4
148
149BEGIN TRANSACTION
150
151CREATE TABLE dbo.Tmp_estate_managers
152 (
153 EstateID int NOT NULL,
154 uuid uniqueidentifier NOT NULL
155 ) ON [PRIMARY]
156
157IF EXISTS(SELECT * FROM dbo.estate_managers)
158 EXEC('INSERT INTO dbo.Tmp_estate_managers (EstateID, uuid)
159 SELECT EstateID, CONVERT(uniqueidentifier, uuid) FROM dbo.estate_managers WITH (HOLDLOCK TABLOCKX)')
160
161DROP TABLE dbo.estate_managers
162
163EXECUTE sp_rename N'dbo.Tmp_estate_managers', N'estate_managers', 'OBJECT'
164
165CREATE NONCLUSTERED INDEX IX_estate_managers ON dbo.estate_managers
166 (
167 EstateID
168 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
169
170COMMIT
171
172
173:VERSION 5
174
175BEGIN TRANSACTION
176
177CREATE TABLE dbo.Tmp_estate_groups
178 (
179 EstateID int NOT NULL,
180 uuid uniqueidentifier NOT NULL
181 ) ON [PRIMARY]
182
183IF EXISTS(SELECT * FROM dbo.estate_groups)
184 EXEC('INSERT INTO dbo.Tmp_estate_groups (EstateID, uuid)
185 SELECT EstateID, CONVERT(uniqueidentifier, uuid) FROM dbo.estate_groups WITH (HOLDLOCK TABLOCKX)')
186
187DROP TABLE dbo.estate_groups
188
189EXECUTE sp_rename N'dbo.Tmp_estate_groups', N'estate_groups', 'OBJECT'
190
191CREATE NONCLUSTERED INDEX IX_estate_groups ON dbo.estate_groups
192 (
193 EstateID
194 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
195
196COMMIT
197
198
199:VERSION 6
200
201BEGIN TRANSACTION
202
203CREATE TABLE dbo.Tmp_estate_users
204 (
205 EstateID int NOT NULL,
206 uuid uniqueidentifier NOT NULL
207 ) ON [PRIMARY]
208
209IF EXISTS(SELECT * FROM dbo.estate_users)
210 EXEC('INSERT INTO dbo.Tmp_estate_users (EstateID, uuid)
211 SELECT EstateID, CONVERT(uniqueidentifier, uuid) FROM dbo.estate_users WITH (HOLDLOCK TABLOCKX)')
212
213DROP TABLE dbo.estate_users
214
215EXECUTE sp_rename N'dbo.Tmp_estate_users', N'estate_users', 'OBJECT'
216
217CREATE NONCLUSTERED INDEX IX_estate_users ON dbo.estate_users
218 (
219 EstateID
220 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
221
222COMMIT
223
224
225:VERSION 7
226
227BEGIN TRANSACTION
228
229CREATE TABLE dbo.Tmp_estateban
230 (
231 EstateID int NOT NULL,
232 bannedUUID uniqueidentifier NOT NULL,
233 bannedIp varchar(16) NULL,
234 bannedIpHostMask varchar(16) NULL,
235 bannedNameMask varchar(64) NULL
236 ) ON [PRIMARY]
237
238IF EXISTS(SELECT * FROM dbo.estateban)
239 EXEC('INSERT INTO dbo.Tmp_estateban (EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask)
240 SELECT EstateID, CONVERT(uniqueidentifier, bannedUUID), bannedIp, bannedIpHostMask, bannedNameMask FROM dbo.estateban WITH (HOLDLOCK TABLOCKX)')
241
242DROP TABLE dbo.estateban
243
244EXECUTE sp_rename N'dbo.Tmp_estateban', N'estateban', 'OBJECT'
245
246CREATE NONCLUSTERED INDEX IX_estateban ON dbo.estateban
247 (
248 EstateID
249 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
250
251COMMIT
252
253
254:VERSION 8
255
256BEGIN TRANSACTION
257
258CREATE TABLE dbo.Tmp_estate_settings
259 (
260 EstateID int NOT NULL IDENTITY (1, 100),
261 EstateName varchar(64) NULL DEFAULT (NULL),
262 AbuseEmailToEstateOwner bit NOT NULL,
263 DenyAnonymous bit NOT NULL,
264 ResetHomeOnTeleport bit NOT NULL,
265 FixedSun bit NOT NULL,
266 DenyTransacted bit NOT NULL,
267 BlockDwell bit NOT NULL,
268 DenyIdentified bit NOT NULL,
269 AllowVoice bit NOT NULL,
270 UseGlobalTime bit NOT NULL,
271 PricePerMeter int NOT NULL,
272 TaxFree bit NOT NULL,
273 AllowDirectTeleport bit NOT NULL,
274 RedirectGridX int NOT NULL,
275 RedirectGridY int NOT NULL,
276 ParentEstateID int NOT NULL,
277 SunPosition float(53) NOT NULL,
278 EstateSkipScripts bit NOT NULL,
279 BillableFactor float(53) NOT NULL,
280 PublicAccess bit NOT NULL,
281 AbuseEmail varchar(255) NOT NULL,
282 EstateOwner uniqueidentifier NOT NULL,
283 DenyMinors bit NOT NULL
284 ) ON [PRIMARY]
285
286SET IDENTITY_INSERT dbo.Tmp_estate_settings ON
287
288IF EXISTS(SELECT * FROM dbo.estate_settings)
289 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)
290 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)')
291
292SET IDENTITY_INSERT dbo.Tmp_estate_settings OFF
293
294DROP TABLE dbo.estate_settings
295
296EXECUTE sp_rename N'dbo.Tmp_estate_settings', N'estate_settings', 'OBJECT'
297
298ALTER TABLE dbo.estate_settings ADD CONSTRAINT
299 PK_estate_settings PRIMARY KEY CLUSTERED
300 (
301 EstateID
302 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
303
304COMMIT
305
306
307:VERSION 9
308
309BEGIN TRANSACTION
310
311CREATE TABLE dbo.Tmp_estate_map
312 (
313 RegionID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
314 EstateID int NOT NULL
315 ) ON [PRIMARY]
316
317IF EXISTS(SELECT * FROM dbo.estate_map)
318 EXEC('INSERT INTO dbo.Tmp_estate_map (RegionID, EstateID)
319 SELECT CONVERT(uniqueidentifier, RegionID), EstateID FROM dbo.estate_map WITH (HOLDLOCK TABLOCKX)')
320
321DROP TABLE dbo.estate_map
322
323EXECUTE sp_rename N'dbo.Tmp_estate_map', N'estate_map', 'OBJECT'
324
325ALTER TABLE dbo.estate_map ADD CONSTRAINT
326 PK_estate_map PRIMARY KEY CLUSTERED
327 (
328 RegionID
329 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
330
331
332COMMIT
333
334
diff --git a/OpenSim/Data/MSSQL/Resources/001_FriendsStore.sql b/OpenSim/Data/MSSQL/Resources/FriendsStore.migrations
index 94d240b..f981a91 100644
--- a/OpenSim/Data/MSSQL/Resources/001_FriendsStore.sql
+++ b/OpenSim/Data/MSSQL/Resources/FriendsStore.migrations
@@ -1,3 +1,5 @@
1:VERSION 1
2
1BEGIN TRANSACTION 3BEGIN TRANSACTION
2 4
3CREATE TABLE [Friends] ( 5CREATE TABLE [Friends] (
@@ -7,5 +9,12 @@ CREATE TABLE [Friends] (
7[Offered] varchar(32) NOT NULL DEFAULT 0) 9[Offered] varchar(32) NOT NULL DEFAULT 0)
8 ON [PRIMARY] 10 ON [PRIMARY]
9 11
12COMMIT
13
14:VERSION 2
15
16BEGIN TRANSACTION
17
18INSERT INTO Friends (PrincipalID, Friend, Flags, Offered) SELECT [ownerID], [friendID], [friendPerms], 0 FROM userfriends;
10 19
11COMMIT \ No newline at end of file 20COMMIT \ No newline at end of file
diff --git a/OpenSim/Data/MSSQL/Resources/GridStore.migrations b/OpenSim/Data/MSSQL/Resources/GridStore.migrations
new file mode 100644
index 0000000..d2ca27a
--- /dev/null
+++ b/OpenSim/Data/MSSQL/Resources/GridStore.migrations
@@ -0,0 +1,225 @@
1:VERSION 1
2
3BEGIN TRANSACTION
4
5CREATE TABLE [dbo].[regions](
6 [regionHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
7 [regionName] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
8 [uuid] [varchar](255) COLLATE Latin1_General_CI_AS NOT NULL,
9 [regionRecvKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
10 [regionSecret] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
11 [regionSendKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
12 [regionDataURI] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
13 [serverIP] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
14 [serverPort] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
15 [serverURI] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
16 [locX] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
17 [locY] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
18 [locZ] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
19 [eastOverrideHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
20 [westOverrideHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
21 [southOverrideHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
22 [northOverrideHandle] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
23 [regionAssetURI] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
24 [regionAssetRecvKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
25 [regionAssetSendKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
26 [regionUserURI] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
27 [regionUserRecvKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
28 [regionUserSendKey] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
29 [regionMapTexture] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
30 [serverHttpPort] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
31 [serverRemotingPort] [varchar](255) COLLATE Latin1_General_CI_AS NULL,
32 [owner_uuid] [varchar](36) COLLATE Latin1_General_CI_AS NULL,
33PRIMARY KEY CLUSTERED
34(
35 [uuid] ASC
36)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
37) ON [PRIMARY]
38
39COMMIT
40
41
42:VERSION 2
43
44BEGIN TRANSACTION
45
46CREATE TABLE Tmp_regions
47 (
48 uuid varchar(36) COLLATE Latin1_General_CI_AS NOT NULL,
49 regionHandle bigint NULL,
50 regionName varchar(20) NULL,
51 regionRecvKey varchar(128) NULL,
52 regionSendKey varchar(128) NULL,
53 regionSecret varchar(128) NULL,
54 regionDataURI varchar(128) NULL,
55 serverIP varchar(64) NULL,
56 serverPort int NULL,
57 serverURI varchar(255) NULL,
58 locX int NULL,
59 locY int NULL,
60 locZ int NULL,
61 eastOverrideHandle bigint NULL,
62 westOverrideHandle bigint NULL,
63 southOverrideHandle bigint NULL,
64 northOverrideHandle bigint NULL,
65 regionAssetURI varchar(255) NULL,
66 regionAssetRecvKey varchar(128) NULL,
67 regionAssetSendKey varchar(128) NULL,
68 regionUserURI varchar(255) NULL,
69 regionUserRecvKey varchar(128) NULL,
70 regionUserSendKey varchar(128) NULL,
71 regionMapTexture varchar(36) NULL,
72 serverHttpPort int NULL,
73 serverRemotingPort int NULL,
74 owner_uuid varchar(36) NULL,
75 originUUID varchar(36) NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000')
76 ) ON [PRIMARY]
77
78IF EXISTS(SELECT * FROM regions)
79 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)
80 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')
81
82DROP TABLE regions
83
84EXECUTE sp_rename N'Tmp_regions', N'regions', 'OBJECT'
85
86ALTER TABLE regions ADD CONSTRAINT
87 PK__regions__uuid PRIMARY KEY CLUSTERED
88 (
89 uuid
90 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
91
92COMMIT
93
94:VERSION 3
95
96BEGIN TRANSACTION
97
98CREATE NONCLUSTERED INDEX IX_regions_name ON dbo.regions
99 (
100 regionName
101 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
102
103CREATE NONCLUSTERED INDEX IX_regions_handle ON dbo.regions
104 (
105 regionHandle
106 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
107
108
109CREATE NONCLUSTERED INDEX IX_regions_override ON dbo.regions
110 (
111 eastOverrideHandle,
112 westOverrideHandle,
113 southOverrideHandle,
114 northOverrideHandle
115 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
116
117COMMIT
118
119
120:VERSION 4
121
122/* To prevent any potential data loss issues, you should review this script in detail before running it outside the context of the database designer.*/
123BEGIN TRANSACTION
124
125CREATE TABLE dbo.Tmp_regions
126 (
127 uuid uniqueidentifier NOT NULL,
128 regionHandle bigint NULL,
129 regionName varchar(20) NULL,
130 regionRecvKey varchar(128) NULL,
131 regionSendKey varchar(128) NULL,
132 regionSecret varchar(128) NULL,
133 regionDataURI varchar(128) NULL,
134 serverIP varchar(64) NULL,
135 serverPort int NULL,
136 serverURI varchar(255) NULL,
137 locX int NULL,
138 locY int NULL,
139 locZ int NULL,
140 eastOverrideHandle bigint NULL,
141 westOverrideHandle bigint NULL,
142 southOverrideHandle bigint NULL,
143 northOverrideHandle bigint NULL,
144 regionAssetURI varchar(255) NULL,
145 regionAssetRecvKey varchar(128) NULL,
146 regionAssetSendKey varchar(128) NULL,
147 regionUserURI varchar(255) NULL,
148 regionUserRecvKey varchar(128) NULL,
149 regionUserSendKey varchar(128) NULL,
150 regionMapTexture uniqueidentifier NULL,
151 serverHttpPort int NULL,
152 serverRemotingPort int NULL,
153 owner_uuid uniqueidentifier NOT NULL,
154 originUUID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000')
155 ) ON [PRIMARY]
156
157IF EXISTS(SELECT * FROM dbo.regions)
158 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)
159 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)')
160
161DROP TABLE dbo.regions
162
163EXECUTE sp_rename N'dbo.Tmp_regions', N'regions', 'OBJECT'
164
165ALTER TABLE dbo.regions ADD CONSTRAINT
166 PK__regions__uuid PRIMARY KEY CLUSTERED
167 (
168 uuid
169 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
170
171CREATE NONCLUSTERED INDEX IX_regions_name ON dbo.regions
172 (
173 regionName
174 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
175
176CREATE NONCLUSTERED INDEX IX_regions_handle ON dbo.regions
177 (
178 regionHandle
179 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
180
181CREATE NONCLUSTERED INDEX IX_regions_override ON dbo.regions
182 (
183 eastOverrideHandle,
184 westOverrideHandle,
185 southOverrideHandle,
186 northOverrideHandle
187 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
188
189COMMIT
190
191
192:VERSION 5
193
194BEGIN TRANSACTION
195
196ALTER TABLE regions ADD access int default 0;
197
198COMMIT
199
200
201:VERSION 6
202
203BEGIN TRANSACTION
204
205ALTER TABLE regions ADD scopeid uniqueidentifier default '00000000-0000-0000-0000-000000000000';
206ALTER TABLE regions ADD DEFAULT ('00000000-0000-0000-0000-000000000000') FOR [owner_uuid];
207ALTER TABLE regions ADD sizeX integer not null default 0;
208ALTER TABLE regions ADD sizeY integer not null default 0;
209
210COMMIT
211
212
213:VERSION 7
214
215BEGIN TRANSACTION
216
217ALTER TABLE regions ADD [flags] integer NOT NULL DEFAULT 0;
218CREATE INDEX [flags] ON regions(flags);
219ALTER TABLE [regions] ADD [last_seen] integer NOT NULL DEFAULT 0;
220ALTER TABLE [regions] ADD [PrincipalID] uniqueidentifier NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000';
221ALTER TABLE [regions] ADD [Token] varchar(255) NOT NULL DEFAULT 0;
222
223COMMIT
224
225
diff --git a/OpenSim/Data/MSSQL/Resources/InventoryStore.migrations b/OpenSim/Data/MSSQL/Resources/InventoryStore.migrations
new file mode 100644
index 0000000..cd5dfdc
--- /dev/null
+++ b/OpenSim/Data/MSSQL/Resources/InventoryStore.migrations
@@ -0,0 +1,174 @@
1:VERSION 1
2
3BEGIN TRANSACTION
4
5CREATE TABLE [inventoryfolders] (
6 [folderID] [varchar](36) NOT NULL default '',
7 [agentID] [varchar](36) default NULL,
8 [parentFolderID] [varchar](36) default NULL,
9 [folderName] [varchar](64) default NULL,
10 [type] [smallint] NOT NULL default 0,
11 [version] [int] NOT NULL default 0,
12 PRIMARY KEY CLUSTERED
13(
14 [folderID] ASC
15)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
16) ON [PRIMARY]
17
18CREATE NONCLUSTERED INDEX [owner] ON [inventoryfolders]
19(
20 [agentID] ASC
21)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]
22
23CREATE NONCLUSTERED INDEX [parent] ON [inventoryfolders]
24(
25 [parentFolderID] ASC
26)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]
27
28
29CREATE TABLE [inventoryitems] (
30 [inventoryID] [varchar](36) NOT NULL default '',
31 [assetID] [varchar](36) default NULL,
32 [assetType] [int] default NULL,
33 [parentFolderID] [varchar](36) default NULL,
34 [avatarID] [varchar](36) default NULL,
35 [inventoryName] [varchar](64) default NULL,
36 [inventoryDescription] [varchar](128) default NULL,
37 [inventoryNextPermissions] [int] default NULL,
38 [inventoryCurrentPermissions] [int] default NULL,
39 [invType] [int] default NULL,
40 [creatorID] [varchar](36) default NULL,
41 [inventoryBasePermissions] [int] NOT NULL default 0,
42 [inventoryEveryOnePermissions] [int] NOT NULL default 0,
43 [salePrice] [int] default NULL,
44 [saleType] [tinyint] default NULL,
45 [creationDate] [int] default NULL,
46 [groupID] [varchar](36) default NULL,
47 [groupOwned] [bit] default NULL,
48 [flags] [int] default NULL,
49 PRIMARY KEY CLUSTERED
50(
51 [inventoryID] ASC
52)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
53) ON [PRIMARY]
54
55
56CREATE NONCLUSTERED INDEX [owner] ON [inventoryitems]
57(
58 [avatarID] ASC
59)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]
60
61CREATE NONCLUSTERED INDEX [folder] ON [inventoryitems]
62(
63 [parentFolderID] ASC
64)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]
65
66COMMIT
67
68
69:VERSION 2
70
71BEGIN TRANSACTION
72
73ALTER TABLE inventoryitems ADD inventoryGroupPermissions INTEGER NOT NULL default 0
74
75COMMIT
76
77:VERSION 3
78
79/* To prevent any potential data loss issues, you should review this script in detail before running it outside the context of the database designer.*/
80BEGIN TRANSACTION
81
82CREATE TABLE dbo.Tmp_inventoryfolders
83 (
84 folderID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
85 agentID uniqueidentifier NULL DEFAULT (NULL),
86 parentFolderID uniqueidentifier NULL DEFAULT (NULL),
87 folderName varchar(64) NULL DEFAULT (NULL),
88 type smallint NOT NULL DEFAULT ((0)),
89 version int NOT NULL DEFAULT ((0))
90 ) ON [PRIMARY]
91
92IF EXISTS(SELECT * FROM dbo.inventoryfolders)
93 EXEC('INSERT INTO dbo.Tmp_inventoryfolders (folderID, agentID, parentFolderID, folderName, type, version)
94 SELECT CONVERT(uniqueidentifier, folderID), CONVERT(uniqueidentifier, agentID), CONVERT(uniqueidentifier, parentFolderID), folderName, type, version FROM dbo.inventoryfolders WITH (HOLDLOCK TABLOCKX)')
95
96DROP TABLE dbo.inventoryfolders
97
98EXECUTE sp_rename N'dbo.Tmp_inventoryfolders', N'inventoryfolders', 'OBJECT'
99
100ALTER TABLE dbo.inventoryfolders ADD CONSTRAINT
101 PK__inventor__C2FABFB3173876EA PRIMARY KEY CLUSTERED
102 (
103 folderID
104 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
105
106CREATE NONCLUSTERED INDEX owner ON dbo.inventoryfolders
107 (
108 agentID
109 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
110
111CREATE NONCLUSTERED INDEX parent ON dbo.inventoryfolders
112 (
113 parentFolderID
114 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
115
116COMMIT
117
118
119:VERSION 4
120
121BEGIN TRANSACTION
122
123CREATE TABLE dbo.Tmp_inventoryitems
124 (
125 inventoryID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
126 assetID uniqueidentifier NULL DEFAULT (NULL),
127 assetType int NULL DEFAULT (NULL),
128 parentFolderID uniqueidentifier NULL DEFAULT (NULL),
129 avatarID uniqueidentifier NULL DEFAULT (NULL),
130 inventoryName varchar(64) NULL DEFAULT (NULL),
131 inventoryDescription varchar(128) NULL DEFAULT (NULL),
132 inventoryNextPermissions int NULL DEFAULT (NULL),
133 inventoryCurrentPermissions int NULL DEFAULT (NULL),
134 invType int NULL DEFAULT (NULL),
135 creatorID uniqueidentifier NULL DEFAULT (NULL),
136 inventoryBasePermissions int NOT NULL DEFAULT ((0)),
137 inventoryEveryOnePermissions int NOT NULL DEFAULT ((0)),
138 salePrice int NULL DEFAULT (NULL),
139 saleType tinyint NULL DEFAULT (NULL),
140 creationDate int NULL DEFAULT (NULL),
141 groupID uniqueidentifier NULL DEFAULT (NULL),
142 groupOwned bit NULL DEFAULT (NULL),
143 flags int NULL DEFAULT (NULL),
144 inventoryGroupPermissions int NOT NULL DEFAULT ((0))
145 ) ON [PRIMARY]
146
147IF EXISTS(SELECT * FROM dbo.inventoryitems)
148 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)
149 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)')
150
151DROP TABLE dbo.inventoryitems
152
153EXECUTE sp_rename N'dbo.Tmp_inventoryitems', N'inventoryitems', 'OBJECT'
154
155ALTER TABLE dbo.inventoryitems ADD CONSTRAINT
156 PK__inventor__C4B7BC2220C1E124 PRIMARY KEY CLUSTERED
157 (
158 inventoryID
159 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
160
161
162CREATE NONCLUSTERED INDEX owner ON dbo.inventoryitems
163 (
164 avatarID
165 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
166
167CREATE NONCLUSTERED INDEX folder ON dbo.inventoryitems
168 (
169 parentFolderID
170 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
171
172COMMIT
173
174
diff --git a/OpenSim/Data/MSSQL/Resources/001_LogStore.sql b/OpenSim/Data/MSSQL/Resources/LogStore.migrations
index 9ece627..1430d8d 100644
--- a/OpenSim/Data/MSSQL/Resources/001_LogStore.sql
+++ b/OpenSim/Data/MSSQL/Resources/LogStore.migrations
@@ -1,3 +1,5 @@
1:VERSION 1
2
1BEGIN TRANSACTION 3BEGIN TRANSACTION
2 4
3CREATE TABLE [logs] ( 5CREATE TABLE [logs] (
diff --git a/OpenSim/Data/MSSQL/Resources/001_Presence.sql b/OpenSim/Data/MSSQL/Resources/Presence.migrations
index 877881c..35f78e1 100644
--- a/OpenSim/Data/MSSQL/Resources/001_Presence.sql
+++ b/OpenSim/Data/MSSQL/Resources/Presence.migrations
@@ -1,3 +1,5 @@
1:VERSION 1
2
1BEGIN TRANSACTION 3BEGIN TRANSACTION
2 4
3CREATE TABLE [Presence] ( 5CREATE TABLE [Presence] (
@@ -16,4 +18,13 @@ CREATE TABLE [Presence] (
16) 18)
17 ON [PRIMARY] 19 ON [PRIMARY]
18 20
21COMMIT
22
23:VERSION 2
24
25BEGIN TRANSACTION
26
27CREATE UNIQUE INDEX SessionID ON Presence(SessionID);
28CREATE INDEX UserID ON Presence(UserID);
29
19COMMIT \ No newline at end of file 30COMMIT \ No newline at end of file
diff --git a/OpenSim/Data/MSSQL/Resources/RegionStore.migrations b/OpenSim/Data/MSSQL/Resources/RegionStore.migrations
new file mode 100644
index 0000000..e912d64
--- /dev/null
+++ b/OpenSim/Data/MSSQL/Resources/RegionStore.migrations
@@ -0,0 +1,929 @@
1
2:VERSION 1
3
4CREATE TABLE [dbo].[prims](
5 [UUID] [varchar](255) NOT NULL,
6 [RegionUUID] [varchar](255) NULL,
7 [ParentID] [int] NULL,
8 [CreationDate] [int] NULL,
9 [Name] [varchar](255) NULL,
10 [SceneGroupID] [varchar](255) NULL,
11 [Text] [varchar](255) NULL,
12 [Description] [varchar](255) NULL,
13 [SitName] [varchar](255) NULL,
14 [TouchName] [varchar](255) NULL,
15 [ObjectFlags] [int] NULL,
16 [CreatorID] [varchar](255) NULL,
17 [OwnerID] [varchar](255) NULL,
18 [GroupID] [varchar](255) NULL,
19 [LastOwnerID] [varchar](255) NULL,
20 [OwnerMask] [int] NULL,
21 [NextOwnerMask] [int] NULL,
22 [GroupMask] [int] NULL,
23 [EveryoneMask] [int] NULL,
24 [BaseMask] [int] NULL,
25 [PositionX] [float] NULL,
26 [PositionY] [float] NULL,
27 [PositionZ] [float] NULL,
28 [GroupPositionX] [float] NULL,
29 [GroupPositionY] [float] NULL,
30 [GroupPositionZ] [float] NULL,
31 [VelocityX] [float] NULL,
32 [VelocityY] [float] NULL,
33 [VelocityZ] [float] NULL,
34 [AngularVelocityX] [float] NULL,
35 [AngularVelocityY] [float] NULL,
36 [AngularVelocityZ] [float] NULL,
37 [AccelerationX] [float] NULL,
38 [AccelerationY] [float] NULL,
39 [AccelerationZ] [float] NULL,
40 [RotationX] [float] NULL,
41 [RotationY] [float] NULL,
42 [RotationZ] [float] NULL,
43 [RotationW] [float] NULL,
44 [SitTargetOffsetX] [float] NULL,
45 [SitTargetOffsetY] [float] NULL,
46 [SitTargetOffsetZ] [float] NULL,
47 [SitTargetOrientW] [float] NULL,
48 [SitTargetOrientX] [float] NULL,
49 [SitTargetOrientY] [float] NULL,
50 [SitTargetOrientZ] [float] NULL,
51PRIMARY KEY CLUSTERED
52(
53 [UUID] ASC
54)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
55) ON [PRIMARY]
56
57CREATE TABLE [dbo].[primshapes](
58 [UUID] [varchar](255) NOT NULL,
59 [Shape] [int] NULL,
60 [ScaleX] [float] NULL,
61 [ScaleY] [float] NULL,
62 [ScaleZ] [float] NULL,
63 [PCode] [int] NULL,
64 [PathBegin] [int] NULL,
65 [PathEnd] [int] NULL,
66 [PathScaleX] [int] NULL,
67 [PathScaleY] [int] NULL,
68 [PathShearX] [int] NULL,
69 [PathShearY] [int] NULL,
70 [PathSkew] [int] NULL,
71 [PathCurve] [int] NULL,
72 [PathRadiusOffset] [int] NULL,
73 [PathRevolutions] [int] NULL,
74 [PathTaperX] [int] NULL,
75 [PathTaperY] [int] NULL,
76 [PathTwist] [int] NULL,
77 [PathTwistBegin] [int] NULL,
78 [ProfileBegin] [int] NULL,
79 [ProfileEnd] [int] NULL,
80 [ProfileCurve] [int] NULL,
81 [ProfileHollow] [int] NULL,
82 [State] [int] NULL,
83 [Texture] [image] NULL,
84 [ExtraParams] [image] NULL,
85PRIMARY KEY CLUSTERED
86(
87 [UUID] ASC
88)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
89) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
90
91CREATE TABLE [dbo].[primitems](
92 [itemID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
93 [primID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
94 [assetID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
95 [parentFolderID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
96 [invType] [int] NULL,
97 [assetType] [int] NULL,
98 [name] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
99 [description] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
100 [creationDate] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
101 [creatorID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
102 [ownerID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
103 [lastOwnerID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
104 [groupID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
105 [nextPermissions] [int] NULL,
106 [currentPermissions] [int] NULL,
107 [basePermissions] [int] NULL,
108 [everyonePermissions] [int] NULL,
109 [groupPermissions] [int] NULL,
110PRIMARY KEY CLUSTERED
111(
112 [itemID] ASC
113)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
114) ON [PRIMARY]
115
116CREATE TABLE [dbo].[terrain](
117 [RegionUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
118 [Revision] [int] NULL,
119 [Heightfield] [image] NULL
120) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
121
122CREATE TABLE [dbo].[land](
123 [UUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
124 [RegionUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
125 [LocalLandID] [int] NULL,
126 [Bitmap] [image] NULL,
127 [Name] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
128 [Description] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
129 [OwnerUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
130 [IsGroupOwned] [int] NULL,
131 [Area] [int] NULL,
132 [AuctionID] [int] NULL,
133 [Category] [int] NULL,
134 [ClaimDate] [int] NULL,
135 [ClaimPrice] [int] NULL,
136 [GroupUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
137 [SalePrice] [int] NULL,
138 [LandStatus] [int] NULL,
139 [LandFlags] [int] NULL,
140 [LandingType] [int] NULL,
141 [MediaAutoScale] [int] NULL,
142 [MediaTextureUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
143 [MediaURL] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
144 [MusicURL] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
145 [PassHours] [float] NULL,
146 [PassPrice] [int] NULL,
147 [SnapshotUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
148 [UserLocationX] [float] NULL,
149 [UserLocationY] [float] NULL,
150 [UserLocationZ] [float] NULL,
151 [UserLookAtX] [float] NULL,
152 [UserLookAtY] [float] NULL,
153 [UserLookAtZ] [float] NULL,
154PRIMARY KEY CLUSTERED
155(
156 [UUID] ASC
157)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
158) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
159
160CREATE TABLE [dbo].[landaccesslist](
161 [LandUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
162 [AccessUUID] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
163 [Flags] [int] NULL
164) ON [PRIMARY]
165
166:VERSION 2
167
168BEGIN TRANSACTION
169
170CREATE TABLE regionban (
171 [regionUUID] VARCHAR(36) NOT NULL,
172 [bannedUUID] VARCHAR(36) NOT NULL,
173 [bannedIp] VARCHAR(16) NOT NULL,
174 [bannedIpHostMask] VARCHAR(16) NOT NULL)
175
176create table [dbo].[regionsettings] (
177 [regionUUID] [varchar](36) not null,
178 [block_terraform] [bit] not null,
179 [block_fly] [bit] not null,
180 [allow_damage] [bit] not null,
181 [restrict_pushing] [bit] not null,
182 [allow_land_resell] [bit] not null,
183 [allow_land_join_divide] [bit] not null,
184 [block_show_in_search] [bit] not null,
185 [agent_limit] [int] not null,
186 [object_bonus] [float] not null,
187 [maturity] [int] not null,
188 [disable_scripts] [bit] not null,
189 [disable_collisions] [bit] not null,
190 [disable_physics] [bit] not null,
191 [terrain_texture_1] [varchar](36) not null,
192 [terrain_texture_2] [varchar](36) not null,
193 [terrain_texture_3] [varchar](36) not null,
194 [terrain_texture_4] [varchar](36) not null,
195 [elevation_1_nw] [float] not null,
196 [elevation_2_nw] [float] not null,
197 [elevation_1_ne] [float] not null,
198 [elevation_2_ne] [float] not null,
199 [elevation_1_se] [float] not null,
200 [elevation_2_se] [float] not null,
201 [elevation_1_sw] [float] not null,
202 [elevation_2_sw] [float] not null,
203 [water_height] [float] not null,
204 [terrain_raise_limit] [float] not null,
205 [terrain_lower_limit] [float] not null,
206 [use_estate_sun] [bit] not null,
207 [fixed_sun] [bit] not null,
208 [sun_position] [float] not null,
209 [covenant] [varchar](36) default NULL,
210 [Sandbox] [bit] NOT NULL,
211PRIMARY KEY CLUSTERED
212(
213 [regionUUID] ASC
214)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
215) ON [PRIMARY]
216
217COMMIT
218
219:VERSION 3
220
221BEGIN TRANSACTION
222
223CREATE TABLE dbo.Tmp_prims
224 (
225 UUID varchar(36) NOT NULL,
226 RegionUUID varchar(36) NULL,
227 ParentID int NULL,
228 CreationDate int NULL,
229 Name varchar(255) NULL,
230 SceneGroupID varchar(36) NULL,
231 Text varchar(255) NULL,
232 Description varchar(255) NULL,
233 SitName varchar(255) NULL,
234 TouchName varchar(255) NULL,
235 ObjectFlags int NULL,
236 CreatorID varchar(36) NULL,
237 OwnerID varchar(36) NULL,
238 GroupID varchar(36) NULL,
239 LastOwnerID varchar(36) NULL,
240 OwnerMask int NULL,
241 NextOwnerMask int NULL,
242 GroupMask int NULL,
243 EveryoneMask int NULL,
244 BaseMask int NULL,
245 PositionX float(53) NULL,
246 PositionY float(53) NULL,
247 PositionZ float(53) NULL,
248 GroupPositionX float(53) NULL,
249 GroupPositionY float(53) NULL,
250 GroupPositionZ float(53) NULL,
251 VelocityX float(53) NULL,
252 VelocityY float(53) NULL,
253 VelocityZ float(53) NULL,
254 AngularVelocityX float(53) NULL,
255 AngularVelocityY float(53) NULL,
256 AngularVelocityZ float(53) NULL,
257 AccelerationX float(53) NULL,
258 AccelerationY float(53) NULL,
259 AccelerationZ float(53) NULL,
260 RotationX float(53) NULL,
261 RotationY float(53) NULL,
262 RotationZ float(53) NULL,
263 RotationW float(53) NULL,
264 SitTargetOffsetX float(53) NULL,
265 SitTargetOffsetY float(53) NULL,
266 SitTargetOffsetZ float(53) NULL,
267 SitTargetOrientW float(53) NULL,
268 SitTargetOrientX float(53) NULL,
269 SitTargetOrientY float(53) NULL,
270 SitTargetOrientZ float(53) NULL
271 ) ON [PRIMARY]
272
273IF EXISTS(SELECT * FROM dbo.prims)
274 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)
275 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)')
276
277DROP TABLE dbo.prims
278
279EXECUTE sp_rename N'dbo.Tmp_prims', N'prims', 'OBJECT'
280
281ALTER TABLE dbo.prims ADD CONSTRAINT
282 PK__prims__10566F31 PRIMARY KEY CLUSTERED
283 (
284 UUID
285 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
286
287COMMIT
288
289:VERSION 4
290
291BEGIN TRANSACTION
292
293CREATE TABLE Tmp_primitems
294 (
295 itemID varchar(36) NOT NULL,
296 primID varchar(36) NULL,
297 assetID varchar(36) NULL,
298 parentFolderID varchar(36) NULL,
299 invType int NULL,
300 assetType int NULL,
301 name varchar(255) NULL,
302 description varchar(255) NULL,
303 creationDate varchar(255) NULL,
304 creatorID varchar(36) NULL,
305 ownerID varchar(36) NULL,
306 lastOwnerID varchar(36) NULL,
307 groupID varchar(36) NULL,
308 nextPermissions int NULL,
309 currentPermissions int NULL,
310 basePermissions int NULL,
311 everyonePermissions int NULL,
312 groupPermissions int NULL
313 ) ON [PRIMARY]
314
315IF EXISTS(SELECT * FROM primitems)
316 EXEC('INSERT INTO Tmp_primitems (itemID, primID, assetID, parentFolderID, invType, assetType, name, description, creationDate, creatorID, ownerID, lastOwnerID, groupID, nextPermissions, currentPermissions, basePermissions, everyonePermissions, groupPermissions)
317 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')
318
319DROP TABLE primitems
320
321EXECUTE sp_rename N'Tmp_primitems', N'primitems', 'OBJECT'
322
323ALTER TABLE primitems ADD CONSTRAINT
324 PK__primitems__0A688BB1 PRIMARY KEY CLUSTERED
325 (
326 itemID
327 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
328
329
330COMMIT
331
332
333:VERSION 5
334
335BEGIN TRANSACTION
336
337CREATE TABLE Tmp_primshapes
338 (
339 UUID varchar(36) NOT NULL,
340 Shape int NULL,
341 ScaleX float(53) NULL,
342 ScaleY float(53) NULL,
343 ScaleZ float(53) NULL,
344 PCode int NULL,
345 PathBegin int NULL,
346 PathEnd int NULL,
347 PathScaleX int NULL,
348 PathScaleY int NULL,
349 PathShearX int NULL,
350 PathShearY int NULL,
351 PathSkew int NULL,
352 PathCurve int NULL,
353 PathRadiusOffset int NULL,
354 PathRevolutions int NULL,
355 PathTaperX int NULL,
356 PathTaperY int NULL,
357 PathTwist int NULL,
358 PathTwistBegin int NULL,
359 ProfileBegin int NULL,
360 ProfileEnd int NULL,
361 ProfileCurve int NULL,
362 ProfileHollow int NULL,
363 State int NULL,
364 Texture image NULL,
365 ExtraParams image NULL
366 ) ON [PRIMARY]
367 TEXTIMAGE_ON [PRIMARY]
368
369IF EXISTS(SELECT * FROM primshapes)
370 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)
371 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)')
372
373DROP TABLE primshapes
374
375EXECUTE sp_rename N'Tmp_primshapes', N'primshapes', 'OBJECT'
376
377ALTER TABLE primshapes ADD CONSTRAINT
378 PK__primshapes__0880433F PRIMARY KEY CLUSTERED
379 (
380 UUID
381 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
382
383COMMIT
384
385
386:VERSION 6
387
388BEGIN TRANSACTION
389
390ALTER TABLE prims ADD PayPrice int not null default 0
391ALTER TABLE prims ADD PayButton1 int not null default 0
392ALTER TABLE prims ADD PayButton2 int not null default 0
393ALTER TABLE prims ADD PayButton3 int not null default 0
394ALTER TABLE prims ADD PayButton4 int not null default 0
395ALTER TABLE prims ADD LoopedSound varchar(36) not null default '00000000-0000-0000-0000-000000000000';
396ALTER TABLE prims ADD LoopedSoundGain float not null default 0.0;
397ALTER TABLE prims ADD TextureAnimation image
398ALTER TABLE prims ADD OmegaX float not null default 0.0
399ALTER TABLE prims ADD OmegaY float not null default 0.0
400ALTER TABLE prims ADD OmegaZ float not null default 0.0
401ALTER TABLE prims ADD CameraEyeOffsetX float not null default 0.0
402ALTER TABLE prims ADD CameraEyeOffsetY float not null default 0.0
403ALTER TABLE prims ADD CameraEyeOffsetZ float not null default 0.0
404ALTER TABLE prims ADD CameraAtOffsetX float not null default 0.0
405ALTER TABLE prims ADD CameraAtOffsetY float not null default 0.0
406ALTER TABLE prims ADD CameraAtOffsetZ float not null default 0.0
407ALTER TABLE prims ADD ForceMouselook tinyint not null default 0
408ALTER TABLE prims ADD ScriptAccessPin int not null default 0
409ALTER TABLE prims ADD AllowedDrop tinyint not null default 0
410ALTER TABLE prims ADD DieAtEdge tinyint not null default 0
411ALTER TABLE prims ADD SalePrice int not null default 10
412ALTER TABLE prims ADD SaleType tinyint not null default 0
413
414ALTER TABLE primitems add flags integer not null default 0
415
416ALTER TABLE land ADD AuthbuyerID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000'
417
418CREATE index prims_regionuuid on prims(RegionUUID)
419CREATE index prims_parentid on prims(ParentID)
420
421CREATE index primitems_primid on primitems(primID)
422
423COMMIT
424
425
426:VERSION 7
427
428BEGIN TRANSACTION
429
430ALTER TABLE prims ADD ColorR int not null default 0;
431ALTER TABLE prims ADD ColorG int not null default 0;
432ALTER TABLE prims ADD ColorB int not null default 0;
433ALTER TABLE prims ADD ColorA int not null default 0;
434ALTER TABLE prims ADD ParticleSystem IMAGE;
435ALTER TABLE prims ADD ClickAction tinyint NOT NULL default 0;
436
437COMMIT
438
439
440:VERSION 8
441
442BEGIN TRANSACTION
443
444ALTER TABLE land ADD OtherCleanTime integer NOT NULL default 0;
445ALTER TABLE land ADD Dwell integer NOT NULL default 0;
446
447COMMIT
448
449:VERSION 9
450
451BEGIN TRANSACTION
452
453ALTER TABLE prims ADD Material tinyint NOT NULL default 3
454
455COMMIT
456
457
458:VERSION 10
459
460BEGIN TRANSACTION
461
462ALTER TABLE regionsettings ADD sunvectorx float NOT NULL default 0;
463ALTER TABLE regionsettings ADD sunvectory float NOT NULL default 0;
464ALTER TABLE regionsettings ADD sunvectorz float NOT NULL default 0;
465
466COMMIT
467
468
469:VERSION 11
470
471BEGIN TRANSACTION
472
473ALTER TABLE prims ADD CollisionSound char(36) not null default '00000000-0000-0000-0000-000000000000'
474ALTER TABLE prims ADD CollisionSoundVolume float not null default 0.0
475
476COMMIT
477
478
479:VERSION 12
480
481BEGIN TRANSACTION
482
483ALTER TABLE prims ADD LinkNumber integer not null default 0
484
485COMMIT
486
487
488:VERSION 13
489
490BEGIN TRANSACTION
491
492CREATE TABLE dbo.Tmp_prims
493 (
494 UUID uniqueidentifier NOT NULL,
495 RegionUUID uniqueidentifier NULL,
496 ParentID int NULL,
497 CreationDate int NULL,
498 Name varchar(255) NULL,
499 SceneGroupID uniqueidentifier NULL,
500 Text varchar(255) NULL,
501 Description varchar(255) NULL,
502 SitName varchar(255) NULL,
503 TouchName varchar(255) NULL,
504 ObjectFlags int NULL,
505 CreatorID uniqueidentifier NULL,
506 OwnerID uniqueidentifier NULL,
507 GroupID uniqueidentifier NULL,
508 LastOwnerID uniqueidentifier NULL,
509 OwnerMask int NULL,
510 NextOwnerMask int NULL,
511 GroupMask int NULL,
512 EveryoneMask int NULL,
513 BaseMask int NULL,
514 PositionX float(53) NULL,
515 PositionY float(53) NULL,
516 PositionZ float(53) NULL,
517 GroupPositionX float(53) NULL,
518 GroupPositionY float(53) NULL,
519 GroupPositionZ float(53) NULL,
520 VelocityX float(53) NULL,
521 VelocityY float(53) NULL,
522 VelocityZ float(53) NULL,
523 AngularVelocityX float(53) NULL,
524 AngularVelocityY float(53) NULL,
525 AngularVelocityZ float(53) NULL,
526 AccelerationX float(53) NULL,
527 AccelerationY float(53) NULL,
528 AccelerationZ float(53) NULL,
529 RotationX float(53) NULL,
530 RotationY float(53) NULL,
531 RotationZ float(53) NULL,
532 RotationW float(53) NULL,
533 SitTargetOffsetX float(53) NULL,
534 SitTargetOffsetY float(53) NULL,
535 SitTargetOffsetZ float(53) NULL,
536 SitTargetOrientW float(53) NULL,
537 SitTargetOrientX float(53) NULL,
538 SitTargetOrientY float(53) NULL,
539 SitTargetOrientZ float(53) NULL,
540 PayPrice int NOT NULL DEFAULT ((0)),
541 PayButton1 int NOT NULL DEFAULT ((0)),
542 PayButton2 int NOT NULL DEFAULT ((0)),
543 PayButton3 int NOT NULL DEFAULT ((0)),
544 PayButton4 int NOT NULL DEFAULT ((0)),
545 LoopedSound uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
546 LoopedSoundGain float(53) NOT NULL DEFAULT ((0.0)),
547 TextureAnimation image NULL,
548 OmegaX float(53) NOT NULL DEFAULT ((0.0)),
549 OmegaY float(53) NOT NULL DEFAULT ((0.0)),
550 OmegaZ float(53) NOT NULL DEFAULT ((0.0)),
551 CameraEyeOffsetX float(53) NOT NULL DEFAULT ((0.0)),
552 CameraEyeOffsetY float(53) NOT NULL DEFAULT ((0.0)),
553 CameraEyeOffsetZ float(53) NOT NULL DEFAULT ((0.0)),
554 CameraAtOffsetX float(53) NOT NULL DEFAULT ((0.0)),
555 CameraAtOffsetY float(53) NOT NULL DEFAULT ((0.0)),
556 CameraAtOffsetZ float(53) NOT NULL DEFAULT ((0.0)),
557 ForceMouselook tinyint NOT NULL DEFAULT ((0)),
558 ScriptAccessPin int NOT NULL DEFAULT ((0)),
559 AllowedDrop tinyint NOT NULL DEFAULT ((0)),
560 DieAtEdge tinyint NOT NULL DEFAULT ((0)),
561 SalePrice int NOT NULL DEFAULT ((10)),
562 SaleType tinyint NOT NULL DEFAULT ((0)),
563 ColorR int NOT NULL DEFAULT ((0)),
564 ColorG int NOT NULL DEFAULT ((0)),
565 ColorB int NOT NULL DEFAULT ((0)),
566 ColorA int NOT NULL DEFAULT ((0)),
567 ParticleSystem image NULL,
568 ClickAction tinyint NOT NULL DEFAULT ((0)),
569 Material tinyint NOT NULL DEFAULT ((3)),
570 CollisionSound uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
571 CollisionSoundVolume float(53) NOT NULL DEFAULT ((0.0)),
572 LinkNumber int NOT NULL DEFAULT ((0))
573 ) ON [PRIMARY]
574 TEXTIMAGE_ON [PRIMARY]
575
576IF EXISTS(SELECT * FROM dbo.prims)
577 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)
578 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)')
579
580DROP TABLE dbo.prims
581
582EXECUTE sp_rename N'dbo.Tmp_prims', N'prims', 'OBJECT'
583
584ALTER TABLE dbo.prims ADD CONSTRAINT
585 PK__prims__10566F31 PRIMARY KEY CLUSTERED
586 (
587 UUID
588 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
589
590
591CREATE NONCLUSTERED INDEX prims_regionuuid ON dbo.prims
592 (
593 RegionUUID
594 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
595
596CREATE NONCLUSTERED INDEX prims_parentid ON dbo.prims
597 (
598 ParentID
599 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
600
601COMMIT
602
603
604:VERSION 14
605
606BEGIN TRANSACTION
607
608CREATE TABLE dbo.Tmp_primshapes
609 (
610 UUID uniqueidentifier NOT NULL,
611 Shape int NULL,
612 ScaleX float(53) NULL,
613 ScaleY float(53) NULL,
614 ScaleZ float(53) NULL,
615 PCode int NULL,
616 PathBegin int NULL,
617 PathEnd int NULL,
618 PathScaleX int NULL,
619 PathScaleY int NULL,
620 PathShearX int NULL,
621 PathShearY int NULL,
622 PathSkew int NULL,
623 PathCurve int NULL,
624 PathRadiusOffset int NULL,
625 PathRevolutions int NULL,
626 PathTaperX int NULL,
627 PathTaperY int NULL,
628 PathTwist int NULL,
629 PathTwistBegin int NULL,
630 ProfileBegin int NULL,
631 ProfileEnd int NULL,
632 ProfileCurve int NULL,
633 ProfileHollow int NULL,
634 State int NULL,
635 Texture image NULL,
636 ExtraParams image NULL
637 ) ON [PRIMARY]
638 TEXTIMAGE_ON [PRIMARY]
639
640IF EXISTS(SELECT * FROM dbo.primshapes)
641 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)
642 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)')
643
644DROP TABLE dbo.primshapes
645
646EXECUTE sp_rename N'dbo.Tmp_primshapes', N'primshapes', 'OBJECT'
647
648ALTER TABLE dbo.primshapes ADD CONSTRAINT
649 PK__primshapes__0880433F PRIMARY KEY CLUSTERED
650 (
651 UUID
652 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
653
654COMMIT
655
656
657:VERSION 15
658
659BEGIN TRANSACTION
660
661CREATE TABLE dbo.Tmp_primitems
662 (
663 itemID uniqueidentifier NOT NULL,
664 primID uniqueidentifier NULL,
665 assetID uniqueidentifier NULL,
666 parentFolderID uniqueidentifier NULL,
667 invType int NULL,
668 assetType int NULL,
669 name varchar(255) NULL,
670 description varchar(255) NULL,
671 creationDate varchar(255) NULL,
672 creatorID uniqueidentifier NULL,
673 ownerID uniqueidentifier NULL,
674 lastOwnerID uniqueidentifier NULL,
675 groupID uniqueidentifier NULL,
676 nextPermissions int NULL,
677 currentPermissions int NULL,
678 basePermissions int NULL,
679 everyonePermissions int NULL,
680 groupPermissions int NULL,
681 flags int NOT NULL DEFAULT ((0))
682 ) ON [PRIMARY]
683
684IF EXISTS(SELECT * FROM dbo.primitems)
685 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)
686 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)')
687
688DROP TABLE dbo.primitems
689
690EXECUTE sp_rename N'dbo.Tmp_primitems', N'primitems', 'OBJECT'
691
692ALTER TABLE dbo.primitems ADD CONSTRAINT
693 PK__primitems__0A688BB1 PRIMARY KEY CLUSTERED
694 (
695 itemID
696 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
697
698CREATE NONCLUSTERED INDEX primitems_primid ON dbo.primitems
699 (
700 primID
701 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
702
703COMMIT
704
705
706:VERSION 16
707
708
709BEGIN TRANSACTION
710
711CREATE TABLE dbo.Tmp_terrain
712 (
713 RegionUUID uniqueidentifier NULL,
714 Revision int NULL,
715 Heightfield image NULL
716 ) ON [PRIMARY]
717 TEXTIMAGE_ON [PRIMARY]
718
719IF EXISTS(SELECT * FROM dbo.terrain)
720 EXEC('INSERT INTO dbo.Tmp_terrain (RegionUUID, Revision, Heightfield)
721 SELECT CONVERT(uniqueidentifier, RegionUUID), Revision, Heightfield FROM dbo.terrain WITH (HOLDLOCK TABLOCKX)')
722
723DROP TABLE dbo.terrain
724
725EXECUTE sp_rename N'dbo.Tmp_terrain', N'terrain', 'OBJECT'
726
727COMMIT
728
729
730:VERSION 17
731
732BEGIN TRANSACTION
733
734CREATE TABLE dbo.Tmp_land
735 (
736 UUID uniqueidentifier NOT NULL,
737 RegionUUID uniqueidentifier NULL,
738 LocalLandID int NULL,
739 Bitmap image NULL,
740 Name varchar(255) NULL,
741 Description varchar(255) NULL,
742 OwnerUUID uniqueidentifier NULL,
743 IsGroupOwned int NULL,
744 Area int NULL,
745 AuctionID int NULL,
746 Category int NULL,
747 ClaimDate int NULL,
748 ClaimPrice int NULL,
749 GroupUUID uniqueidentifier NULL,
750 SalePrice int NULL,
751 LandStatus int NULL,
752 LandFlags int NULL,
753 LandingType int NULL,
754 MediaAutoScale int NULL,
755 MediaTextureUUID uniqueidentifier NULL,
756 MediaURL varchar(255) NULL,
757 MusicURL varchar(255) NULL,
758 PassHours float(53) NULL,
759 PassPrice int NULL,
760 SnapshotUUID uniqueidentifier NULL,
761 UserLocationX float(53) NULL,
762 UserLocationY float(53) NULL,
763 UserLocationZ float(53) NULL,
764 UserLookAtX float(53) NULL,
765 UserLookAtY float(53) NULL,
766 UserLookAtZ float(53) NULL,
767 AuthbuyerID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
768 OtherCleanTime int NOT NULL DEFAULT ((0)),
769 Dwell int NOT NULL DEFAULT ((0))
770 ) ON [PRIMARY]
771 TEXTIMAGE_ON [PRIMARY]
772
773IF EXISTS(SELECT * FROM dbo.land)
774 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)
775 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)')
776
777DROP TABLE dbo.land
778
779EXECUTE sp_rename N'dbo.Tmp_land', N'land', 'OBJECT'
780
781ALTER TABLE dbo.land ADD CONSTRAINT
782 PK__land__65A475E71BFD2C07 PRIMARY KEY CLUSTERED
783 (
784 UUID
785 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
786
787COMMIT
788
789
790
791:VERSION 18
792
793BEGIN TRANSACTION
794
795CREATE TABLE dbo.Tmp_landaccesslist
796 (
797 LandUUID uniqueidentifier NULL,
798 AccessUUID uniqueidentifier NULL,
799 Flags int NULL
800 ) ON [PRIMARY]
801
802IF EXISTS(SELECT * FROM dbo.landaccesslist)
803 EXEC('INSERT INTO dbo.Tmp_landaccesslist (LandUUID, AccessUUID, Flags)
804 SELECT CONVERT(uniqueidentifier, LandUUID), CONVERT(uniqueidentifier, AccessUUID), Flags FROM dbo.landaccesslist WITH (HOLDLOCK TABLOCKX)')
805
806DROP TABLE dbo.landaccesslist
807
808EXECUTE sp_rename N'dbo.Tmp_landaccesslist', N'landaccesslist', 'OBJECT'
809
810COMMIT
811
812
813
814:VERSION 19
815
816BEGIN TRANSACTION
817
818CREATE TABLE dbo.Tmp_regionban
819 (
820 regionUUID uniqueidentifier NOT NULL,
821 bannedUUID uniqueidentifier NOT NULL,
822 bannedIp varchar(16) NOT NULL,
823 bannedIpHostMask varchar(16) NOT NULL
824 ) ON [PRIMARY]
825
826IF EXISTS(SELECT * FROM dbo.regionban)
827 EXEC('INSERT INTO dbo.Tmp_regionban (regionUUID, bannedUUID, bannedIp, bannedIpHostMask)
828 SELECT CONVERT(uniqueidentifier, regionUUID), CONVERT(uniqueidentifier, bannedUUID), bannedIp, bannedIpHostMask FROM dbo.regionban WITH (HOLDLOCK TABLOCKX)')
829
830DROP TABLE dbo.regionban
831
832EXECUTE sp_rename N'dbo.Tmp_regionban', N'regionban', 'OBJECT'
833
834COMMIT
835
836
837:VERSION 20
838
839BEGIN TRANSACTION
840
841CREATE TABLE dbo.Tmp_regionsettings
842 (
843 regionUUID uniqueidentifier NOT NULL,
844 block_terraform bit NOT NULL,
845 block_fly bit NOT NULL,
846 allow_damage bit NOT NULL,
847 restrict_pushing bit NOT NULL,
848 allow_land_resell bit NOT NULL,
849 allow_land_join_divide bit NOT NULL,
850 block_show_in_search bit NOT NULL,
851 agent_limit int NOT NULL,
852 object_bonus float(53) NOT NULL,
853 maturity int NOT NULL,
854 disable_scripts bit NOT NULL,
855 disable_collisions bit NOT NULL,
856 disable_physics bit NOT NULL,
857 terrain_texture_1 uniqueidentifier NOT NULL,
858 terrain_texture_2 uniqueidentifier NOT NULL,
859 terrain_texture_3 uniqueidentifier NOT NULL,
860 terrain_texture_4 uniqueidentifier NOT NULL,
861 elevation_1_nw float(53) NOT NULL,
862 elevation_2_nw float(53) NOT NULL,
863 elevation_1_ne float(53) NOT NULL,
864 elevation_2_ne float(53) NOT NULL,
865 elevation_1_se float(53) NOT NULL,
866 elevation_2_se float(53) NOT NULL,
867 elevation_1_sw float(53) NOT NULL,
868 elevation_2_sw float(53) NOT NULL,
869 water_height float(53) NOT NULL,
870 terrain_raise_limit float(53) NOT NULL,
871 terrain_lower_limit float(53) NOT NULL,
872 use_estate_sun bit NOT NULL,
873 fixed_sun bit NOT NULL,
874 sun_position float(53) NOT NULL,
875 covenant uniqueidentifier NULL DEFAULT (NULL),
876 Sandbox bit NOT NULL,
877 sunvectorx float(53) NOT NULL DEFAULT ((0)),
878 sunvectory float(53) NOT NULL DEFAULT ((0)),
879 sunvectorz float(53) NOT NULL DEFAULT ((0))
880 ) ON [PRIMARY]
881
882IF EXISTS(SELECT * FROM dbo.regionsettings)
883 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)
884 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)')
885
886DROP TABLE dbo.regionsettings
887
888EXECUTE sp_rename N'dbo.Tmp_regionsettings', N'regionsettings', 'OBJECT'
889
890ALTER TABLE dbo.regionsettings ADD CONSTRAINT
891 PK__regionse__5B35159D21B6055D PRIMARY KEY CLUSTERED
892 (
893 regionUUID
894 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
895
896COMMIT
897
898
899:VERSION 21
900
901BEGIN TRANSACTION
902
903ALTER TABLE prims ADD PassTouches bit not null default 0
904
905COMMIT
906
907
908:VERSION 22
909
910BEGIN TRANSACTION
911
912ALTER TABLE regionsettings ADD loaded_creation_date varchar(20)
913ALTER TABLE regionsettings ADD loaded_creation_time varchar(20)
914ALTER TABLE regionsettings ADD loaded_creation_id varchar(64)
915
916COMMIT
917
918:VERSION 23
919
920BEGIN TRANSACTION
921
922ALTER TABLE regionsettings DROP COLUMN loaded_creation_date
923ALTER TABLE regionsettings DROP COLUMN loaded_creation_time
924ALTER TABLE regionsettings ADD loaded_creation_datetime int NOT NULL default 0
925
926COMMIT
927
928
929
diff --git a/OpenSim/Data/MSSQL/Resources/UserAccount.migrations b/OpenSim/Data/MSSQL/Resources/UserAccount.migrations
new file mode 100644
index 0000000..8534e23
--- /dev/null
+++ b/OpenSim/Data/MSSQL/Resources/UserAccount.migrations
@@ -0,0 +1,55 @@
1:VERSION 1
2
3CREATE TABLE [UserAccounts] (
4 [PrincipalID] uniqueidentifier NOT NULL,
5 [ScopeID] uniqueidentifier NOT NULL,
6 [FirstName] [varchar](64) NOT NULL,
7 [LastName] [varchar](64) NOT NULL,
8 [Email] [varchar](64) NULL,
9 [ServiceURLs] [text] NULL,
10 [Created] [int] default NULL,
11
12 PRIMARY KEY CLUSTERED
13(
14 [PrincipalID] ASC
15)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
16) ON [PRIMARY]
17
18
19:VERSION 2
20
21BEGIN TRANSACTION
22
23INSERT INTO UserAccounts (PrincipalID, ScopeID, FirstName, LastName, Email, ServiceURLs, Created) SELECT [UUID] AS PrincipalID, '00000000-0000-0000-0000-000000000000' AS ScopeID,
24username AS FirstName,
25lastname AS LastName,
26email as Email, (
27'AssetServerURI=' +
28userAssetURI + ' InventoryServerURI=' + userInventoryURI + ' GatewayURI= HomeURI=') AS ServiceURLs,
29created as Created FROM users;
30
31
32COMMIT
33
34:VERSION 3
35
36BEGIN TRANSACTION
37
38CREATE UNIQUE INDEX PrincipalID ON UserAccounts(PrincipalID);
39CREATE INDEX Email ON UserAccounts(Email);
40CREATE INDEX FirstName ON UserAccounts(FirstName);
41CREATE INDEX LastName ON UserAccounts(LastName);
42CREATE INDEX Name ON UserAccounts(FirstName,LastName);
43
44COMMIT
45
46:VERSION 4
47
48BEGIN TRANSACTION
49
50ALTER TABLE UserAccounts ADD UserLevel integer NOT NULL DEFAULT 0;
51ALTER TABLE UserAccounts ADD UserFlags integer NOT NULL DEFAULT 0;
52ALTER TABLE UserAccounts ADD UserTitle varchar(64) NOT NULL DEFAULT '';
53
54COMMIT
55
diff --git a/OpenSim/Data/MSSQL/Resources/UserStore.migrations b/OpenSim/Data/MSSQL/Resources/UserStore.migrations
new file mode 100644
index 0000000..050c544
--- /dev/null
+++ b/OpenSim/Data/MSSQL/Resources/UserStore.migrations
@@ -0,0 +1,421 @@
1:VERSION 1
2
3CREATE TABLE [users] (
4 [UUID] [varchar](36) NOT NULL default '',
5 [username] [varchar](32) NOT NULL,
6 [lastname] [varchar](32) NOT NULL,
7 [passwordHash] [varchar](32) NOT NULL,
8 [passwordSalt] [varchar](32) NOT NULL,
9 [homeRegion] [bigint] default NULL,
10 [homeLocationX] [float] default NULL,
11 [homeLocationY] [float] default NULL,
12 [homeLocationZ] [float] default NULL,
13 [homeLookAtX] [float] default NULL,
14 [homeLookAtY] [float] default NULL,
15 [homeLookAtZ] [float] default NULL,
16 [created] [int] NOT NULL,
17 [lastLogin] [int] NOT NULL,
18 [userInventoryURI] [varchar](255) default NULL,
19 [userAssetURI] [varchar](255) default NULL,
20 [profileCanDoMask] [int] default NULL,
21 [profileWantDoMask] [int] default NULL,
22 [profileAboutText] [ntext],
23 [profileFirstText] [ntext],
24 [profileImage] [varchar](36) default NULL,
25 [profileFirstImage] [varchar](36) default NULL,
26 [webLoginKey] [varchar](36) default NULL,
27 PRIMARY KEY CLUSTERED
28(
29 [UUID] ASC
30)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
31) ON [PRIMARY]
32
33
34CREATE NONCLUSTERED INDEX [usernames] ON [users]
35(
36 [username] ASC,
37 [lastname] ASC
38)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]
39
40
41CREATE TABLE [agents] (
42 [UUID] [varchar](36) NOT NULL,
43 [sessionID] [varchar](36) NOT NULL,
44 [secureSessionID] [varchar](36) NOT NULL,
45 [agentIP] [varchar](16) NOT NULL,
46 [agentPort] [int] NOT NULL,
47 [agentOnline] [tinyint] NOT NULL,
48 [loginTime] [int] NOT NULL,
49 [logoutTime] [int] NOT NULL,
50 [currentRegion] [varchar](36) NOT NULL,
51 [currentHandle] [bigint] NOT NULL,
52 [currentPos] [varchar](64) NOT NULL,
53 PRIMARY KEY CLUSTERED
54(
55 [UUID] ASC
56)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
57) ON [PRIMARY]
58
59
60CREATE NONCLUSTERED INDEX [session] ON [agents]
61(
62 [sessionID] ASC
63)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]
64
65CREATE NONCLUSTERED INDEX [ssession] ON [agents]
66(
67 [secureSessionID] ASC
68)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]
69
70
71CREATE TABLE [dbo].[userfriends](
72 [ownerID] [varchar](50) COLLATE Latin1_General_CI_AS NOT NULL,
73 [friendID] [varchar](50) COLLATE Latin1_General_CI_AS NOT NULL,
74 [friendPerms] [nvarchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
75 [datetimestamp] [nvarchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
76) ON [PRIMARY]
77
78CREATE TABLE [avatarappearance] (
79 [Owner] [varchar](36) NOT NULL,
80 [Serial] int NOT NULL,
81 [Visual_Params] [image] NOT NULL,
82 [Texture] [image] NOT NULL,
83 [Avatar_Height] float NOT NULL,
84 [Body_Item] [varchar](36) NOT NULL,
85 [Body_Asset] [varchar](36) NOT NULL,
86 [Skin_Item] [varchar](36) NOT NULL,
87 [Skin_Asset] [varchar](36) NOT NULL,
88 [Hair_Item] [varchar](36) NOT NULL,
89 [Hair_Asset] [varchar](36) NOT NULL,
90 [Eyes_Item] [varchar](36) NOT NULL,
91 [Eyes_Asset] [varchar](36) NOT NULL,
92 [Shirt_Item] [varchar](36) NOT NULL,
93 [Shirt_Asset] [varchar](36) NOT NULL,
94 [Pants_Item] [varchar](36) NOT NULL,
95 [Pants_Asset] [varchar](36) NOT NULL,
96 [Shoes_Item] [varchar](36) NOT NULL,
97 [Shoes_Asset] [varchar](36) NOT NULL,
98 [Socks_Item] [varchar](36) NOT NULL,
99 [Socks_Asset] [varchar](36) NOT NULL,
100 [Jacket_Item] [varchar](36) NOT NULL,
101 [Jacket_Asset] [varchar](36) NOT NULL,
102 [Gloves_Item] [varchar](36) NOT NULL,
103 [Gloves_Asset] [varchar](36) NOT NULL,
104 [Undershirt_Item] [varchar](36) NOT NULL,
105 [Undershirt_Asset] [varchar](36) NOT NULL,
106 [Underpants_Item] [varchar](36) NOT NULL,
107 [Underpants_Asset] [varchar](36) NOT NULL,
108 [Skirt_Item] [varchar](36) NOT NULL,
109 [Skirt_Asset] [varchar](36) NOT NULL,
110
111 PRIMARY KEY CLUSTERED (
112 [Owner]
113 ) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
114) ON [PRIMARY]
115
116:VERSION 2
117
118BEGIN TRANSACTION
119
120ALTER TABLE users ADD homeRegionID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000';
121ALTER TABLE users ADD userFlags int NOT NULL default 0;
122ALTER TABLE users ADD godLevel int NOT NULL default 0;
123ALTER TABLE users ADD customType varchar(32) not null default '';
124ALTER TABLE users ADD partner varchar(36) not null default '00000000-0000-0000-0000-000000000000';
125
126COMMIT
127
128
129:VERSION 3
130
131BEGIN TRANSACTION
132
133CREATE TABLE [avatarattachments] (
134 [UUID] varchar(36) NOT NULL
135 , [attachpoint] int NOT NULL
136 , [item] varchar(36) NOT NULL
137 , [asset] varchar(36) NOT NULL)
138
139CREATE NONCLUSTERED INDEX IX_avatarattachments ON dbo.avatarattachments
140 (
141 UUID
142 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
143
144
145COMMIT
146
147
148:VERSION 4
149
150BEGIN TRANSACTION
151
152CREATE TABLE Tmp_userfriends
153 (
154 ownerID varchar(36) NOT NULL,
155 friendID varchar(36) NOT NULL,
156 friendPerms int NOT NULL,
157 datetimestamp int NOT NULL
158 ) ON [PRIMARY]
159
160IF EXISTS(SELECT * FROM userfriends)
161 EXEC('INSERT INTO dbo.Tmp_userfriends (ownerID, friendID, friendPerms, datetimestamp)
162 SELECT CONVERT(varchar(36), ownerID), CONVERT(varchar(36), friendID), CONVERT(int, friendPerms), CONVERT(int, datetimestamp) FROM dbo.userfriends WITH (HOLDLOCK TABLOCKX)')
163
164DROP TABLE dbo.userfriends
165
166EXECUTE sp_rename N'Tmp_userfriends', N'userfriends', 'OBJECT'
167
168CREATE NONCLUSTERED INDEX IX_userfriends_ownerID ON userfriends
169 (
170 ownerID
171 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
172
173CREATE NONCLUSTERED INDEX IX_userfriends_friendID ON userfriends
174 (
175 friendID
176 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
177
178COMMIT
179
180
181:VERSION 5
182
183BEGIN TRANSACTION
184
185 ALTER TABLE users add email varchar(250);
186
187COMMIT
188
189
190:VERSION 6
191
192BEGIN TRANSACTION
193
194CREATE TABLE dbo.Tmp_users
195 (
196 UUID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
197 username varchar(32) NOT NULL,
198 lastname varchar(32) NOT NULL,
199 passwordHash varchar(32) NOT NULL,
200 passwordSalt varchar(32) NOT NULL,
201 homeRegion bigint NULL DEFAULT (NULL),
202 homeLocationX float(53) NULL DEFAULT (NULL),
203 homeLocationY float(53) NULL DEFAULT (NULL),
204 homeLocationZ float(53) NULL DEFAULT (NULL),
205 homeLookAtX float(53) NULL DEFAULT (NULL),
206 homeLookAtY float(53) NULL DEFAULT (NULL),
207 homeLookAtZ float(53) NULL DEFAULT (NULL),
208 created int NOT NULL,
209 lastLogin int NOT NULL,
210 userInventoryURI varchar(255) NULL DEFAULT (NULL),
211 userAssetURI varchar(255) NULL DEFAULT (NULL),
212 profileCanDoMask int NULL DEFAULT (NULL),
213 profileWantDoMask int NULL DEFAULT (NULL),
214 profileAboutText ntext NULL,
215 profileFirstText ntext NULL,
216 profileImage uniqueidentifier NULL DEFAULT (NULL),
217 profileFirstImage uniqueidentifier NULL DEFAULT (NULL),
218 webLoginKey uniqueidentifier NULL DEFAULT (NULL),
219 homeRegionID uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
220 userFlags int NOT NULL DEFAULT ((0)),
221 godLevel int NOT NULL DEFAULT ((0)),
222 customType varchar(32) NOT NULL DEFAULT (''),
223 partner uniqueidentifier NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000'),
224 email varchar(250) NULL
225 ) ON [PRIMARY]
226 TEXTIMAGE_ON [PRIMARY]
227
228IF EXISTS(SELECT * FROM dbo.users)
229 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)
230 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)')
231
232DROP TABLE dbo.users
233
234EXECUTE sp_rename N'dbo.Tmp_users', N'users', 'OBJECT'
235
236ALTER TABLE dbo.users ADD CONSTRAINT
237 PK__users__65A475E737A5467C PRIMARY KEY CLUSTERED
238 (
239 UUID
240 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
241
242CREATE NONCLUSTERED INDEX usernames ON dbo.users
243 (
244 username,
245 lastname
246 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
247
248COMMIT
249
250
251:VERSION 7
252
253BEGIN TRANSACTION
254
255CREATE TABLE dbo.Tmp_agents
256 (
257 UUID uniqueidentifier NOT NULL,
258 sessionID uniqueidentifier NOT NULL,
259 secureSessionID uniqueidentifier NOT NULL,
260 agentIP varchar(16) NOT NULL,
261 agentPort int NOT NULL,
262 agentOnline tinyint NOT NULL,
263 loginTime int NOT NULL,
264 logoutTime int NOT NULL,
265 currentRegion uniqueidentifier NOT NULL,
266 currentHandle bigint NOT NULL,
267 currentPos varchar(64) NOT NULL
268 ) ON [PRIMARY]
269
270IF EXISTS(SELECT * FROM dbo.agents)
271 EXEC('INSERT INTO dbo.Tmp_agents (UUID, sessionID, secureSessionID, agentIP, agentPort, agentOnline, loginTime, logoutTime, currentRegion, currentHandle, currentPos)
272 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)')
273
274DROP TABLE dbo.agents
275
276EXECUTE sp_rename N'dbo.Tmp_agents', N'agents', 'OBJECT'
277
278ALTER TABLE dbo.agents ADD CONSTRAINT
279 PK__agents__65A475E749C3F6B7 PRIMARY KEY CLUSTERED
280 (
281 UUID
282 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
283
284CREATE NONCLUSTERED INDEX session ON dbo.agents
285 (
286 sessionID
287 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
288
289CREATE NONCLUSTERED INDEX ssession ON dbo.agents
290 (
291 secureSessionID
292 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
293
294COMMIT
295
296
297:VERSION 8
298
299BEGIN TRANSACTION
300
301CREATE TABLE dbo.Tmp_userfriends
302 (
303 ownerID uniqueidentifier NOT NULL,
304 friendID uniqueidentifier NOT NULL,
305 friendPerms int NOT NULL,
306 datetimestamp int NOT NULL
307 ) ON [PRIMARY]
308
309IF EXISTS(SELECT * FROM dbo.userfriends)
310 EXEC('INSERT INTO dbo.Tmp_userfriends (ownerID, friendID, friendPerms, datetimestamp)
311 SELECT CONVERT(uniqueidentifier, ownerID), CONVERT(uniqueidentifier, friendID), friendPerms, datetimestamp FROM dbo.userfriends WITH (HOLDLOCK TABLOCKX)')
312
313DROP TABLE dbo.userfriends
314
315EXECUTE sp_rename N'dbo.Tmp_userfriends', N'userfriends', 'OBJECT'
316
317CREATE NONCLUSTERED INDEX IX_userfriends_ownerID ON dbo.userfriends
318 (
319 ownerID
320 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
321
322CREATE NONCLUSTERED INDEX IX_userfriends_friendID ON dbo.userfriends
323 (
324 friendID
325 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
326
327COMMIT
328
329
330:VERSION 9
331
332BEGIN TRANSACTION
333
334CREATE TABLE dbo.Tmp_avatarappearance
335 (
336 Owner uniqueidentifier NOT NULL,
337 Serial int NOT NULL,
338 Visual_Params image NOT NULL,
339 Texture image NOT NULL,
340 Avatar_Height float(53) NOT NULL,
341 Body_Item uniqueidentifier NOT NULL,
342 Body_Asset uniqueidentifier NOT NULL,
343 Skin_Item uniqueidentifier NOT NULL,
344 Skin_Asset uniqueidentifier NOT NULL,
345 Hair_Item uniqueidentifier NOT NULL,
346 Hair_Asset uniqueidentifier NOT NULL,
347 Eyes_Item uniqueidentifier NOT NULL,
348 Eyes_Asset uniqueidentifier NOT NULL,
349 Shirt_Item uniqueidentifier NOT NULL,
350 Shirt_Asset uniqueidentifier NOT NULL,
351 Pants_Item uniqueidentifier NOT NULL,
352 Pants_Asset uniqueidentifier NOT NULL,
353 Shoes_Item uniqueidentifier NOT NULL,
354 Shoes_Asset uniqueidentifier NOT NULL,
355 Socks_Item uniqueidentifier NOT NULL,
356 Socks_Asset uniqueidentifier NOT NULL,
357 Jacket_Item uniqueidentifier NOT NULL,
358 Jacket_Asset uniqueidentifier NOT NULL,
359 Gloves_Item uniqueidentifier NOT NULL,
360 Gloves_Asset uniqueidentifier NOT NULL,
361 Undershirt_Item uniqueidentifier NOT NULL,
362 Undershirt_Asset uniqueidentifier NOT NULL,
363 Underpants_Item uniqueidentifier NOT NULL,
364 Underpants_Asset uniqueidentifier NOT NULL,
365 Skirt_Item uniqueidentifier NOT NULL,
366 Skirt_Asset uniqueidentifier NOT NULL
367 ) ON [PRIMARY]
368 TEXTIMAGE_ON [PRIMARY]
369
370IF EXISTS(SELECT * FROM dbo.avatarappearance)
371 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)
372 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)')
373
374DROP TABLE dbo.avatarappearance
375
376EXECUTE sp_rename N'dbo.Tmp_avatarappearance', N'avatarappearance', 'OBJECT'
377
378ALTER TABLE dbo.avatarappearance ADD CONSTRAINT
379 PK__avatarap__7DD115CC4E88ABD4 PRIMARY KEY CLUSTERED
380 (
381 Owner
382 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
383
384COMMIT
385
386
387:VERSION 10
388
389BEGIN TRANSACTION
390
391CREATE TABLE dbo.Tmp_avatarattachments
392 (
393 UUID uniqueidentifier NOT NULL,
394 attachpoint int NOT NULL,
395 item uniqueidentifier NOT NULL,
396 asset uniqueidentifier NOT NULL
397 ) ON [PRIMARY]
398
399IF EXISTS(SELECT * FROM dbo.avatarattachments)
400 EXEC('INSERT INTO dbo.Tmp_avatarattachments (UUID, attachpoint, item, asset)
401 SELECT CONVERT(uniqueidentifier, UUID), attachpoint, CONVERT(uniqueidentifier, item), CONVERT(uniqueidentifier, asset) FROM dbo.avatarattachments WITH (HOLDLOCK TABLOCKX)')
402
403DROP TABLE dbo.avatarattachments
404
405EXECUTE sp_rename N'dbo.Tmp_avatarattachments', N'avatarattachments', 'OBJECT'
406
407CREATE NONCLUSTERED INDEX IX_avatarattachments ON dbo.avatarattachments
408 (
409 UUID
410 ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
411
412COMMIT
413
414
415:VERSION 11
416
417BEGIN TRANSACTION
418
419ALTER TABLE users ADD scopeID uniqueidentifier not null default '00000000-0000-0000-0000-000000000000'
420
421COMMIT