aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie2010-05-18 19:02:40 +0100
committerMelanie2010-05-18 19:03:16 +0100
commite260610c0096ac5323c32a7a593e5521997eb732 (patch)
tree5d936d6450d580cf24e133047df7ff8d759de557
parentAllow remote admin to be used on a different port from the main region port (diff)
parentMS SQL migrations converted to the new format (diff)
downloadopensim-SC_OLD-e260610c0096ac5323c32a7a593e5521997eb732.zip
opensim-SC_OLD-e260610c0096ac5323c32a7a593e5521997eb732.tar.gz
opensim-SC_OLD-e260610c0096ac5323c32a7a593e5521997eb732.tar.bz2
opensim-SC_OLD-e260610c0096ac5323c32a7a593e5521997eb732.tar.xz
Merge branch 'Migrations'
This merges AlexRa's work on migration streamlining. This merge is experimental. If it causes issues, feel free to back out. Signed-off-by: Melanie <melanie@t-data.com>
-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_Presence.sql6
-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
-rw-r--r--OpenSim/Data/Migration.cs337
-rw-r--r--OpenSim/Data/MySQL/MySQLMigrations.cs85
-rw-r--r--OpenSim/Data/MySQL/Resources/001_AssetStore.sql15
-rw-r--r--OpenSim/Data/MySQL/Resources/001_Avatar.sql5
-rw-r--r--OpenSim/Data/MySQL/Resources/001_Friends.sql9
-rw-r--r--OpenSim/Data/MySQL/Resources/001_FriendsStore.sql5
-rw-r--r--OpenSim/Data/MySQL/Resources/001_InventoryStore.sql40
-rw-r--r--OpenSim/Data/MySQL/Resources/001_Presence.sql13
-rw-r--r--OpenSim/Data/MySQL/Resources/001_RegionStore.sql154
-rw-r--r--OpenSim/Data/MySQL/Resources/001_UserAccount.sql13
-rw-r--r--OpenSim/Data/MySQL/Resources/002_AssetStore.sql9
-rw-r--r--OpenSim/Data/MySQL/Resources/002_AuthStore.sql5
-rw-r--r--OpenSim/Data/MySQL/Resources/002_Friends.sql5
-rw-r--r--OpenSim/Data/MySQL/Resources/002_FriendsStore.sql5
-rw-r--r--OpenSim/Data/MySQL/Resources/002_GridStore.sql5
-rw-r--r--OpenSim/Data/MySQL/Resources/002_InventoryStore.sql31
-rw-r--r--OpenSim/Data/MySQL/Resources/002_RegionStore.sql6
-rw-r--r--OpenSim/Data/MySQL/Resources/002_UserAccount.sql5
-rw-r--r--OpenSim/Data/MySQL/Resources/002_UserStore.sql5
-rw-r--r--OpenSim/Data/MySQL/Resources/003_AssetStore.sql9
-rw-r--r--OpenSim/Data/MySQL/Resources/003_AuthStore.sql5
-rw-r--r--OpenSim/Data/MySQL/Resources/003_GridStore.sql7
-rw-r--r--OpenSim/Data/MySQL/Resources/003_InventoryStore.sql5
-rw-r--r--OpenSim/Data/MySQL/Resources/003_RegionStore.sql5
-rw-r--r--OpenSim/Data/MySQL/Resources/003_UserAccount.sql9
-rw-r--r--OpenSim/Data/MySQL/Resources/003_UserStore.sql6
-rw-r--r--OpenSim/Data/MySQL/Resources/004_AssetStore.sql5
-rw-r--r--OpenSim/Data/MySQL/Resources/004_GridStore.sql6
-rw-r--r--OpenSim/Data/MySQL/Resources/004_InventoryStore.sql7
-rw-r--r--OpenSim/Data/MySQL/Resources/004_RegionStore.sql5
-rw-r--r--OpenSim/Data/MySQL/Resources/004_UserAccount.sql8
-rw-r--r--OpenSim/Data/MySQL/Resources/004_UserStore.sql6
-rw-r--r--OpenSim/Data/MySQL/Resources/005_AssetStore.sql6
-rw-r--r--OpenSim/Data/MySQL/Resources/005_GridStore.sql6
-rw-r--r--OpenSim/Data/MySQL/Resources/005_RegionStore.sql40
-rw-r--r--OpenSim/Data/MySQL/Resources/005_UserStore.sql5
-rw-r--r--OpenSim/Data/MySQL/Resources/006_AssetStore.sql1
-rw-r--r--OpenSim/Data/MySQL/Resources/006_GridStore.sql5
-rw-r--r--OpenSim/Data/MySQL/Resources/006_RegionStore.sql12
-rw-r--r--OpenSim/Data/MySQL/Resources/006_UserStore.sql5
-rw-r--r--OpenSim/Data/MySQL/Resources/007_GridStore.sql7
-rw-r--r--OpenSim/Data/MySQL/Resources/007_RegionStore.sql25
-rw-r--r--OpenSim/Data/MySQL/Resources/007_UserStore.sql5
-rw-r--r--OpenSim/Data/MySQL/Resources/008_RegionStore.sql9
-rw-r--r--OpenSim/Data/MySQL/Resources/008_UserStore.sql5
-rw-r--r--OpenSim/Data/MySQL/Resources/009_RegionStore.sql31
-rw-r--r--OpenSim/Data/MySQL/Resources/010_RegionStore.sql9
-rw-r--r--OpenSim/Data/MySQL/Resources/011_RegionStore.sql9
-rw-r--r--OpenSim/Data/MySQL/Resources/012_RegionStore.sql5
-rw-r--r--OpenSim/Data/MySQL/Resources/013_RegionStore.sql103
-rw-r--r--OpenSim/Data/MySQL/Resources/014_RegionStore.sql8
-rw-r--r--OpenSim/Data/MySQL/Resources/015_RegionStore.sql6
-rw-r--r--OpenSim/Data/MySQL/Resources/016_RegionStore.sql27
-rw-r--r--OpenSim/Data/MySQL/Resources/017_RegionStore.sql9
-rw-r--r--OpenSim/Data/MySQL/Resources/018_RegionStore.sql6
-rw-r--r--OpenSim/Data/MySQL/Resources/019_RegionStore.sql6
-rw-r--r--OpenSim/Data/MySQL/Resources/020_RegionStore.sql7
-rw-r--r--OpenSim/Data/MySQL/Resources/021_RegionStore.sql8
-rw-r--r--OpenSim/Data/MySQL/Resources/022_RegionStore.sql6
-rw-r--r--OpenSim/Data/MySQL/Resources/023_RegionStore.sql6
-rw-r--r--OpenSim/Data/MySQL/Resources/024_RegionStore.sql18
-rw-r--r--OpenSim/Data/MySQL/Resources/025_RegionStore.sql46
-rw-r--r--OpenSim/Data/MySQL/Resources/026_RegionStore.sql41
-rw-r--r--OpenSim/Data/MySQL/Resources/027_RegionStore.sql5
-rw-r--r--OpenSim/Data/MySQL/Resources/028_RegionStore.sql79
-rw-r--r--OpenSim/Data/MySQL/Resources/029_RegionStore.sql5
-rw-r--r--OpenSim/Data/MySQL/Resources/030_RegionStore.sql7
-rw-r--r--OpenSim/Data/MySQL/Resources/031_RegionStore.sql7
-rw-r--r--OpenSim/Data/MySQL/Resources/032_RegionStore.sql3
-rw-r--r--OpenSim/Data/MySQL/Resources/AssetStore.migrations69
-rw-r--r--OpenSim/Data/MySQL/Resources/AuthStore.migrations (renamed from OpenSim/Data/MySQL/Resources/001_AuthStore.sql)18
-rw-r--r--OpenSim/Data/MySQL/Resources/Avatar.migrations12
-rw-r--r--OpenSim/Data/MySQL/Resources/FriendsStore.migrations25
-rw-r--r--OpenSim/Data/MySQL/Resources/GridStore.migrations (renamed from OpenSim/Data/MySQL/Resources/001_GridStore.sql)57
-rw-r--r--OpenSim/Data/MySQL/Resources/InventoryStore.migrations93
-rw-r--r--OpenSim/Data/MySQL/Resources/LogStore.migrations (renamed from OpenSim/Data/MySQL/Resources/001_LogStore.sql)3
-rw-r--r--OpenSim/Data/MySQL/Resources/Presence.migrations36
-rw-r--r--OpenSim/Data/MySQL/Resources/RegionStore.migrations806
-rw-r--r--OpenSim/Data/MySQL/Resources/UserAccount.migrations47
-rw-r--r--OpenSim/Data/MySQL/Resources/UserStore.migrations (renamed from OpenSim/Data/MySQL/Resources/001_UserStore.sql)63
-rw-r--r--OpenSim/Data/SQLite/Resources/001_AssetStore.sql12
-rw-r--r--OpenSim/Data/SQLite/Resources/001_InventoryStore.sql32
-rw-r--r--OpenSim/Data/SQLite/Resources/001_RegionStore.sql144
-rw-r--r--OpenSim/Data/SQLite/Resources/001_UserStore.sql39
-rw-r--r--OpenSim/Data/SQLite/Resources/002_AssetStore.sql10
-rw-r--r--OpenSim/Data/SQLite/Resources/002_AuthStore.sql5
-rw-r--r--OpenSim/Data/SQLite/Resources/002_FriendsStore.sql5
-rw-r--r--OpenSim/Data/SQLite/Resources/002_InventoryStore.sql8
-rw-r--r--OpenSim/Data/SQLite/Resources/002_RegionStore.sql10
-rw-r--r--OpenSim/Data/SQLite/Resources/002_UserAccount.sql5
-rw-r--r--OpenSim/Data/SQLite/Resources/002_UserStore.sql5
-rw-r--r--OpenSim/Data/SQLite/Resources/003_AssetStore.sql1
-rw-r--r--OpenSim/Data/SQLite/Resources/003_InventoryStore.sql5
-rw-r--r--OpenSim/Data/SQLite/Resources/003_RegionStore.sql5
-rw-r--r--OpenSim/Data/SQLite/Resources/003_UserStore.sql6
-rw-r--r--OpenSim/Data/SQLite/Resources/004_AssetStore.sql7
-rw-r--r--OpenSim/Data/SQLite/Resources/004_RegionStore.sql38
-rw-r--r--OpenSim/Data/SQLite/Resources/004_UserStore.sql6
-rw-r--r--OpenSim/Data/SQLite/Resources/005_RegionStore.sql5
-rw-r--r--OpenSim/Data/SQLite/Resources/005_UserStore.sql5
-rw-r--r--OpenSim/Data/SQLite/Resources/006_RegionStore.sql102
-rw-r--r--OpenSim/Data/SQLite/Resources/006_UserStore.sql20
-rw-r--r--OpenSim/Data/SQLite/Resources/007_RegionStore.sql8
-rw-r--r--OpenSim/Data/SQLite/Resources/007_UserStore.sql7
-rw-r--r--OpenSim/Data/SQLite/Resources/008_RegionStore.sql6
-rw-r--r--OpenSim/Data/SQLite/Resources/008_UserStore.sql5
-rw-r--r--OpenSim/Data/SQLite/Resources/009_RegionStore.sql8
-rw-r--r--OpenSim/Data/SQLite/Resources/009_UserStore.sql11
-rw-r--r--OpenSim/Data/SQLite/Resources/010_RegionStore.sql5
-rw-r--r--OpenSim/Data/SQLite/Resources/010_UserStore.sql37
-rw-r--r--OpenSim/Data/SQLite/Resources/011_RegionStore.sql28
-rw-r--r--OpenSim/Data/SQLite/Resources/012_RegionStore.sql5
-rw-r--r--OpenSim/Data/SQLite/Resources/013_RegionStore.sql6
-rw-r--r--OpenSim/Data/SQLite/Resources/014_RegionStore.sql8
-rw-r--r--OpenSim/Data/SQLite/Resources/015_RegionStore.sql6
-rw-r--r--OpenSim/Data/SQLite/Resources/016_RegionStore.sql5
-rw-r--r--OpenSim/Data/SQLite/Resources/017_RegionStore.sql8
-rw-r--r--OpenSim/Data/SQLite/Resources/018_RegionStore.sql79
-rw-r--r--OpenSim/Data/SQLite/Resources/AssetStore.migrations42
-rw-r--r--OpenSim/Data/SQLite/Resources/AuthStore.migrations (renamed from OpenSim/Data/SQLite/Resources/001_AuthStore.sql)11
-rw-r--r--OpenSim/Data/SQLite/Resources/Avatar.migrations (renamed from OpenSim/Data/SQLite/Resources/001_Avatar.sql)2
-rw-r--r--OpenSim/Data/SQLite/Resources/FriendsStore.migrations (renamed from OpenSim/Data/SQLite/Resources/001_FriendsStore.sql)10
-rw-r--r--OpenSim/Data/SQLite/Resources/InventoryStore.migrations (renamed from OpenSim/Data/SQLite/Resources/004_InventoryStore.sql)56
-rw-r--r--OpenSim/Data/SQLite/Resources/RegionStore.migrations526
-rw-r--r--OpenSim/Data/SQLite/Resources/UserAccount.migrations (renamed from OpenSim/Data/SQLite/Resources/001_UserAccount.sql)14
-rw-r--r--OpenSim/Data/SQLite/Resources/UserStore.migrations169
-rw-r--r--bin/MySql.Data.dllbin294912 -> 335872 bytes
205 files changed, 4647 insertions, 3829 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_Presence.sql b/OpenSim/Data/MSSQL/Resources/002_Presence.sql
deleted file mode 100644
index a67671d..0000000
--- a/OpenSim/Data/MSSQL/Resources/002_Presence.sql
+++ /dev/null
@@ -1,6 +0,0 @@
1BEGIN TRANSACTION
2
3CREATE UNIQUE INDEX SessionID ON Presence(SessionID);
4CREATE INDEX UserID ON Presence(UserID);
5
6COMMIT \ 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
diff --git a/OpenSim/Data/Migration.cs b/OpenSim/Data/Migration.cs
index 06defe4..7980c35 100644
--- a/OpenSim/Data/Migration.cs
+++ b/OpenSim/Data/Migration.cs
@@ -70,61 +70,111 @@ namespace OpenSim.Data
70 70
71 public class Migration 71 public class Migration
72 { 72 {
73 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 73 protected static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
74 74
75 private string _type; 75 protected string _type;
76 private DbConnection _conn; 76 protected DbConnection _conn;
77 // private string _subtype; 77 protected Assembly _assem;
78 private Assembly _assem;
79 private Regex _match;
80 78
81 private static readonly string _migrations_create = "create table migrations(name varchar(100), version int)"; 79 private Regex _match_old;
82 // private static readonly string _migrations_init = "insert into migrations values('migrations', 1)"; 80 private Regex _match_new;
83 // private static readonly string _migrations_find = "select version from migrations where name='migrations'";
84 81
82 /// <summary>Have the parameterless constructor just so we can specify it as a generic parameter with the new() constraint.
83 /// Currently this is only used in the tests. A Migration instance created this way must be then
84 /// initialized with Initialize(). Regular creation should be through the parameterized constructors.
85 /// </summary>
86 public Migration()
87 {
88 }
85 89
86 public Migration(DbConnection conn, Assembly assem, string type) 90 public Migration(DbConnection conn, Assembly assem, string subtype, string type)
87 { 91 {
88 _type = type; 92 Initialize(conn, assem, type, subtype);
89 _conn = conn;
90 _assem = assem;
91 _match = new Regex(@"\.(\d\d\d)_" + _type + @"\.sql");
92 Initialize();
93 } 93 }
94 94
95 public Migration(DbConnection conn, Assembly assem, string subtype, string type) 95 public Migration(DbConnection conn, Assembly assem, string type)
96 {
97 Initialize(conn, assem, type, "");
98 }
99
100 /// <summary>Must be called after creating with the parameterless constructor.
101 /// NOTE that the Migration class now doesn't access database in any way during initialization.
102 /// Specifically, it won't check if the [migrations] table exists. Such checks are done later:
103 /// automatically on Update(), or you can explicitly call InitMigrationsTable().
104 /// </summary>
105 /// <param name="conn"></param>
106 /// <param name="assem"></param>
107 /// <param name="subtype"></param>
108 /// <param name="type"></param>
109 public void Initialize (DbConnection conn, Assembly assem, string type, string subtype)
96 { 110 {
97 _type = type; 111 _type = type;
98 _conn = conn; 112 _conn = conn;
99 _assem = assem; 113 _assem = assem;
100 _match = new Regex(subtype + @"\.(\d\d\d)_" + _type + @"\.sql"); 114 _match_old = new Regex(subtype + @"\.(\d\d\d)_" + _type + @"\.sql");
101 Initialize(); 115 string s = String.IsNullOrEmpty(subtype) ? _type : _type + @"\." + subtype;
116 _match_new = new Regex(@"\." + s + @"\.migrations(?:\.(?<ver>\d+)$|.*)");
102 } 117 }
103 118
104 private void Initialize() 119 public void InitMigrationsTable()
105 { 120 {
106 // clever, eh, we figure out which migrations version we are 121 // NOTE: normally when the [migrations] table is created, the version record for 'migrations' is
107 int migration_version = FindVersion(_conn, "migrations"); 122 // added immediately. However, if for some reason the table is there but empty, we want to handle that as well.
108 123 int ver = FindVersion(_conn, "migrations");
109 if (migration_version > 0) 124 if (ver <= 0) // -1 = no table, 0 = no version record
110 return; 125 {
126 if( ver < 0 )
127 ExecuteScript("create table migrations(name varchar(100), version int)");
128 InsertVersion("migrations", 1);
129 }
130 }
111 131
112 // If not, create the migration tables 132 /// <summary>Executes a script, possibly in a database-specific way.
113 using (DbCommand cmd = _conn.CreateCommand()) 133 /// It can be redefined for a specific DBMS, if necessary. Specifically,
134 /// to avoid problems with proc definitions in MySQL, we must use
135 /// MySqlScript class instead of just DbCommand. We don't want to bring
136 /// MySQL references here, so instead define a MySQLMigration class
137 /// in OpenSim.Data.MySQL
138 /// </summary>
139 /// <param name="conn"></param>
140 /// <param name="script">Array of strings, one-per-batch (often just one)</param>
141 protected virtual void ExecuteScript(DbConnection conn, string[] script)
142 {
143 using (DbCommand cmd = conn.CreateCommand())
114 { 144 {
115 cmd.CommandText = _migrations_create; 145 cmd.CommandTimeout = 0;
116 cmd.ExecuteNonQuery(); 146 foreach (string sql in script)
147 {
148 cmd.CommandText = sql;
149 cmd.ExecuteNonQuery();
150 }
117 } 151 }
152 }
153
154 protected void ExecuteScript(DbConnection conn, string sql)
155 {
156 ExecuteScript(conn, new string[]{sql});
157 }
158
159 protected void ExecuteScript(string sql)
160 {
161 ExecuteScript(_conn, sql);
162 }
118 163
119 InsertVersion("migrations", 1); 164 protected void ExecuteScript(string[] script)
165 {
166 ExecuteScript(_conn, script);
120 } 167 }
121 168
169
170
122 public void Update() 171 public void Update()
123 { 172 {
124 int version = 0; 173 InitMigrationsTable();
125 version = FindVersion(_conn, _type);
126 174
127 SortedList<int, string> migrations = GetMigrationsAfter(version); 175 int version = FindVersion(_conn, _type);
176
177 SortedList<int, string[]> migrations = GetMigrationsAfter(version);
128 if (migrations.Count < 1) 178 if (migrations.Count < 1)
129 return; 179 return;
130 180
@@ -132,57 +182,41 @@ namespace OpenSim.Data
132 m_log.InfoFormat("[MIGRATIONS] Upgrading {0} to latest revision {1}.", _type, migrations.Keys[migrations.Count - 1]); 182 m_log.InfoFormat("[MIGRATIONS] Upgrading {0} to latest revision {1}.", _type, migrations.Keys[migrations.Count - 1]);
133 m_log.Info("[MIGRATIONS] NOTE: this may take a while, don't interupt this process!"); 183 m_log.Info("[MIGRATIONS] NOTE: this may take a while, don't interupt this process!");
134 184
135 using (DbCommand cmd = _conn.CreateCommand()) 185 foreach (KeyValuePair<int, string[]> kvp in migrations)
136 { 186 {
137 foreach (KeyValuePair<int, string> kvp in migrations) 187 int newversion = kvp.Key;
188 // we need to up the command timeout to infinite as we might be doing long migrations.
189
190 /* [AlexRa 01-May-10]: We can't always just run any SQL in a single batch (= ExecuteNonQuery()). Things like
191 * stored proc definitions might have to be sent to the server each in a separate batch.
192 * This is certainly so for MS SQL; not sure how the MySQL connector sorts out the mess
193 * with 'delimiter @@'/'delimiter ;' around procs. So each "script" this code executes now is not
194 * a single string, but an array of strings, executed separately.
195 */
196 try
138 { 197 {
139 int newversion = kvp.Key; 198 ExecuteScript(kvp.Value);
140 cmd.CommandText = kvp.Value; 199 }
141 // we need to up the command timeout to infinite as we might be doing long migrations. 200 catch (Exception e)
142 cmd.CommandTimeout = 0; 201 {
143 try 202 m_log.DebugFormat("[MIGRATIONS] Cmd was {0}", kvp.Value.ToString());
144 { 203 m_log.DebugFormat("[MIGRATIONS]: An error has occurred in the migration {0}.\n This may mean you could see errors trying to run OpenSim. If you see database related errors, you will need to fix the issue manually. Migration aborted.", e.Message);
145 cmd.ExecuteNonQuery(); 204 ExecuteScript("ROLLBACK;");
146 } 205 return;
147 catch (Exception e) 206 }
148 {
149 m_log.DebugFormat("[MIGRATIONS] Cmd was {0}", cmd.CommandText);
150 m_log.DebugFormat("[MIGRATIONS]: An error has occurred in the migration {0}.\n This may mean you could see errors trying to run OpenSim. If you see database related errors, you will need to fix the issue manually. Continuing.", e.Message);
151 cmd.CommandText = "ROLLBACK;";
152 cmd.ExecuteNonQuery();
153 }
154 207
155 if (version == 0) 208 if (version == 0)
156 { 209 {
157 InsertVersion(_type, newversion); 210 InsertVersion(_type, newversion);
158 }
159 else
160 {
161 UpdateVersion(_type, newversion);
162 }
163 version = newversion;
164 } 211 }
212 else
213 {
214 UpdateVersion(_type, newversion);
215 }
216 version = newversion;
165 } 217 }
166 } 218 }
167 219
168 // private int MaxVersion()
169 // {
170 // int max = 0;
171 // string[] names = _assem.GetManifestResourceNames();
172
173 // foreach (string s in names)
174 // {
175 // Match m = _match.Match(s);
176 // if (m.Success)
177 // {
178 // int MigrationVersion = int.Parse(m.Groups[1].ToString());
179 // if (MigrationVersion > max)
180 // max = MigrationVersion;
181 // }
182 // }
183 // return max;
184 // }
185
186 public int Version 220 public int Version
187 { 221 {
188 get { return FindVersion(_conn, _type); } 222 get { return FindVersion(_conn, _type); }
@@ -206,7 +240,7 @@ namespace OpenSim.Data
206 try 240 try
207 { 241 {
208 cmd.CommandText = "select version from migrations where name='" + type + "' order by version desc"; 242 cmd.CommandText = "select version from migrations where name='" + type + "' order by version desc";
209 using (IDataReader reader = cmd.ExecuteReader()) 243 using (DbDataReader reader = cmd.ExecuteReader())
210 { 244 {
211 if (reader.Read()) 245 if (reader.Read())
212 { 246 {
@@ -217,7 +251,8 @@ namespace OpenSim.Data
217 } 251 }
218 catch 252 catch
219 { 253 {
220 // Something went wrong, so we're version 0 254 // Something went wrong (probably no table), so we're at version -1
255 version = -1;
221 } 256 }
222 } 257 }
223 return version; 258 return version;
@@ -225,57 +260,151 @@ namespace OpenSim.Data
225 260
226 private void InsertVersion(string type, int version) 261 private void InsertVersion(string type, int version)
227 { 262 {
228 using (DbCommand cmd = _conn.CreateCommand()) 263 m_log.InfoFormat("[MIGRATIONS]: Creating {0} at version {1}", type, version);
229 { 264 ExecuteScript("insert into migrations(name, version) values('" + type + "', " + version + ")");
230 cmd.CommandText = "insert into migrations(name, version) values('" + type + "', " + version + ")";
231 m_log.InfoFormat("[MIGRATIONS]: Creating {0} at version {1}", type, version);
232 cmd.ExecuteNonQuery();
233 }
234 } 265 }
235 266
236 private void UpdateVersion(string type, int version) 267 private void UpdateVersion(string type, int version)
237 { 268 {
238 using (DbCommand cmd = _conn.CreateCommand()) 269 m_log.InfoFormat("[MIGRATIONS]: Updating {0} to version {1}", type, version);
239 { 270 ExecuteScript("update migrations set version=" + version + " where name='" + type + "'");
240 cmd.CommandText = "update migrations set version=" + version + " where name='" + type + "'";
241 m_log.InfoFormat("[MIGRATIONS]: Updating {0} to version {1}", type, version);
242 cmd.ExecuteNonQuery();
243 }
244 } 271 }
245 272
246 // private SortedList<int, string> GetAllMigrations() 273 private delegate void FlushProc();
247 // {
248 // return GetMigrationsAfter(0);
249 // }
250 274
251 private SortedList<int, string> GetMigrationsAfter(int after) 275 /// <summary>Scans for migration resources in either old-style "scattered" (one file per version)
276 /// or new-style "integrated" format (single file with ":VERSION nnn" sections).
277 /// In the new-style migrations it also recognizes ':GO' separators for parts of the SQL script
278 /// that must be sent to the server separately. The old-style migrations are loaded each in one piece
279 /// and don't support the ':GO' feature.
280 /// </summary>
281 /// <param name="after">The version we are currently at. Scan for any higher versions</param>
282 /// <returns>A list of string arrays, representing the scripts.</returns>
283 private SortedList<int, string[]> GetMigrationsAfter(int after)
252 { 284 {
285 SortedList<int, string[]> migrations = new SortedList<int, string[]>();
286
253 string[] names = _assem.GetManifestResourceNames(); 287 string[] names = _assem.GetManifestResourceNames();
254 SortedList<int, string> migrations = new SortedList<int, string>(); 288 if( names.Length == 0 ) // should never happen
255 // because life is funny if we don't 289 return migrations;
256 Array.Sort(names); 290
291 Array.Sort(names); // we want all the migrations ordered
292
293 int nLastVerFound = 0;
294 Match m = null;
295 string sFile = Array.FindLast(names, nm => { m = _match_new.Match(nm); return m.Success; }); // ; nm.StartsWith(sPrefix, StringComparison.InvariantCultureIgnoreCase
296
297 if( (m != null) && !String.IsNullOrEmpty(sFile) )
298 {
299 /* The filename should be '<StoreName>.migrations[.NNN]' where NNN
300 * is the last version number defined in the file. If the '.NNN' part is recognized, the code can skip
301 * the file without looking inside if we have a higher version already. Without the suffix we read
302 * the file anyway and use the version numbers inside. Any unrecognized suffix (such as '.sql')
303 * is valid but ignored.
304 *
305 * NOTE that we expect only one 'merged' migration file. If there are several, we take the last one.
306 * If you are numbering them, leave only the latest one in the project or at least make sure they numbered
307 * to come up in the correct order (e.g. 'SomeStore.migrations.001' rather than 'SomeStore.migrations.1')
308 */
309
310 if (m.Groups.Count > 1 && int.TryParse(m.Groups[1].Value, out nLastVerFound))
311 {
312 if( nLastVerFound <= after )
313 goto scan_old_style;
314 }
315
316 System.Text.StringBuilder sb = new System.Text.StringBuilder(4096);
317 int nVersion = -1;
318
319 List<string> script = new List<string>();
320
321 FlushProc flush = delegate()
322 {
323 if (sb.Length > 0) // last SQL stmt to script list
324 {
325 script.Add(sb.ToString());
326 sb.Length = 0;
327 }
328
329 if ( (nVersion > 0) && (nVersion > after) && (script.Count > 0) && !migrations.ContainsKey(nVersion)) // script to the versioned script list
330 {
331 migrations[nVersion] = script.ToArray();
332 }
333 script.Clear();
334 };
257 335
336 using (Stream resource = _assem.GetManifestResourceStream(sFile))
337 using (StreamReader resourceReader = new StreamReader(resource))
338 {
339 int nLineNo = 0;
340 while (!resourceReader.EndOfStream)
341 {
342 string sLine = resourceReader.ReadLine();
343 nLineNo++;
344
345 if( String.IsNullOrEmpty(sLine) || sLine.StartsWith("#") ) // ignore a comment or empty line
346 continue;
347
348 if (sLine.Trim().Equals(":GO", StringComparison.InvariantCultureIgnoreCase))
349 {
350 if (sb.Length == 0) continue;
351 if (nVersion > after)
352 script.Add(sb.ToString());
353 sb.Length = 0;
354 continue;
355 }
356
357 if (sLine.StartsWith(":VERSION ", StringComparison.InvariantCultureIgnoreCase)) // ":VERSION nnn"
358 {
359 flush();
360
361 int n = sLine.IndexOf('#'); // Comment is allowed in version sections, ignored
362 if (n >= 0)
363 sLine = sLine.Substring(0, n);
364
365 if (!int.TryParse(sLine.Substring(9).Trim(), out nVersion))
366 {
367 m_log.ErrorFormat("[MIGRATIONS]: invalid version marker at {0}: line {1}. Migration failed!", sFile, nLineNo);
368 break;
369 }
370 }
371 else
372 {
373 sb.AppendLine(sLine);
374 }
375 }
376 flush();
377
378 // If there are scattered migration files as well, only look for those with higher version numbers.
379 if (after < nVersion)
380 after = nVersion;
381 }
382 }
383
384scan_old_style:
385 // scan "old style" migration pieces anyway, ignore any versions already filled from the single file
258 foreach (string s in names) 386 foreach (string s in names)
259 { 387 {
260 Match m = _match.Match(s); 388 m = _match_old.Match(s);
261 if (m.Success) 389 if (m.Success)
262 { 390 {
263 int version = int.Parse(m.Groups[1].ToString()); 391 int version = int.Parse(m.Groups[1].ToString());
264 if (version > after) 392 if ( (version > after) && !migrations.ContainsKey(version) )
265 { 393 {
266 using (Stream resource = _assem.GetManifestResourceStream(s)) 394 using (Stream resource = _assem.GetManifestResourceStream(s))
267 { 395 {
268 using (StreamReader resourceReader = new StreamReader(resource)) 396 using (StreamReader resourceReader = new StreamReader(resource))
269 { 397 {
270 string resourceString = resourceReader.ReadToEnd(); 398 string sql = resourceReader.ReadToEnd();
271 migrations.Add(version, resourceString); 399 migrations.Add(version, new string[]{sql});
272 } 400 }
273 } 401 }
274 } 402 }
275 } 403 }
276 } 404 }
277 405
278 if (migrations.Count < 1) { 406 if (migrations.Count < 1)
407 {
279 m_log.InfoFormat("[MIGRATIONS]: {0} up to date, no migrations to apply", _type); 408 m_log.InfoFormat("[MIGRATIONS]: {0} up to date, no migrations to apply", _type);
280 } 409 }
281 return migrations; 410 return migrations;
diff --git a/OpenSim/Data/MySQL/MySQLMigrations.cs b/OpenSim/Data/MySQL/MySQLMigrations.cs
new file mode 100644
index 0000000..b16655d
--- /dev/null
+++ b/OpenSim/Data/MySQL/MySQLMigrations.cs
@@ -0,0 +1,85 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.Collections.Generic;
30using System.Data;
31using System.Data.Common;
32using System.IO;
33using System.Reflection;
34using System.Text.RegularExpressions;
35using log4net;
36using MySql.Data.MySqlClient;
37
38namespace OpenSim.Data.MySQL
39{
40 /// <summary>This is a MySQL-customized migration processor. The only difference is in how
41 /// it executes SQL scripts (using MySqlScript instead of MyCommand)
42 ///
43 /// </summary>
44 public class MySqlMigration : Migration
45 {
46 public MySqlMigration()
47 : base()
48 {
49 }
50
51 public MySqlMigration(DbConnection conn, Assembly assem, string subtype, string type) :
52 base(conn, assem, subtype, type)
53 {
54 }
55
56 public MySqlMigration(DbConnection conn, Assembly assem, string type) :
57 base(conn, assem, type)
58 {
59 }
60
61 protected override void ExecuteScript(DbConnection conn, string[] script)
62 {
63 if (!(conn is MySqlConnection))
64 {
65 base.ExecuteScript(conn, script);
66 return;
67 }
68
69 MySqlScript scr = new MySqlScript((MySqlConnection)conn);
70 {
71 foreach (string sql in script)
72 {
73 scr.Query = sql;
74 scr.Error += delegate(object sender, MySqlScriptErrorEventArgs args)
75 {
76 m_log.ErrorFormat("[MySQL MIGRATION]: Error {0}", args.Exception.Message);
77 m_log.ErrorFormat("[MySQL MIGRATION]: In SQL: {0}", args.StatementText);
78 throw args.Exception;
79 };
80 scr.Execute();
81 }
82 }
83 }
84 }
85}
diff --git a/OpenSim/Data/MySQL/Resources/001_AssetStore.sql b/OpenSim/Data/MySQL/Resources/001_AssetStore.sql
deleted file mode 100644
index 6a9a127..0000000
--- a/OpenSim/Data/MySQL/Resources/001_AssetStore.sql
+++ /dev/null
@@ -1,15 +0,0 @@
1BEGIN;
2
3CREATE TABLE `assets` (
4 `id` binary(16) NOT NULL,
5 `name` varchar(64) NOT NULL,
6 `description` varchar(64) NOT NULL,
7 `assetType` tinyint(4) NOT NULL,
8 `invType` tinyint(4) NOT NULL,
9 `local` tinyint(1) NOT NULL,
10 `temporary` tinyint(1) NOT NULL,
11 `data` longblob NOT NULL,
12 PRIMARY KEY (`id`)
13) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
14
15COMMIT; \ No newline at end of file
diff --git a/OpenSim/Data/MySQL/Resources/001_Avatar.sql b/OpenSim/Data/MySQL/Resources/001_Avatar.sql
deleted file mode 100644
index 27a3072..0000000
--- a/OpenSim/Data/MySQL/Resources/001_Avatar.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN;
2
3CREATE TABLE Avatars (PrincipalID CHAR(36) NOT NULL, Name VARCHAR(32) NOT NULL, Value VARCHAR(255) NOT NULL DEFAULT '', PRIMARY KEY(PrincipalID, Name), KEY(PrincipalID));
4
5COMMIT;
diff --git a/OpenSim/Data/MySQL/Resources/001_Friends.sql b/OpenSim/Data/MySQL/Resources/001_Friends.sql
deleted file mode 100644
index e158a2c..0000000
--- a/OpenSim/Data/MySQL/Resources/001_Friends.sql
+++ /dev/null
@@ -1,9 +0,0 @@
1BEGIN;
2
3CREATE TABLE `Friends` (
4 `PrincipalID` CHAR(36) NOT NULL,
5 `FriendID` VARCHAR(255) NOT NULL,
6 `Flags` CHAR(16) NOT NULL DEFAULT '0'
7) ENGINE=InnoDB;
8
9COMMIT;
diff --git a/OpenSim/Data/MySQL/Resources/001_FriendsStore.sql b/OpenSim/Data/MySQL/Resources/001_FriendsStore.sql
deleted file mode 100644
index da2c59c..0000000
--- a/OpenSim/Data/MySQL/Resources/001_FriendsStore.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN;
2
3CREATE TABLE `Friends` (`PrincipalID` CHAR(36) NOT NULL, `Friend` VARCHAR(255) NOT NULL, `Flags` VARCHAR(16) NOT NULL DEFAULT 0, `Offered` VARCHAR(32) NOT NULL DEFAULT 0, PRIMARY KEY(`PrincipalID`, `Friend`), KEY(`PrincipalID`));
4
5COMMIT;
diff --git a/OpenSim/Data/MySQL/Resources/001_InventoryStore.sql b/OpenSim/Data/MySQL/Resources/001_InventoryStore.sql
deleted file mode 100644
index 40dc91c..0000000
--- a/OpenSim/Data/MySQL/Resources/001_InventoryStore.sql
+++ /dev/null
@@ -1,40 +0,0 @@
1BEGIN;
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 (`folderID`),
11 KEY `owner` (`agentID`),
12 KEY `parent` (`parentFolderID`)
13) ENGINE=InnoDB DEFAULT CHARSET=utf8;
14
15CREATE TABLE `inventoryitems` (
16 `inventoryID` varchar(36) NOT NULL default '',
17 `assetID` varchar(36) default NULL,
18 `assetType` int(11) default NULL,
19 `parentFolderID` varchar(36) default NULL,
20 `avatarID` varchar(36) default NULL,
21 `inventoryName` varchar(64) default NULL,
22 `inventoryDescription` varchar(128) default NULL,
23 `inventoryNextPermissions` int(10) unsigned default NULL,
24 `inventoryCurrentPermissions` int(10) unsigned default NULL,
25 `invType` int(11) default NULL,
26 `creatorID` varchar(36) default NULL,
27 `inventoryBasePermissions` int(10) unsigned NOT NULL default 0,
28 `inventoryEveryOnePermissions` int(10) unsigned NOT NULL default 0,
29 `salePrice` int(11) NOT NULL default 0,
30 `saleType` tinyint(4) NOT NULL default 0,
31 `creationDate` int(11) NOT NULL default 0,
32 `groupID` varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000',
33 `groupOwned` tinyint(4) NOT NULL default 0,
34 `flags` int(11) unsigned NOT NULL default 0,
35 PRIMARY KEY (`inventoryID`),
36 KEY `owner` (`avatarID`),
37 KEY `folder` (`parentFolderID`)
38) ENGINE=InnoDB DEFAULT CHARSET=utf8;
39
40COMMIT; \ No newline at end of file
diff --git a/OpenSim/Data/MySQL/Resources/001_Presence.sql b/OpenSim/Data/MySQL/Resources/001_Presence.sql
deleted file mode 100644
index 84fa057..0000000
--- a/OpenSim/Data/MySQL/Resources/001_Presence.sql
+++ /dev/null
@@ -1,13 +0,0 @@
1BEGIN;
2
3CREATE TABLE `Presence` (
4 `UserID` VARCHAR(255) NOT NULL,
5 `RegionID` CHAR(36) NOT NULL,
6 `SessionID` CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
7 `SecureSessionID` CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000'
8) ENGINE=InnoDB;
9
10CREATE UNIQUE INDEX SessionID ON Presence(SessionID);
11CREATE INDEX UserID ON Presence(UserID);
12
13COMMIT;
diff --git a/OpenSim/Data/MySQL/Resources/001_RegionStore.sql b/OpenSim/Data/MySQL/Resources/001_RegionStore.sql
deleted file mode 100644
index 31164b3..0000000
--- a/OpenSim/Data/MySQL/Resources/001_RegionStore.sql
+++ /dev/null
@@ -1,154 +0,0 @@
1BEGIN;
2
3CREATE TABLE `prims` (
4 `UUID` varchar(255) NOT NULL,
5 `RegionUUID` varchar(255) default NULL,
6 `ParentID` int(11) default NULL,
7 `CreationDate` int(11) default NULL,
8 `Name` varchar(255) default NULL,
9 `SceneGroupID` varchar(255) default NULL,
10 `Text` varchar(255) default NULL,
11 `Description` varchar(255) default NULL,
12 `SitName` varchar(255) default NULL,
13 `TouchName` varchar(255) default NULL,
14 `ObjectFlags` int(11) default NULL,
15 `CreatorID` varchar(255) default NULL,
16 `OwnerID` varchar(255) default NULL,
17 `GroupID` varchar(255) default NULL,
18 `LastOwnerID` varchar(255) default NULL,
19 `OwnerMask` int(11) default NULL,
20 `NextOwnerMask` int(11) default NULL,
21 `GroupMask` int(11) default NULL,
22 `EveryoneMask` int(11) default NULL,
23 `BaseMask` int(11) default NULL,
24 `PositionX` float default NULL,
25 `PositionY` float default NULL,
26 `PositionZ` float default NULL,
27 `GroupPositionX` float default NULL,
28 `GroupPositionY` float default NULL,
29 `GroupPositionZ` float default NULL,
30 `VelocityX` float default NULL,
31 `VelocityY` float default NULL,
32 `VelocityZ` float default NULL,
33 `AngularVelocityX` float default NULL,
34 `AngularVelocityY` float default NULL,
35 `AngularVelocityZ` float default NULL,
36 `AccelerationX` float default NULL,
37 `AccelerationY` float default NULL,
38 `AccelerationZ` float default NULL,
39 `RotationX` float default NULL,
40 `RotationY` float default NULL,
41 `RotationZ` float default NULL,
42 `RotationW` float default NULL,
43 `SitTargetOffsetX` float default NULL,
44 `SitTargetOffsetY` float default NULL,
45 `SitTargetOffsetZ` float default NULL,
46 `SitTargetOrientW` float default NULL,
47 `SitTargetOrientX` float default NULL,
48 `SitTargetOrientY` float default NULL,
49 `SitTargetOrientZ` float default NULL,
50 PRIMARY KEY (`UUID`)
51) ENGINE=MyISAM DEFAULT CHARSET=latin1;
52
53CREATE TABLE `primshapes` (
54 `UUID` varchar(255) NOT NULL,
55 `Shape` int(11) default NULL,
56 `ScaleX` float default NULL,
57 `ScaleY` float default NULL,
58 `ScaleZ` float default NULL,
59 `PCode` int(11) default NULL,
60 `PathBegin` int(11) default NULL,
61 `PathEnd` int(11) default NULL,
62 `PathScaleX` int(11) default NULL,
63 `PathScaleY` int(11) default NULL,
64 `PathShearX` int(11) default NULL,
65 `PathShearY` int(11) default NULL,
66 `PathSkew` int(11) default NULL,
67 `PathCurve` int(11) default NULL,
68 `PathRadiusOffset` int(11) default NULL,
69 `PathRevolutions` int(11) default NULL,
70 `PathTaperX` int(11) default NULL,
71 `PathTaperY` int(11) default NULL,
72 `PathTwist` int(11) default NULL,
73 `PathTwistBegin` int(11) default NULL,
74 `ProfileBegin` int(11) default NULL,
75 `ProfileEnd` int(11) default NULL,
76 `ProfileCurve` int(11) default NULL,
77 `ProfileHollow` int(11) default NULL,
78 `State` int(11) default NULL,
79 `Texture` longblob,
80 `ExtraParams` longblob,
81 PRIMARY KEY (`UUID`)
82) ENGINE=MyISAM DEFAULT CHARSET=latin1;
83
84CREATE TABLE `primitems` (
85 `itemID` varchar(255) NOT NULL,
86 `primID` varchar(255) default NULL,
87 `assetID` varchar(255) default NULL,
88 `parentFolderID` varchar(255) default NULL,
89 `invType` int(11) default NULL,
90 `assetType` int(11) default NULL,
91 `name` varchar(255) default NULL,
92 `description` varchar(255) default NULL,
93 `creationDate` bigint(20) default NULL,
94 `creatorID` varchar(255) default NULL,
95 `ownerID` varchar(255) default NULL,
96 `lastOwnerID` varchar(255) default NULL,
97 `groupID` varchar(255) default NULL,
98 `nextPermissions` int(11) default NULL,
99 `currentPermissions` int(11) default NULL,
100 `basePermissions` int(11) default NULL,
101 `everyonePermissions` int(11) default NULL,
102 `groupPermissions` int(11) default NULL,
103 PRIMARY KEY (`itemID`)
104) ENGINE=MyISAM DEFAULT CHARSET=latin1;
105
106CREATE TABLE `terrain` (
107 `RegionUUID` varchar(255) default NULL,
108 `Revision` int(11) default NULL,
109 `Heightfield` longblob
110) ENGINE=MyISAM DEFAULT CHARSET=latin1;
111
112CREATE TABLE `land` (
113 `UUID` varchar(255) NOT NULL,
114 `RegionUUID` varchar(255) default NULL,
115 `LocalLandID` int(11) default NULL,
116 `Bitmap` longblob,
117 `Name` varchar(255) default NULL,
118 `Description` varchar(255) default NULL,
119 `OwnerUUID` varchar(255) default NULL,
120 `IsGroupOwned` int(11) default NULL,
121 `Area` int(11) default NULL,
122 `AuctionID` int(11) default NULL,
123 `Category` int(11) default NULL,
124 `ClaimDate` int(11) default NULL,
125 `ClaimPrice` int(11) default NULL,
126 `GroupUUID` varchar(255) default NULL,
127 `SalePrice` int(11) default NULL,
128 `LandStatus` int(11) default NULL,
129 `LandFlags` int(11) default NULL,
130 `LandingType` int(11) default NULL,
131 `MediaAutoScale` int(11) default NULL,
132 `MediaTextureUUID` varchar(255) default NULL,
133 `MediaURL` varchar(255) default NULL,
134 `MusicURL` varchar(255) default NULL,
135 `PassHours` float default NULL,
136 `PassPrice` int(11) default NULL,
137 `SnapshotUUID` varchar(255) default NULL,
138 `UserLocationX` float default NULL,
139 `UserLocationY` float default NULL,
140 `UserLocationZ` float default NULL,
141 `UserLookAtX` float default NULL,
142 `UserLookAtY` float default NULL,
143 `UserLookAtZ` float default NULL,
144 `AuthbuyerID` varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000',
145 PRIMARY KEY (`UUID`)
146) ENGINE=InnoDB DEFAULT CHARSET=utf8;
147
148CREATE TABLE `landaccesslist` (
149 `LandUUID` varchar(255) default NULL,
150 `AccessUUID` varchar(255) default NULL,
151 `Flags` int(11) default NULL
152) ENGINE=MyISAM DEFAULT CHARSET=latin1;
153
154COMMIT; \ No newline at end of file
diff --git a/OpenSim/Data/MySQL/Resources/001_UserAccount.sql b/OpenSim/Data/MySQL/Resources/001_UserAccount.sql
deleted file mode 100644
index 07da571..0000000
--- a/OpenSim/Data/MySQL/Resources/001_UserAccount.sql
+++ /dev/null
@@ -1,13 +0,0 @@
1BEGIN;
2
3CREATE TABLE `UserAccounts` (
4 `PrincipalID` CHAR(36) NOT NULL,
5 `ScopeID` CHAR(36) NOT NULL,
6 `FirstName` VARCHAR(64) NOT NULL,
7 `LastName` VARCHAR(64) NOT NULL,
8 `Email` VARCHAR(64),
9 `ServiceURLs` TEXT,
10 `Created` INT(11)
11) ENGINE=InnoDB DEFAULT CHARSET=utf8;
12
13COMMIT;
diff --git a/OpenSim/Data/MySQL/Resources/002_AssetStore.sql b/OpenSim/Data/MySQL/Resources/002_AssetStore.sql
deleted file mode 100644
index a7d7fca..0000000
--- a/OpenSim/Data/MySQL/Resources/002_AssetStore.sql
+++ /dev/null
@@ -1,9 +0,0 @@
1BEGIN;
2
3ALTER TABLE assets change id oldid binary(16);
4ALTER TABLE assets add id varchar(36) not null default '';
5UPDATE assets set id = concat(substr(hex(oldid),1,8),"-",substr(hex(oldid),9,4),"-",substr(hex(oldid),13,4),"-",substr(hex(oldid),17,4),"-",substr(hex(oldid),21,12));
6ALTER TABLE assets drop oldid;
7ALTER TABLE assets add constraint primary key(id);
8
9COMMIT; \ No newline at end of file
diff --git a/OpenSim/Data/MySQL/Resources/002_AuthStore.sql b/OpenSim/Data/MySQL/Resources/002_AuthStore.sql
deleted file mode 100644
index dc7dfe0..0000000
--- a/OpenSim/Data/MySQL/Resources/002_AuthStore.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN;
2
3INSERT INTO auth (UUID, passwordHash, passwordSalt, webLoginKey) SELECT `UUID` AS UUID, `passwordHash` AS passwordHash, `passwordSalt` AS passwordSalt, `webLoginKey` AS webLoginKey FROM users;
4
5COMMIT;
diff --git a/OpenSim/Data/MySQL/Resources/002_Friends.sql b/OpenSim/Data/MySQL/Resources/002_Friends.sql
deleted file mode 100644
index 5ff6438..0000000
--- a/OpenSim/Data/MySQL/Resources/002_Friends.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN;
2
3INSERT INTO Friends (PrincipalID, FriendID, Flags) SELECT ownerID, friendID, friendPerms FROM userfriends;
4
5COMMIT;
diff --git a/OpenSim/Data/MySQL/Resources/002_FriendsStore.sql b/OpenSim/Data/MySQL/Resources/002_FriendsStore.sql
deleted file mode 100644
index a363867..0000000
--- a/OpenSim/Data/MySQL/Resources/002_FriendsStore.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN;
2
3INSERT INTO `Friends` SELECT `ownerID`, `friendID`, `friendPerms`, 0 FROM `userfriends`;
4
5COMMIT;
diff --git a/OpenSim/Data/MySQL/Resources/002_GridStore.sql b/OpenSim/Data/MySQL/Resources/002_GridStore.sql
deleted file mode 100644
index 35b9be1..0000000
--- a/OpenSim/Data/MySQL/Resources/002_GridStore.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN;
2
3ALTER TABLE regions add column access integer unsigned default 1;
4
5COMMIT;
diff --git a/OpenSim/Data/MySQL/Resources/002_InventoryStore.sql b/OpenSim/Data/MySQL/Resources/002_InventoryStore.sql
deleted file mode 100644
index c161a68..0000000
--- a/OpenSim/Data/MySQL/Resources/002_InventoryStore.sql
+++ /dev/null
@@ -1,31 +0,0 @@
1BEGIN;
2
3ALTER TABLE inventoryfolders change folderID folderIDold varchar(36);
4ALTER TABLE inventoryfolders change agentID agentIDold varchar(36);
5ALTER TABLE inventoryfolders change parentFolderID parentFolderIDold varchar(36);
6ALTER TABLE inventoryfolders add folderID char(36) not null default '00000000-0000-0000-0000-000000000000';
7ALTER TABLE inventoryfolders add agentID char(36) default NULL;
8ALTER TABLE inventoryfolders add parentFolderID char(36) default NULL;
9UPDATE inventoryfolders set folderID = folderIDold, agentID = agentIDold, parentFolderID = parentFolderIDold;
10ALTER TABLE inventoryfolders drop folderIDold;
11ALTER TABLE inventoryfolders drop agentIDold;
12ALTER TABLE inventoryfolders drop parentFolderIDold;
13ALTER TABLE inventoryfolders add constraint primary key(folderID);
14ALTER TABLE inventoryfolders add index inventoryfolders_agentid(agentID);
15ALTER TABLE inventoryfolders add index inventoryfolders_parentFolderid(parentFolderID);
16
17ALTER TABLE inventoryitems change inventoryID inventoryIDold varchar(36);
18ALTER TABLE inventoryitems change avatarID avatarIDold varchar(36);
19ALTER TABLE inventoryitems change parentFolderID parentFolderIDold varchar(36);
20ALTER TABLE inventoryitems add inventoryID char(36) not null default '00000000-0000-0000-0000-000000000000';
21ALTER TABLE inventoryitems add avatarID char(36) default NULL;
22ALTER TABLE inventoryitems add parentFolderID char(36) default NULL;
23UPDATE inventoryitems set inventoryID = inventoryIDold, avatarID = avatarIDold, parentFolderID = parentFolderIDold;
24ALTER TABLE inventoryitems drop inventoryIDold;
25ALTER TABLE inventoryitems drop avatarIDold;
26ALTER TABLE inventoryitems drop parentFolderIDold;
27ALTER TABLE inventoryitems add constraint primary key(inventoryID);
28ALTER TABLE inventoryitems add index inventoryitems_avatarid(avatarID);
29ALTER TABLE inventoryitems add index inventoryitems_parentFolderid(parentFolderID);
30
31COMMIT; \ No newline at end of file
diff --git a/OpenSim/Data/MySQL/Resources/002_RegionStore.sql b/OpenSim/Data/MySQL/Resources/002_RegionStore.sql
deleted file mode 100644
index 45bf959..0000000
--- a/OpenSim/Data/MySQL/Resources/002_RegionStore.sql
+++ /dev/null
@@ -1,6 +0,0 @@
1BEGIN;
2
3CREATE index prims_regionuuid on prims(RegionUUID);
4CREATE index primitems_primid on primitems(primID);
5
6COMMIT; \ No newline at end of file
diff --git a/OpenSim/Data/MySQL/Resources/002_UserAccount.sql b/OpenSim/Data/MySQL/Resources/002_UserAccount.sql
deleted file mode 100644
index ad2ddda..0000000
--- a/OpenSim/Data/MySQL/Resources/002_UserAccount.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN;
2
3INSERT INTO UserAccounts (PrincipalID, ScopeID, FirstName, LastName, Email, ServiceURLs, Created) SELECT `UUID` AS PrincipalID, '00000000-0000-0000-0000-000000000000' AS ScopeID, username AS FirstName, lastname AS LastName, email as Email, CONCAT('AssetServerURI=', userAssetURI, ' InventoryServerURI=', userInventoryURI, ' GatewayURI= HomeURI=') AS ServiceURLs, created as Created FROM users;
4
5COMMIT;
diff --git a/OpenSim/Data/MySQL/Resources/002_UserStore.sql b/OpenSim/Data/MySQL/Resources/002_UserStore.sql
deleted file mode 100644
index 393cea0..0000000
--- a/OpenSim/Data/MySQL/Resources/002_UserStore.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN;
2
3ALTER TABLE users add homeRegionID char(36) NOT NULL default '00000000-0000-0000-0000-000000000000';
4
5COMMIT;
diff --git a/OpenSim/Data/MySQL/Resources/003_AssetStore.sql b/OpenSim/Data/MySQL/Resources/003_AssetStore.sql
deleted file mode 100644
index d489278..0000000
--- a/OpenSim/Data/MySQL/Resources/003_AssetStore.sql
+++ /dev/null
@@ -1,9 +0,0 @@
1BEGIN;
2
3ALTER TABLE assets change id oldid varchar(36);
4ALTER TABLE assets add id char(36) not null default '00000000-0000-0000-0000-000000000000';
5UPDATE assets set id = oldid;
6ALTER TABLE assets drop oldid;
7ALTER TABLE assets add constraint primary key(id);
8
9COMMIT; \ No newline at end of file
diff --git a/OpenSim/Data/MySQL/Resources/003_AuthStore.sql b/OpenSim/Data/MySQL/Resources/003_AuthStore.sql
deleted file mode 100644
index af9ffe6..0000000
--- a/OpenSim/Data/MySQL/Resources/003_AuthStore.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN;
2
3ALTER TABLE `auth` ADD COLUMN `accountType` VARCHAR(32) NOT NULL DEFAULT 'UserAccount';
4
5COMMIT;
diff --git a/OpenSim/Data/MySQL/Resources/003_GridStore.sql b/OpenSim/Data/MySQL/Resources/003_GridStore.sql
deleted file mode 100644
index bc3fe7d..0000000
--- a/OpenSim/Data/MySQL/Resources/003_GridStore.sql
+++ /dev/null
@@ -1,7 +0,0 @@
1BEGIN;
2
3ALTER TABLE regions add column ScopeID char(36) not null default '00000000-0000-0000-0000-000000000000';
4
5create index ScopeID on regions(ScopeID);
6
7COMMIT;
diff --git a/OpenSim/Data/MySQL/Resources/003_InventoryStore.sql b/OpenSim/Data/MySQL/Resources/003_InventoryStore.sql
deleted file mode 100644
index 4c6da91..0000000
--- a/OpenSim/Data/MySQL/Resources/003_InventoryStore.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN;
2
3alter table inventoryitems add column inventoryGroupPermissions integer unsigned not null default 0;
4
5COMMIT;
diff --git a/OpenSim/Data/MySQL/Resources/003_RegionStore.sql b/OpenSim/Data/MySQL/Resources/003_RegionStore.sql
deleted file mode 100644
index cb0a614..0000000
--- a/OpenSim/Data/MySQL/Resources/003_RegionStore.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN;
2
3 CREATE TABLE regionban (regionUUID VARCHAR(36) NOT NULL, bannedUUID VARCHAR(36) NOT NULL, bannedIp VARCHAR(16) NOT NULL, bannedIpHostMask VARCHAR(16) NOT NULL) ENGINE=INNODB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
4
5COMMIT; \ No newline at end of file
diff --git a/OpenSim/Data/MySQL/Resources/003_UserAccount.sql b/OpenSim/Data/MySQL/Resources/003_UserAccount.sql
deleted file mode 100644
index e42d93b..0000000
--- a/OpenSim/Data/MySQL/Resources/003_UserAccount.sql
+++ /dev/null
@@ -1,9 +0,0 @@
1BEGIN;
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;
diff --git a/OpenSim/Data/MySQL/Resources/003_UserStore.sql b/OpenSim/Data/MySQL/Resources/003_UserStore.sql
deleted file mode 100644
index 6f890ee..0000000
--- a/OpenSim/Data/MySQL/Resources/003_UserStore.sql
+++ /dev/null
@@ -1,6 +0,0 @@
1BEGIN;
2
3ALTER TABLE users add userFlags integer NOT NULL default 0;
4ALTER TABLE users add godLevel integer NOT NULL default 0;
5
6COMMIT;
diff --git a/OpenSim/Data/MySQL/Resources/004_AssetStore.sql b/OpenSim/Data/MySQL/Resources/004_AssetStore.sql
deleted file mode 100644
index ae1951d..0000000
--- a/OpenSim/Data/MySQL/Resources/004_AssetStore.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN;
2
3ALTER TABLE assets drop InvType;
4
5COMMIT;
diff --git a/OpenSim/Data/MySQL/Resources/004_GridStore.sql b/OpenSim/Data/MySQL/Resources/004_GridStore.sql
deleted file mode 100644
index 2238a88..0000000
--- a/OpenSim/Data/MySQL/Resources/004_GridStore.sql
+++ /dev/null
@@ -1,6 +0,0 @@
1BEGIN;
2
3ALTER TABLE regions add column sizeX integer not null default 0;
4ALTER TABLE regions add column sizeY integer not null default 0;
5
6COMMIT;
diff --git a/OpenSim/Data/MySQL/Resources/004_InventoryStore.sql b/OpenSim/Data/MySQL/Resources/004_InventoryStore.sql
deleted file mode 100644
index c45f773..0000000
--- a/OpenSim/Data/MySQL/Resources/004_InventoryStore.sql
+++ /dev/null
@@ -1,7 +0,0 @@
1BEGIN;
2
3update inventoryitems set creatorID = '00000000-0000-0000-0000-000000000000' where creatorID is NULL;
4update inventoryitems set creatorID = '00000000-0000-0000-0000-000000000000' where creatorID = '';
5alter table inventoryitems modify column creatorID varchar(36) not NULL default '00000000-0000-0000-0000-000000000000';
6
7COMMIT;
diff --git a/OpenSim/Data/MySQL/Resources/004_RegionStore.sql b/OpenSim/Data/MySQL/Resources/004_RegionStore.sql
deleted file mode 100644
index 4db2f75..0000000
--- a/OpenSim/Data/MySQL/Resources/004_RegionStore.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN;
2
3ALTER TABLE primitems add flags integer not null default 0;
4
5COMMIT; \ No newline at end of file
diff --git a/OpenSim/Data/MySQL/Resources/004_UserAccount.sql b/OpenSim/Data/MySQL/Resources/004_UserAccount.sql
deleted file mode 100644
index 8abcd53..0000000
--- a/OpenSim/Data/MySQL/Resources/004_UserAccount.sql
+++ /dev/null
@@ -1,8 +0,0 @@
1BEGIN;
2
3ALTER TABLE UserAccounts ADD COLUMN UserLevel integer NOT NULL DEFAULT 0;
4ALTER TABLE UserAccounts ADD COLUMN UserFlags integer NOT NULL DEFAULT 0;
5ALTER TABLE UserAccounts ADD COLUMN UserTitle varchar(64) NOT NULL DEFAULT '';
6
7COMMIT;
8
diff --git a/OpenSim/Data/MySQL/Resources/004_UserStore.sql b/OpenSim/Data/MySQL/Resources/004_UserStore.sql
deleted file mode 100644
index 03142af..0000000
--- a/OpenSim/Data/MySQL/Resources/004_UserStore.sql
+++ /dev/null
@@ -1,6 +0,0 @@
1BEGIN;
2
3ALTER TABLE users add customType varchar(32) not null default '';
4ALTER TABLE users add partner char(36) not null default '00000000-0000-0000-0000-000000000000';
5
6COMMIT;
diff --git a/OpenSim/Data/MySQL/Resources/005_AssetStore.sql b/OpenSim/Data/MySQL/Resources/005_AssetStore.sql
deleted file mode 100644
index bfeb652..0000000
--- a/OpenSim/Data/MySQL/Resources/005_AssetStore.sql
+++ /dev/null
@@ -1,6 +0,0 @@
1BEGIN;
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/MySQL/Resources/005_GridStore.sql b/OpenSim/Data/MySQL/Resources/005_GridStore.sql
deleted file mode 100644
index 835ba89..0000000
--- a/OpenSim/Data/MySQL/Resources/005_GridStore.sql
+++ /dev/null
@@ -1,6 +0,0 @@
1BEGIN;
2
3ALTER TABLE `regions` ADD COLUMN `flags` integer NOT NULL DEFAULT 0;
4CREATE INDEX flags ON regions(flags);
5
6COMMIT;
diff --git a/OpenSim/Data/MySQL/Resources/005_RegionStore.sql b/OpenSim/Data/MySQL/Resources/005_RegionStore.sql
deleted file mode 100644
index c4a9527..0000000
--- a/OpenSim/Data/MySQL/Resources/005_RegionStore.sql
+++ /dev/null
@@ -1,40 +0,0 @@
1BEGIN;
2
3create table regionsettings (
4 regionUUID char(36) not null,
5 block_terraform integer not null,
6 block_fly integer not null,
7 allow_damage integer not null,
8 restrict_pushing integer not null,
9 allow_land_resell integer not null,
10 allow_land_join_divide integer not null,
11 block_show_in_search integer not null,
12 agent_limit integer not null,
13 object_bonus float not null,
14 maturity integer not null,
15 disable_scripts integer not null,
16 disable_collisions integer not null,
17 disable_physics integer not null,
18 terrain_texture_1 char(36) not null,
19 terrain_texture_2 char(36) not null,
20 terrain_texture_3 char(36) not null,
21 terrain_texture_4 char(36) not null,
22 elevation_1_nw float not null,
23 elevation_2_nw float not null,
24 elevation_1_ne float not null,
25 elevation_2_ne float not null,
26 elevation_1_se float not null,
27 elevation_2_se float not null,
28 elevation_1_sw float not null,
29 elevation_2_sw float not null,
30 water_height float not null,
31 terrain_raise_limit float not null,
32 terrain_lower_limit float not null,
33 use_estate_sun integer not null,
34 fixed_sun integer not null,
35 sun_position float not null,
36 covenant char(36),
37 primary key(regionUUID)
38);
39
40COMMIT;
diff --git a/OpenSim/Data/MySQL/Resources/005_UserStore.sql b/OpenSim/Data/MySQL/Resources/005_UserStore.sql
deleted file mode 100644
index 55896bc..0000000
--- a/OpenSim/Data/MySQL/Resources/005_UserStore.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN;
2
3CREATE TABLE `avatarattachments` (`UUID` char(36) NOT NULL, `attachpoint` int(11) NOT NULL, `item` char(36) NOT NULL, `asset` char(36) NOT NULL) ENGINE=InnoDB;
4
5COMMIT;
diff --git a/OpenSim/Data/MySQL/Resources/006_AssetStore.sql b/OpenSim/Data/MySQL/Resources/006_AssetStore.sql
deleted file mode 100644
index 3104353..0000000
--- a/OpenSim/Data/MySQL/Resources/006_AssetStore.sql
+++ /dev/null
@@ -1 +0,0 @@
1DELETE FROM assets WHERE id = 'dc4b9f0b-d008-45c6-96a4-01dd947ac621'
diff --git a/OpenSim/Data/MySQL/Resources/006_GridStore.sql b/OpenSim/Data/MySQL/Resources/006_GridStore.sql
deleted file mode 100644
index 91322d6..0000000
--- a/OpenSim/Data/MySQL/Resources/006_GridStore.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN;
2
3ALTER TABLE `regions` ADD COLUMN `last_seen` integer NOT NULL DEFAULT 0;
4
5COMMIT;
diff --git a/OpenSim/Data/MySQL/Resources/006_RegionStore.sql b/OpenSim/Data/MySQL/Resources/006_RegionStore.sql
deleted file mode 100644
index c1ba5b8..0000000
--- a/OpenSim/Data/MySQL/Resources/006_RegionStore.sql
+++ /dev/null
@@ -1,12 +0,0 @@
1BEGIN;
2
3alter table landaccesslist ENGINE = InnoDB;
4alter table migrations ENGINE = InnoDB;
5alter table primitems ENGINE = InnoDB;
6alter table prims ENGINE = InnoDB;
7alter table primshapes ENGINE = InnoDB;
8alter table regionsettings ENGINE = InnoDB;
9alter table terrain ENGINE = InnoDB;
10
11COMMIT;
12
diff --git a/OpenSim/Data/MySQL/Resources/006_UserStore.sql b/OpenSim/Data/MySQL/Resources/006_UserStore.sql
deleted file mode 100644
index 10b321e..0000000
--- a/OpenSim/Data/MySQL/Resources/006_UserStore.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN;
2
3ALTER TABLE agents add currentLookAt varchar(36) not null default '';
4
5COMMIT;
diff --git a/OpenSim/Data/MySQL/Resources/007_GridStore.sql b/OpenSim/Data/MySQL/Resources/007_GridStore.sql
deleted file mode 100644
index dbec584..0000000
--- a/OpenSim/Data/MySQL/Resources/007_GridStore.sql
+++ /dev/null
@@ -1,7 +0,0 @@
1BEGIN;
2
3ALTER TABLE `regions` ADD COLUMN `PrincipalID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000';
4ALTER TABLE `regions` ADD COLUMN `Token` varchar(255) NOT NULL;
5
6COMMIT;
7
diff --git a/OpenSim/Data/MySQL/Resources/007_RegionStore.sql b/OpenSim/Data/MySQL/Resources/007_RegionStore.sql
deleted file mode 100644
index 404d248..0000000
--- a/OpenSim/Data/MySQL/Resources/007_RegionStore.sql
+++ /dev/null
@@ -1,25 +0,0 @@
1BEGIN;
2
3ALTER TABLE prims change UUID UUIDold varchar(255);
4ALTER TABLE prims change RegionUUID RegionUUIDold varchar(255);
5ALTER TABLE prims change CreatorID CreatorIDold varchar(255);
6ALTER TABLE prims change OwnerID OwnerIDold varchar(255);
7ALTER TABLE prims change GroupID GroupIDold varchar(255);
8ALTER TABLE prims change LastOwnerID LastOwnerIDold varchar(255);
9ALTER TABLE prims add UUID char(36);
10ALTER TABLE prims add RegionUUID char(36);
11ALTER TABLE prims add CreatorID char(36);
12ALTER TABLE prims add OwnerID char(36);
13ALTER TABLE prims add GroupID char(36);
14ALTER TABLE prims add LastOwnerID char(36);
15UPDATE prims set UUID = UUIDold, RegionUUID = RegionUUIDold, CreatorID = CreatorIDold, OwnerID = OwnerIDold, GroupID = GroupIDold, LastOwnerID = LastOwnerIDold;
16ALTER TABLE prims drop UUIDold;
17ALTER TABLE prims drop RegionUUIDold;
18ALTER TABLE prims drop CreatorIDold;
19ALTER TABLE prims drop OwnerIDold;
20ALTER TABLE prims drop GroupIDold;
21ALTER TABLE prims drop LastOwnerIDold;
22ALTER TABLE prims add constraint primary key(UUID);
23ALTER TABLE prims add index prims_regionuuid(RegionUUID);
24
25COMMIT; \ No newline at end of file
diff --git a/OpenSim/Data/MySQL/Resources/007_UserStore.sql b/OpenSim/Data/MySQL/Resources/007_UserStore.sql
deleted file mode 100644
index 3ab5261..0000000
--- a/OpenSim/Data/MySQL/Resources/007_UserStore.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN;
2
3ALTER TABLE users add email varchar(250);
4
5COMMIT;
diff --git a/OpenSim/Data/MySQL/Resources/008_RegionStore.sql b/OpenSim/Data/MySQL/Resources/008_RegionStore.sql
deleted file mode 100644
index 7bc61c0..0000000
--- a/OpenSim/Data/MySQL/Resources/008_RegionStore.sql
+++ /dev/null
@@ -1,9 +0,0 @@
1BEGIN;
2
3ALTER TABLE primshapes change UUID UUIDold varchar(255);
4ALTER TABLE primshapes add UUID char(36);
5UPDATE primshapes set UUID = UUIDold;
6ALTER TABLE primshapes drop UUIDold;
7ALTER TABLE primshapes add constraint primary key(UUID);
8
9COMMIT; \ No newline at end of file
diff --git a/OpenSim/Data/MySQL/Resources/008_UserStore.sql b/OpenSim/Data/MySQL/Resources/008_UserStore.sql
deleted file mode 100644
index 4500bd5..0000000
--- a/OpenSim/Data/MySQL/Resources/008_UserStore.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN;
2
3ALTER TABLE users add scopeID char(36) not null default '00000000-0000-0000-0000-000000000000';
4
5COMMIT;
diff --git a/OpenSim/Data/MySQL/Resources/009_RegionStore.sql b/OpenSim/Data/MySQL/Resources/009_RegionStore.sql
deleted file mode 100644
index 284732a..0000000
--- a/OpenSim/Data/MySQL/Resources/009_RegionStore.sql
+++ /dev/null
@@ -1,31 +0,0 @@
1BEGIN;
2
3ALTER TABLE primitems change itemID itemIDold varchar(255);
4ALTER TABLE primitems change primID primIDold varchar(255);
5ALTER TABLE primitems change assetID assetIDold varchar(255);
6ALTER TABLE primitems change parentFolderID parentFolderIDold varchar(255);
7ALTER TABLE primitems change creatorID creatorIDold varchar(255);
8ALTER TABLE primitems change ownerID ownerIDold varchar(255);
9ALTER TABLE primitems change groupID groupIDold varchar(255);
10ALTER TABLE primitems change lastOwnerID lastOwnerIDold varchar(255);
11ALTER TABLE primitems add itemID char(36);
12ALTER TABLE primitems add primID char(36);
13ALTER TABLE primitems add assetID char(36);
14ALTER TABLE primitems add parentFolderID char(36);
15ALTER TABLE primitems add creatorID char(36);
16ALTER TABLE primitems add ownerID char(36);
17ALTER TABLE primitems add groupID char(36);
18ALTER TABLE primitems add lastOwnerID char(36);
19UPDATE primitems set itemID = itemIDold, primID = primIDold, assetID = assetIDold, parentFolderID = parentFolderIDold, creatorID = creatorIDold, ownerID = ownerIDold, groupID = groupIDold, lastOwnerID = lastOwnerIDold;
20ALTER TABLE primitems drop itemIDold;
21ALTER TABLE primitems drop primIDold;
22ALTER TABLE primitems drop assetIDold;
23ALTER TABLE primitems drop parentFolderIDold;
24ALTER TABLE primitems drop creatorIDold;
25ALTER TABLE primitems drop ownerIDold;
26ALTER TABLE primitems drop groupIDold;
27ALTER TABLE primitems drop lastOwnerIDold;
28ALTER TABLE primitems add constraint primary key(itemID);
29ALTER TABLE primitems add index primitems_primid(primID);
30
31COMMIT; \ No newline at end of file
diff --git a/OpenSim/Data/MySQL/Resources/010_RegionStore.sql b/OpenSim/Data/MySQL/Resources/010_RegionStore.sql
deleted file mode 100644
index 031a746..0000000
--- a/OpenSim/Data/MySQL/Resources/010_RegionStore.sql
+++ /dev/null
@@ -1,9 +0,0 @@
1# 1 "010_RegionStore.sql"
2# 1 "<built-in>"
3# 1 "<command line>"
4# 1 "010_RegionStore.sql"
5BEGIN;
6
7DELETE FROM regionsettings;
8
9COMMIT;
diff --git a/OpenSim/Data/MySQL/Resources/011_RegionStore.sql b/OpenSim/Data/MySQL/Resources/011_RegionStore.sql
deleted file mode 100644
index ab01969..0000000
--- a/OpenSim/Data/MySQL/Resources/011_RegionStore.sql
+++ /dev/null
@@ -1,9 +0,0 @@
1BEGIN;
2
3ALTER TABLE prims change SceneGroupID SceneGroupIDold varchar(255);
4ALTER TABLE prims add SceneGroupID char(36);
5UPDATE prims set SceneGroupID = SceneGroupIDold;
6ALTER TABLE prims drop SceneGroupIDold;
7ALTER TABLE prims add index prims_scenegroupid(SceneGroupID);
8
9COMMIT; \ No newline at end of file
diff --git a/OpenSim/Data/MySQL/Resources/012_RegionStore.sql b/OpenSim/Data/MySQL/Resources/012_RegionStore.sql
deleted file mode 100644
index 95c2757..0000000
--- a/OpenSim/Data/MySQL/Resources/012_RegionStore.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN;
2
3ALTER TABLE prims add index prims_parentid(ParentID);
4
5COMMIT; \ No newline at end of file
diff --git a/OpenSim/Data/MySQL/Resources/013_RegionStore.sql b/OpenSim/Data/MySQL/Resources/013_RegionStore.sql
deleted file mode 100644
index a6bd30d..0000000
--- a/OpenSim/Data/MySQL/Resources/013_RegionStore.sql
+++ /dev/null
@@ -1,103 +0,0 @@
1begin;
2
3drop table regionsettings;
4
5CREATE TABLE `regionsettings` (
6 `regionUUID` char(36) NOT NULL,
7 `block_terraform` int(11) NOT NULL,
8 `block_fly` int(11) NOT NULL,
9 `allow_damage` int(11) NOT NULL,
10 `restrict_pushing` int(11) NOT NULL,
11 `allow_land_resell` int(11) NOT NULL,
12 `allow_land_join_divide` int(11) NOT NULL,
13 `block_show_in_search` int(11) NOT NULL,
14 `agent_limit` int(11) NOT NULL,
15 `object_bonus` float NOT NULL,
16 `maturity` int(11) NOT NULL,
17 `disable_scripts` int(11) NOT NULL,
18 `disable_collisions` int(11) NOT NULL,
19 `disable_physics` int(11) NOT NULL,
20 `terrain_texture_1` char(36) NOT NULL,
21 `terrain_texture_2` char(36) NOT NULL,
22 `terrain_texture_3` char(36) NOT NULL,
23 `terrain_texture_4` char(36) NOT NULL,
24 `elevation_1_nw` float NOT NULL,
25 `elevation_2_nw` float NOT NULL,
26 `elevation_1_ne` float NOT NULL,
27 `elevation_2_ne` float NOT NULL,
28 `elevation_1_se` float NOT NULL,
29 `elevation_2_se` float NOT NULL,
30 `elevation_1_sw` float NOT NULL,
31 `elevation_2_sw` float NOT NULL,
32 `water_height` float NOT NULL,
33 `terrain_raise_limit` float NOT NULL,
34 `terrain_lower_limit` float NOT NULL,
35 `use_estate_sun` int(11) NOT NULL,
36 `fixed_sun` int(11) NOT NULL,
37 `sun_position` float NOT NULL,
38 `covenant` char(36) default NULL,
39 `Sandbox` tinyint(4) NOT NULL,
40 PRIMARY KEY (`regionUUID`)
41) ENGINE=InnoDB;
42
43CREATE TABLE `estate_managers` (
44 `EstateID` int(10) unsigned NOT NULL,
45 `uuid` char(36) NOT NULL,
46 KEY `EstateID` (`EstateID`)
47) ENGINE=InnoDB;
48
49CREATE TABLE `estate_groups` (
50 `EstateID` int(10) unsigned NOT NULL,
51 `uuid` char(36) NOT NULL,
52 KEY `EstateID` (`EstateID`)
53) ENGINE=InnoDB;
54
55CREATE TABLE `estate_users` (
56 `EstateID` int(10) unsigned NOT NULL,
57 `uuid` char(36) NOT NULL,
58 KEY `EstateID` (`EstateID`)
59) ENGINE=InnoDB;
60
61CREATE TABLE `estateban` (
62 `EstateID` int(10) unsigned NOT NULL,
63 `bannedUUID` varchar(36) NOT NULL,
64 `bannedIp` varchar(16) NOT NULL,
65 `bannedIpHostMask` varchar(16) NOT NULL,
66 `bannedNameMask` varchar(64) default NULL,
67 KEY `estateban_EstateID` (`EstateID`)
68) ENGINE=InnoDB;
69
70CREATE TABLE `estate_settings` (
71 `EstateID` int(10) unsigned NOT NULL auto_increment,
72 `EstateName` varchar(64) default NULL,
73 `AbuseEmailToEstateOwner` tinyint(4) NOT NULL,
74 `DenyAnonymous` tinyint(4) NOT NULL,
75 `ResetHomeOnTeleport` tinyint(4) NOT NULL,
76 `FixedSun` tinyint(4) NOT NULL,
77 `DenyTransacted` tinyint(4) NOT NULL,
78 `BlockDwell` tinyint(4) NOT NULL,
79 `DenyIdentified` tinyint(4) NOT NULL,
80 `AllowVoice` tinyint(4) NOT NULL,
81 `UseGlobalTime` tinyint(4) NOT NULL,
82 `PricePerMeter` int(11) NOT NULL,
83 `TaxFree` tinyint(4) NOT NULL,
84 `AllowDirectTeleport` tinyint(4) NOT NULL,
85 `RedirectGridX` int(11) NOT NULL,
86 `RedirectGridY` int(11) NOT NULL,
87 `ParentEstateID` int(10) unsigned NOT NULL,
88 `SunPosition` double NOT NULL,
89 `EstateSkipScripts` tinyint(4) NOT NULL,
90 `BillableFactor` float NOT NULL,
91 `PublicAccess` tinyint(4) NOT NULL,
92 PRIMARY KEY (`EstateID`)
93) ENGINE=InnoDB AUTO_INCREMENT=100;
94
95CREATE TABLE `estate_map` (
96 `RegionID` char(36) NOT NULL default '00000000-0000-0000-0000-000000000000',
97 `EstateID` int(11) NOT NULL,
98 PRIMARY KEY (`RegionID`),
99 KEY `EstateID` (`EstateID`)
100) ENGINE=InnoDB;
101
102commit;
103
diff --git a/OpenSim/Data/MySQL/Resources/014_RegionStore.sql b/OpenSim/Data/MySQL/Resources/014_RegionStore.sql
deleted file mode 100644
index 788fd63..0000000
--- a/OpenSim/Data/MySQL/Resources/014_RegionStore.sql
+++ /dev/null
@@ -1,8 +0,0 @@
1begin;
2
3alter table estate_settings add column AbuseEmail varchar(255) not null;
4
5alter table estate_settings add column EstateOwner varchar(36) not null;
6
7commit;
8
diff --git a/OpenSim/Data/MySQL/Resources/015_RegionStore.sql b/OpenSim/Data/MySQL/Resources/015_RegionStore.sql
deleted file mode 100644
index 6d4f9f3..0000000
--- a/OpenSim/Data/MySQL/Resources/015_RegionStore.sql
+++ /dev/null
@@ -1,6 +0,0 @@
1begin;
2
3alter table estate_settings add column DenyMinors tinyint not null;
4
5commit;
6
diff --git a/OpenSim/Data/MySQL/Resources/016_RegionStore.sql b/OpenSim/Data/MySQL/Resources/016_RegionStore.sql
deleted file mode 100644
index 9bc265e..0000000
--- a/OpenSim/Data/MySQL/Resources/016_RegionStore.sql
+++ /dev/null
@@ -1,27 +0,0 @@
1BEGIN;
2
3ALTER TABLE prims ADD COLUMN PayPrice integer not null default 0;
4ALTER TABLE prims ADD COLUMN PayButton1 integer not null default 0;
5ALTER TABLE prims ADD COLUMN PayButton2 integer not null default 0;
6ALTER TABLE prims ADD COLUMN PayButton3 integer not null default 0;
7ALTER TABLE prims ADD COLUMN PayButton4 integer not null default 0;
8ALTER TABLE prims ADD COLUMN LoopedSound char(36) not null default '00000000-0000-0000-0000-000000000000';
9ALTER TABLE prims ADD COLUMN LoopedSoundGain float not null default 0.0;
10ALTER TABLE prims ADD COLUMN TextureAnimation blob;
11ALTER TABLE prims ADD COLUMN OmegaX float not null default 0.0;
12ALTER TABLE prims ADD COLUMN OmegaY float not null default 0.0;
13ALTER TABLE prims ADD COLUMN OmegaZ float not null default 0.0;
14ALTER TABLE prims ADD COLUMN CameraEyeOffsetX float not null default 0.0;
15ALTER TABLE prims ADD COLUMN CameraEyeOffsetY float not null default 0.0;
16ALTER TABLE prims ADD COLUMN CameraEyeOffsetZ float not null default 0.0;
17ALTER TABLE prims ADD COLUMN CameraAtOffsetX float not null default 0.0;
18ALTER TABLE prims ADD COLUMN CameraAtOffsetY float not null default 0.0;
19ALTER TABLE prims ADD COLUMN CameraAtOffsetZ float not null default 0.0;
20ALTER TABLE prims ADD COLUMN ForceMouselook tinyint not null default 0;
21ALTER TABLE prims ADD COLUMN ScriptAccessPin integer not null default 0;
22ALTER TABLE prims ADD COLUMN AllowedDrop tinyint not null default 0;
23ALTER TABLE prims ADD COLUMN DieAtEdge tinyint not null default 0;
24ALTER TABLE prims ADD COLUMN SalePrice integer not null default 10;
25ALTER TABLE prims ADD COLUMN SaleType tinyint not null default 0;
26
27COMMIT;
diff --git a/OpenSim/Data/MySQL/Resources/017_RegionStore.sql b/OpenSim/Data/MySQL/Resources/017_RegionStore.sql
deleted file mode 100644
index 0304f30..0000000
--- a/OpenSim/Data/MySQL/Resources/017_RegionStore.sql
+++ /dev/null
@@ -1,9 +0,0 @@
1BEGIN;
2
3ALTER TABLE prims ADD COLUMN ColorR integer not null default 0;
4ALTER TABLE prims ADD COLUMN ColorG integer not null default 0;
5ALTER TABLE prims ADD COLUMN ColorB integer not null default 0;
6ALTER TABLE prims ADD COLUMN ColorA integer not null default 0;
7ALTER TABLE prims ADD COLUMN ParticleSystem blob;
8
9COMMIT;
diff --git a/OpenSim/Data/MySQL/Resources/018_RegionStore.sql b/OpenSim/Data/MySQL/Resources/018_RegionStore.sql
deleted file mode 100644
index 68c489c..0000000
--- a/OpenSim/Data/MySQL/Resources/018_RegionStore.sql
+++ /dev/null
@@ -1,6 +0,0 @@
1begin;
2
3ALTER TABLE prims ADD COLUMN ClickAction tinyint NOT NULL default 0;
4
5commit;
6
diff --git a/OpenSim/Data/MySQL/Resources/019_RegionStore.sql b/OpenSim/Data/MySQL/Resources/019_RegionStore.sql
deleted file mode 100644
index 4c14f2a..0000000
--- a/OpenSim/Data/MySQL/Resources/019_RegionStore.sql
+++ /dev/null
@@ -1,6 +0,0 @@
1begin;
2
3ALTER TABLE prims ADD COLUMN Material tinyint NOT NULL default 3;
4
5commit;
6
diff --git a/OpenSim/Data/MySQL/Resources/020_RegionStore.sql b/OpenSim/Data/MySQL/Resources/020_RegionStore.sql
deleted file mode 100644
index 814ef48..0000000
--- a/OpenSim/Data/MySQL/Resources/020_RegionStore.sql
+++ /dev/null
@@ -1,7 +0,0 @@
1begin;
2
3ALTER TABLE land ADD COLUMN OtherCleanTime integer NOT NULL default 0;
4ALTER TABLE land ADD COLUMN Dwell integer NOT NULL default 0;
5
6commit;
7
diff --git a/OpenSim/Data/MySQL/Resources/021_RegionStore.sql b/OpenSim/Data/MySQL/Resources/021_RegionStore.sql
deleted file mode 100644
index c59b27e..0000000
--- a/OpenSim/Data/MySQL/Resources/021_RegionStore.sql
+++ /dev/null
@@ -1,8 +0,0 @@
1begin;
2
3ALTER TABLE regionsettings ADD COLUMN sunvectorx double NOT NULL default 0;
4ALTER TABLE regionsettings ADD COLUMN sunvectory double NOT NULL default 0;
5ALTER TABLE regionsettings ADD COLUMN sunvectorz double NOT NULL default 0;
6
7commit;
8
diff --git a/OpenSim/Data/MySQL/Resources/022_RegionStore.sql b/OpenSim/Data/MySQL/Resources/022_RegionStore.sql
deleted file mode 100644
index df0bb7d..0000000
--- a/OpenSim/Data/MySQL/Resources/022_RegionStore.sql
+++ /dev/null
@@ -1,6 +0,0 @@
1BEGIN;
2
3ALTER TABLE prims ADD COLUMN CollisionSound char(36) not null default '00000000-0000-0000-0000-000000000000';
4ALTER TABLE prims ADD COLUMN CollisionSoundVolume float not null default 0.0;
5
6COMMIT;
diff --git a/OpenSim/Data/MySQL/Resources/023_RegionStore.sql b/OpenSim/Data/MySQL/Resources/023_RegionStore.sql
deleted file mode 100644
index 559591f..0000000
--- a/OpenSim/Data/MySQL/Resources/023_RegionStore.sql
+++ /dev/null
@@ -1,6 +0,0 @@
1BEGIN;
2
3ALTER TABLE prims ADD COLUMN LinkNumber integer not null default 0;
4
5COMMIT;
6
diff --git a/OpenSim/Data/MySQL/Resources/024_RegionStore.sql b/OpenSim/Data/MySQL/Resources/024_RegionStore.sql
deleted file mode 100644
index defbf5c..0000000
--- a/OpenSim/Data/MySQL/Resources/024_RegionStore.sql
+++ /dev/null
@@ -1,18 +0,0 @@
1BEGIN;
2
3alter table regionsettings change column `object_bonus` `object_bonus` double NOT NULL;
4alter table regionsettings change column `elevation_1_nw` `elevation_1_nw` double NOT NULL;
5alter table regionsettings change column `elevation_2_nw` `elevation_2_nw` double NOT NULL;
6alter table regionsettings change column `elevation_1_ne` `elevation_1_ne` double NOT NULL;
7alter table regionsettings change column `elevation_2_ne` `elevation_2_ne` double NOT NULL;
8alter table regionsettings change column `elevation_1_se` `elevation_1_se` double NOT NULL;
9alter table regionsettings change column `elevation_2_se` `elevation_2_se` double NOT NULL;
10alter table regionsettings change column `elevation_1_sw` `elevation_1_sw` double NOT NULL;
11alter table regionsettings change column `elevation_2_sw` `elevation_2_sw` double NOT NULL;
12alter table regionsettings change column `water_height` `water_height` double NOT NULL;
13alter table regionsettings change column `terrain_raise_limit` `terrain_raise_limit` double NOT NULL;
14alter table regionsettings change column `terrain_lower_limit` `terrain_lower_limit` double NOT NULL;
15alter table regionsettings change column `sun_position` `sun_position` double NOT NULL;
16
17COMMIT;
18
diff --git a/OpenSim/Data/MySQL/Resources/025_RegionStore.sql b/OpenSim/Data/MySQL/Resources/025_RegionStore.sql
deleted file mode 100644
index e8f5d70..0000000
--- a/OpenSim/Data/MySQL/Resources/025_RegionStore.sql
+++ /dev/null
@@ -1,46 +0,0 @@
1BEGIN;
2
3alter table prims change column `PositionX` `PositionX` double default NULL;
4alter table prims change column `PositionY` `PositionY` double default NULL;
5alter table prims change column `PositionZ` `PositionZ` double default NULL;
6alter table prims change column `GroupPositionX` `GroupPositionX` double default NULL;
7alter table prims change column `GroupPositionY` `GroupPositionY` double default NULL;
8alter table prims change column `GroupPositionZ` `GroupPositionZ` double default NULL;
9alter table prims change column `VelocityX` `VelocityX` double default NULL;
10alter table prims change column `VelocityY` `VelocityY` double default NULL;
11alter table prims change column `VelocityZ` `VelocityZ` double default NULL;
12alter table prims change column `AngularVelocityX` `AngularVelocityX` double default NULL;
13alter table prims change column `AngularVelocityY` `AngularVelocityY` double default NULL;
14alter table prims change column `AngularVelocityZ` `AngularVelocityZ` double default NULL;
15alter table prims change column `AccelerationX` `AccelerationX` double default NULL;
16alter table prims change column `AccelerationY` `AccelerationY` double default NULL;
17alter table prims change column `AccelerationZ` `AccelerationZ` double default NULL;
18alter table prims change column `RotationX` `RotationX` double default NULL;
19alter table prims change column `RotationY` `RotationY` double default NULL;
20alter table prims change column `RotationZ` `RotationZ` double default NULL;
21alter table prims change column `RotationW` `RotationW` double default NULL;
22alter table prims change column `SitTargetOffsetX` `SitTargetOffsetX` double default NULL;
23alter table prims change column `SitTargetOffsetY` `SitTargetOffsetY` double default NULL;
24alter table prims change column `SitTargetOffsetZ` `SitTargetOffsetZ` double default NULL;
25alter table prims change column `SitTargetOrientW` `SitTargetOrientW` double default NULL;
26alter table prims change column `SitTargetOrientX` `SitTargetOrientX` double default NULL;
27alter table prims change column `SitTargetOrientY` `SitTargetOrientY` double default NULL;
28alter table prims change column `SitTargetOrientZ` `SitTargetOrientZ` double default NULL;
29alter table prims change column `LoopedSoundGain` `LoopedSoundGain` double NOT NULL default '0';
30alter table prims change column `OmegaX` `OmegaX` double NOT NULL default '0';
31alter table prims change column `OmegaY` `OmegaY` double NOT NULL default '0';
32alter table prims change column `OmegaZ` `OmegaZ` double NOT NULL default '0';
33alter table prims change column `CameraEyeOffsetX` `CameraEyeOffsetX` double NOT NULL default '0';
34alter table prims change column `CameraEyeOffsetY` `CameraEyeOffsetY` double NOT NULL default '0';
35alter table prims change column `CameraEyeOffsetZ` `CameraEyeOffsetZ` double NOT NULL default '0';
36alter table prims change column `CameraAtOffsetX` `CameraAtOffsetX` double NOT NULL default '0';
37alter table prims change column `CameraAtOffsetY` `CameraAtOffsetY` double NOT NULL default '0';
38alter table prims change column `CameraAtOffsetZ` `CameraAtOffsetZ` double NOT NULL default '0';
39alter table prims change column `CollisionSoundVolume` `CollisionSoundVolume` double NOT NULL default '0';
40
41alter table primshapes change column `ScaleX` `ScaleX` double NOT NULL default '0';
42alter table primshapes change column `ScaleY` `ScaleY` double NOT NULL default '0';
43alter table primshapes change column `ScaleZ` `ScaleZ` double NOT NULL default '0';
44
45COMMIT;
46
diff --git a/OpenSim/Data/MySQL/Resources/026_RegionStore.sql b/OpenSim/Data/MySQL/Resources/026_RegionStore.sql
deleted file mode 100644
index 91af8a8..0000000
--- a/OpenSim/Data/MySQL/Resources/026_RegionStore.sql
+++ /dev/null
@@ -1,41 +0,0 @@
1begin;
2
3alter table prims change column `PositionX` `PositionX` double default NULL;
4alter table prims change column `PositionY` `PositionY` double default NULL;
5alter table prims change column `PositionZ` `PositionZ` double default NULL;
6alter table prims change column `GroupPositionX` `GroupPositionX` double default NULL;
7alter table prims change column `GroupPositionY` `GroupPositionY` double default NULL;
8alter table prims change column `GroupPositionZ` `GroupPositionZ` double default NULL;
9alter table prims change column `VelocityX` `VelocityX` double default NULL;
10alter table prims change column `VelocityY` `VelocityY` double default NULL;
11alter table prims change column `VelocityZ` `VelocityZ` double default NULL;
12alter table prims change column `AngularVelocityX` `AngularVelocityX` double default NULL;
13alter table prims change column `AngularVelocityY` `AngularVelocityY` double default NULL;
14alter table prims change column `AngularVelocityZ` `AngularVelocityZ` double default NULL;
15alter table prims change column `AccelerationX` `AccelerationX` double default NULL;
16alter table prims change column `AccelerationY` `AccelerationY` double default NULL;
17alter table prims change column `AccelerationZ` `AccelerationZ` double default NULL;
18alter table prims change column `RotationX` `RotationX` double default NULL;
19alter table prims change column `RotationY` `RotationY` double default NULL;
20alter table prims change column `RotationZ` `RotationZ` double default NULL;
21alter table prims change column `RotationW` `RotationW` double default NULL;
22alter table prims change column `SitTargetOffsetX` `SitTargetOffsetX` double default NULL;
23alter table prims change column `SitTargetOffsetY` `SitTargetOffsetY` double default NULL;
24alter table prims change column `SitTargetOffsetZ` `SitTargetOffsetZ` double default NULL;
25alter table prims change column `SitTargetOrientW` `SitTargetOrientW` double default NULL;
26alter table prims change column `SitTargetOrientX` `SitTargetOrientX` double default NULL;
27alter table prims change column `SitTargetOrientY` `SitTargetOrientY` double default NULL;
28alter table prims change column `SitTargetOrientZ` `SitTargetOrientZ` double default NULL;
29alter table prims change column `LoopedSoundGain` `LoopedSoundGain` double NOT NULL default '0';
30alter table prims change column `OmegaX` `OmegaX` double NOT NULL default '0';
31alter table prims change column `OmegaY` `OmegaY` double NOT NULL default '0';
32alter table prims change column `OmegaZ` `OmegaZ` double NOT NULL default '0';
33alter table prims change column `CameraEyeOffsetX` `CameraEyeOffsetX` double NOT NULL default '0';
34alter table prims change column `CameraEyeOffsetY` `CameraEyeOffsetY` double NOT NULL default '0';
35alter table prims change column `CameraEyeOffsetZ` `CameraEyeOffsetZ` double NOT NULL default '0';
36alter table prims change column `CameraAtOffsetX` `CameraAtOffsetX` double NOT NULL default '0';
37alter table prims change column `CameraAtOffsetY` `CameraAtOffsetY` double NOT NULL default '0';
38alter table prims change column `CameraAtOffsetZ` `CameraAtOffsetZ` double NOT NULL default '0';
39alter table prims change column `CollisionSoundVolume` `CollisionSoundVolume` double NOT NULL default '0';
40
41commit;
diff --git a/OpenSim/Data/MySQL/Resources/027_RegionStore.sql b/OpenSim/Data/MySQL/Resources/027_RegionStore.sql
deleted file mode 100644
index e1efab3..0000000
--- a/OpenSim/Data/MySQL/Resources/027_RegionStore.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN;
2
3ALTER TABLE prims DROP COLUMN ParentID;
4
5COMMIT; \ No newline at end of file
diff --git a/OpenSim/Data/MySQL/Resources/028_RegionStore.sql b/OpenSim/Data/MySQL/Resources/028_RegionStore.sql
deleted file mode 100644
index 078394f..0000000
--- a/OpenSim/Data/MySQL/Resources/028_RegionStore.sql
+++ /dev/null
@@ -1,79 +0,0 @@
1BEGIN;
2
3update terrain
4 set RegionUUID = concat(substr(RegionUUID, 1, 8), "-", substr(RegionUUID, 9, 4), "-", substr(RegionUUID, 13, 4), "-", substr(RegionUUID, 17, 4), "-", substr(RegionUUID, 21, 12))
5 where RegionUUID not like '%-%';
6
7
8update landaccesslist
9 set LandUUID = concat(substr(LandUUID, 1, 8), "-", substr(LandUUID, 9, 4), "-", substr(LandUUID, 13, 4), "-", substr(LandUUID, 17, 4), "-", substr(LandUUID, 21, 12))
10 where LandUUID not like '%-%';
11
12update landaccesslist
13 set AccessUUID = concat(substr(AccessUUID, 1, 8), "-", substr(AccessUUID, 9, 4), "-", substr(AccessUUID, 13, 4), "-", substr(AccessUUID, 17, 4), "-", substr(AccessUUID, 21, 12))
14 where AccessUUID not like '%-%';
15
16
17update prims
18 set UUID = concat(substr(UUID, 1, 8), "-", substr(UUID, 9, 4), "-", substr(UUID, 13, 4), "-", substr(UUID, 17, 4), "-", substr(UUID, 21, 12))
19 where UUID not like '%-%';
20
21update prims
22 set RegionUUID = concat(substr(RegionUUID, 1, 8), "-", substr(RegionUUID, 9, 4), "-", substr(RegionUUID, 13, 4), "-", substr(RegionUUID, 17, 4), "-", substr(RegionUUID, 21, 12))
23 where RegionUUID not like '%-%';
24
25update prims
26 set SceneGroupID = concat(substr(SceneGroupID, 1, 8), "-", substr(SceneGroupID, 9, 4), "-", substr(SceneGroupID, 13, 4), "-", substr(SceneGroupID, 17, 4), "-", substr(SceneGroupID, 21, 12))
27 where SceneGroupID not like '%-%';
28
29update prims
30 set CreatorID = concat(substr(CreatorID, 1, 8), "-", substr(CreatorID, 9, 4), "-", substr(CreatorID, 13, 4), "-", substr(CreatorID, 17, 4), "-", substr(CreatorID, 21, 12))
31 where CreatorID not like '%-%';
32
33update prims
34 set OwnerID = concat(substr(OwnerID, 1, 8), "-", substr(OwnerID, 9, 4), "-", substr(OwnerID, 13, 4), "-", substr(OwnerID, 17, 4), "-", substr(OwnerID, 21, 12))
35 where OwnerID not like '%-%';
36
37update prims
38 set GroupID = concat(substr(GroupID, 1, 8), "-", substr(GroupID, 9, 4), "-", substr(GroupID, 13, 4), "-", substr(GroupID, 17, 4), "-", substr(GroupID, 21, 12))
39 where GroupID not like '%-%';
40
41update prims
42 set LastOwnerID = concat(substr(LastOwnerID, 1, 8), "-", substr(LastOwnerID, 9, 4), "-", substr(LastOwnerID, 13, 4), "-", substr(LastOwnerID, 17, 4), "-", substr(LastOwnerID, 21, 12))
43 where LastOwnerID not like '%-%';
44
45
46update primshapes
47 set UUID = concat(substr(UUID, 1, 8), "-", substr(UUID, 9, 4), "-", substr(UUID, 13, 4), "-", substr(UUID, 17, 4), "-", substr(UUID, 21, 12))
48 where UUID not like '%-%';
49
50
51update land
52 set UUID = concat(substr(UUID, 1, 8), "-", substr(UUID, 9, 4), "-", substr(UUID, 13, 4), "-", substr(UUID, 17, 4), "-", substr(UUID, 21, 12))
53 where UUID not like '%-%';
54
55update land
56 set RegionUUID = concat(substr(RegionUUID, 1, 8), "-", substr(RegionUUID, 9, 4), "-", substr(RegionUUID, 13, 4), "-", substr(RegionUUID, 17, 4), "-", substr(RegionUUID, 21, 12))
57 where RegionUUID not like '%-%';
58
59update land
60 set OwnerUUID = concat(substr(OwnerUUID, 1, 8), "-", substr(OwnerUUID, 9, 4), "-", substr(OwnerUUID, 13, 4), "-", substr(OwnerUUID, 17, 4), "-", substr(OwnerUUID, 21, 12))
61 where OwnerUUID not like '%-%';
62
63update land
64 set GroupUUID = concat(substr(GroupUUID, 1, 8), "-", substr(GroupUUID, 9, 4), "-", substr(GroupUUID, 13, 4), "-", substr(GroupUUID, 17, 4), "-", substr(GroupUUID, 21, 12))
65 where GroupUUID not like '%-%';
66
67update land
68 set MediaTextureUUID = concat(substr(MediaTextureUUID, 1, 8), "-", substr(MediaTextureUUID, 9, 4), "-", substr(MediaTextureUUID, 13, 4), "-", substr(MediaTextureUUID, 17, 4), "-", substr(MediaTextureUUID, 21, 12))
69 where MediaTextureUUID not like '%-%';
70
71update land
72 set SnapshotUUID = concat(substr(SnapshotUUID, 1, 8), "-", substr(SnapshotUUID, 9, 4), "-", substr(SnapshotUUID, 13, 4), "-", substr(SnapshotUUID, 17, 4), "-", substr(SnapshotUUID, 21, 12))
73 where SnapshotUUID not like '%-%';
74
75update land
76 set AuthbuyerID = concat(substr(AuthbuyerID, 1, 8), "-", substr(AuthbuyerID, 9, 4), "-", substr(AuthbuyerID, 13, 4), "-", substr(AuthbuyerID, 17, 4), "-", substr(AuthbuyerID, 21, 12))
77 where AuthbuyerID not like '%-%';
78
79COMMIT; \ No newline at end of file
diff --git a/OpenSim/Data/MySQL/Resources/029_RegionStore.sql b/OpenSim/Data/MySQL/Resources/029_RegionStore.sql
deleted file mode 100644
index b5962a2..0000000
--- a/OpenSim/Data/MySQL/Resources/029_RegionStore.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN;
2
3ALTER TABLE prims ADD COLUMN PassTouches tinyint not null default 0;
4
5COMMIT;
diff --git a/OpenSim/Data/MySQL/Resources/030_RegionStore.sql b/OpenSim/Data/MySQL/Resources/030_RegionStore.sql
deleted file mode 100644
index dfdcf6d..0000000
--- a/OpenSim/Data/MySQL/Resources/030_RegionStore.sql
+++ /dev/null
@@ -1,7 +0,0 @@
1BEGIN;
2
3ALTER TABLE regionsettings ADD COLUMN loaded_creation_date varchar(20) default NULL;
4ALTER TABLE regionsettings ADD COLUMN loaded_creation_time varchar(20) default NULL;
5ALTER TABLE regionsettings ADD COLUMN loaded_creation_id varchar(64) default NULL;
6
7COMMIT;
diff --git a/OpenSim/Data/MySQL/Resources/031_RegionStore.sql b/OpenSim/Data/MySQL/Resources/031_RegionStore.sql
deleted file mode 100644
index d069296..0000000
--- a/OpenSim/Data/MySQL/Resources/031_RegionStore.sql
+++ /dev/null
@@ -1,7 +0,0 @@
1BEGIN;
2
3ALTER TABLE regionsettings DROP COLUMN loaded_creation_date;
4ALTER TABLE regionsettings DROP COLUMN loaded_creation_time;
5ALTER TABLE regionsettings ADD COLUMN loaded_creation_datetime int unsigned NOT NULL default 0;
6
7COMMIT;
diff --git a/OpenSim/Data/MySQL/Resources/032_RegionStore.sql b/OpenSim/Data/MySQL/Resources/032_RegionStore.sql
deleted file mode 100644
index dca5de7..0000000
--- a/OpenSim/Data/MySQL/Resources/032_RegionStore.sql
+++ /dev/null
@@ -1,3 +0,0 @@
1BEGIN;
2ALTER TABLE estate_settings AUTO_INCREMENT = 100;
3COMMIT;
diff --git a/OpenSim/Data/MySQL/Resources/AssetStore.migrations b/OpenSim/Data/MySQL/Resources/AssetStore.migrations
new file mode 100644
index 0000000..b9595f0
--- /dev/null
+++ b/OpenSim/Data/MySQL/Resources/AssetStore.migrations
@@ -0,0 +1,69 @@
1# -----------------
2:VERSION 1
3
4BEGIN;
5
6CREATE TABLE `assets` (
7 `id` binary(16) NOT NULL,
8 `name` varchar(64) NOT NULL,
9 `description` varchar(64) NOT NULL,
10 `assetType` tinyint(4) NOT NULL,
11 `invType` tinyint(4) NOT NULL,
12 `local` tinyint(1) NOT NULL,
13 `temporary` tinyint(1) NOT NULL,
14 `data` longblob NOT NULL,
15 PRIMARY KEY (`id`)
16) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
17
18COMMIT;
19
20# -----------------
21:VERSION 2
22
23BEGIN;
24
25ALTER TABLE assets change id oldid binary(16);
26ALTER TABLE assets add id varchar(36) not null default '';
27UPDATE assets set id = concat(substr(hex(oldid),1,8),"-",substr(hex(oldid),9,4),"-",substr(hex(oldid),13,4),"-",substr(hex(oldid),17,4),"-",substr(hex(oldid),21,12));
28ALTER TABLE assets drop oldid;
29ALTER TABLE assets add constraint primary key(id);
30
31COMMIT;
32
33# -----------------
34:VERSION 3
35
36BEGIN;
37
38ALTER TABLE assets change id oldid varchar(36);
39ALTER TABLE assets add id char(36) not null default '00000000-0000-0000-0000-000000000000';
40UPDATE assets set id = oldid;
41ALTER TABLE assets drop oldid;
42ALTER TABLE assets add constraint primary key(id);
43
44COMMIT;
45
46# -----------------
47:VERSION 4
48
49BEGIN;
50
51ALTER TABLE assets drop InvType;
52
53COMMIT;
54
55# -----------------
56:VERSION 5
57
58BEGIN;
59
60ALTER TABLE assets add create_time integer default 0;
61ALTER TABLE assets add access_time integer default 0;
62
63COMMIT;
64
65# -----------------
66:VERSION 6
67
68DELETE FROM assets WHERE id = 'dc4b9f0b-d008-45c6-96a4-01dd947ac621'
69
diff --git a/OpenSim/Data/MySQL/Resources/001_AuthStore.sql b/OpenSim/Data/MySQL/Resources/AuthStore.migrations
index c7e16fb..023c786 100644
--- a/OpenSim/Data/MySQL/Resources/001_AuthStore.sql
+++ b/OpenSim/Data/MySQL/Resources/AuthStore.migrations
@@ -1,3 +1,5 @@
1:VERSION 1 # -------------------------------
2
1begin; 3begin;
2 4
3CREATE TABLE `auth` ( 5CREATE TABLE `auth` (
@@ -19,3 +21,19 @@ CREATE TABLE `tokens` (
19) ENGINE=InnoDB; 21) ENGINE=InnoDB;
20 22
21commit; 23commit;
24
25:VERSION 2 # -------------------------------
26
27BEGIN;
28
29INSERT INTO auth (UUID, passwordHash, passwordSalt, webLoginKey) SELECT `UUID` AS UUID, `passwordHash` AS passwordHash, `passwordSalt` AS passwordSalt, `webLoginKey` AS webLoginKey FROM users;
30
31COMMIT;
32
33:VERSION 3 # -------------------------------
34
35BEGIN;
36
37ALTER TABLE `auth` ADD COLUMN `accountType` VARCHAR(32) NOT NULL DEFAULT 'UserAccount';
38
39COMMIT;
diff --git a/OpenSim/Data/MySQL/Resources/Avatar.migrations b/OpenSim/Data/MySQL/Resources/Avatar.migrations
new file mode 100644
index 0000000..8d0eee6
--- /dev/null
+++ b/OpenSim/Data/MySQL/Resources/Avatar.migrations
@@ -0,0 +1,12 @@
1:VERSION 1
2
3BEGIN;
4
5CREATE TABLE Avatars (
6 PrincipalID CHAR(36) NOT NULL,
7 Name VARCHAR(32) NOT NULL,
8 Value VARCHAR(255) NOT NULL DEFAULT '',
9 PRIMARY KEY(PrincipalID, Name),
10 KEY(PrincipalID));
11
12COMMIT;
diff --git a/OpenSim/Data/MySQL/Resources/FriendsStore.migrations b/OpenSim/Data/MySQL/Resources/FriendsStore.migrations
new file mode 100644
index 0000000..ce713bd
--- /dev/null
+++ b/OpenSim/Data/MySQL/Resources/FriendsStore.migrations
@@ -0,0 +1,25 @@
1:VERSION 1 # -------------------------
2
3BEGIN;
4
5CREATE TABLE `Friends` (
6 `PrincipalID` CHAR(36) NOT NULL,
7 `Friend` VARCHAR(255) NOT NULL,
8 `Flags` VARCHAR(16) NOT NULL DEFAULT 0,
9 `Offered` VARCHAR(32) NOT NULL DEFAULT 0,
10 PRIMARY KEY(`PrincipalID`, `Friend`),
11 KEY(`PrincipalID`)
12);
13
14COMMIT;
15
16:VERSION 2 # -------------------------
17
18BEGIN;
19
20INSERT INTO `Friends` SELECT `ownerID`, `friendID`, `friendPerms`, 0 FROM `userfriends`;
21
22COMMIT;
23
24
25
diff --git a/OpenSim/Data/MySQL/Resources/001_GridStore.sql b/OpenSim/Data/MySQL/Resources/GridStore.migrations
index cb0f9bd..523a8ac 100644
--- a/OpenSim/Data/MySQL/Resources/001_GridStore.sql
+++ b/OpenSim/Data/MySQL/Resources/GridStore.migrations
@@ -1,3 +1,5 @@
1:VERSION 1
2
1CREATE TABLE `regions` ( 3CREATE TABLE `regions` (
2 `uuid` varchar(36) NOT NULL, 4 `uuid` varchar(36) NOT NULL,
3 `regionHandle` bigint(20) unsigned NOT NULL, 5 `regionHandle` bigint(20) unsigned NOT NULL,
@@ -30,3 +32,58 @@ CREATE TABLE `regions` (
30 KEY `regionHandle` (`regionHandle`), 32 KEY `regionHandle` (`regionHandle`),
31 KEY `overrideHandles` (`eastOverrideHandle`,`westOverrideHandle`,`southOverrideHandle`,`northOverrideHandle`) 33 KEY `overrideHandles` (`eastOverrideHandle`,`westOverrideHandle`,`southOverrideHandle`,`northOverrideHandle`)
32) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Rev. 3'; 34) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Rev. 3';
35
36:VERSION 2
37
38BEGIN;
39
40ALTER TABLE regions add column access integer unsigned default 1;
41
42COMMIT;
43
44:VERSION 3
45
46BEGIN;
47
48ALTER TABLE regions add column ScopeID char(36) not null default '00000000-0000-0000-0000-000000000000';
49
50create index ScopeID on regions(ScopeID);
51
52COMMIT;
53
54:VERSION 4
55
56BEGIN;
57
58ALTER TABLE regions add column sizeX integer not null default 0;
59ALTER TABLE regions add column sizeY integer not null default 0;
60
61COMMIT;
62
63:VERSION 5
64
65BEGIN;
66
67ALTER TABLE `regions` ADD COLUMN `flags` integer NOT NULL DEFAULT 0;
68CREATE INDEX flags ON regions(flags);
69
70COMMIT;
71
72:VERSION 6
73
74BEGIN;
75
76ALTER TABLE `regions` ADD COLUMN `last_seen` integer NOT NULL DEFAULT 0;
77
78COMMIT;
79
80:VERSION 7
81
82BEGIN;
83
84ALTER TABLE `regions` ADD COLUMN `PrincipalID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000';
85ALTER TABLE `regions` ADD COLUMN `Token` varchar(255) NOT NULL;
86
87COMMIT;
88
89
diff --git a/OpenSim/Data/MySQL/Resources/InventoryStore.migrations b/OpenSim/Data/MySQL/Resources/InventoryStore.migrations
new file mode 100644
index 0000000..8c5864e
--- /dev/null
+++ b/OpenSim/Data/MySQL/Resources/InventoryStore.migrations
@@ -0,0 +1,93 @@
1:VERSION 1 # ------------
2BEGIN;
3
4CREATE TABLE `inventoryfolders` (
5 `folderID` varchar(36) NOT NULL default '',
6 `agentID` varchar(36) default NULL,
7 `parentFolderID` varchar(36) default NULL,
8 `folderName` varchar(64) default NULL,
9 `type` smallint NOT NULL default 0,
10 `version` int NOT NULL default 0,
11 PRIMARY KEY (`folderID`),
12 KEY `owner` (`agentID`),
13 KEY `parent` (`parentFolderID`)
14) ENGINE=InnoDB DEFAULT CHARSET=utf8;
15
16CREATE TABLE `inventoryitems` (
17 `inventoryID` varchar(36) NOT NULL default '',
18 `assetID` varchar(36) default NULL,
19 `assetType` int(11) default NULL,
20 `parentFolderID` varchar(36) default NULL,
21 `avatarID` varchar(36) default NULL,
22 `inventoryName` varchar(64) default NULL,
23 `inventoryDescription` varchar(128) default NULL,
24 `inventoryNextPermissions` int(10) unsigned default NULL,
25 `inventoryCurrentPermissions` int(10) unsigned default NULL,
26 `invType` int(11) default NULL,
27 `creatorID` varchar(36) default NULL,
28 `inventoryBasePermissions` int(10) unsigned NOT NULL default 0,
29 `inventoryEveryOnePermissions` int(10) unsigned NOT NULL default 0,
30 `salePrice` int(11) NOT NULL default 0,
31 `saleType` tinyint(4) NOT NULL default 0,
32 `creationDate` int(11) NOT NULL default 0,
33 `groupID` varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000',
34 `groupOwned` tinyint(4) NOT NULL default 0,
35 `flags` int(11) unsigned NOT NULL default 0,
36 PRIMARY KEY (`inventoryID`),
37 KEY `owner` (`avatarID`),
38 KEY `folder` (`parentFolderID`)
39) ENGINE=InnoDB DEFAULT CHARSET=utf8;
40
41COMMIT;
42
43:VERSION 2 # ------------
44
45BEGIN;
46
47ALTER TABLE inventoryfolders change folderID folderIDold varchar(36);
48ALTER TABLE inventoryfolders change agentID agentIDold varchar(36);
49ALTER TABLE inventoryfolders change parentFolderID parentFolderIDold varchar(36);
50ALTER TABLE inventoryfolders add folderID char(36) not null default '00000000-0000-0000-0000-000000000000';
51ALTER TABLE inventoryfolders add agentID char(36) default NULL;
52ALTER TABLE inventoryfolders add parentFolderID char(36) default NULL;
53UPDATE inventoryfolders set folderID = folderIDold, agentID = agentIDold, parentFolderID = parentFolderIDold;
54ALTER TABLE inventoryfolders drop folderIDold;
55ALTER TABLE inventoryfolders drop agentIDold;
56ALTER TABLE inventoryfolders drop parentFolderIDold;
57ALTER TABLE inventoryfolders add constraint primary key(folderID);
58ALTER TABLE inventoryfolders add index inventoryfolders_agentid(agentID);
59ALTER TABLE inventoryfolders add index inventoryfolders_parentFolderid(parentFolderID);
60
61ALTER TABLE inventoryitems change inventoryID inventoryIDold varchar(36);
62ALTER TABLE inventoryitems change avatarID avatarIDold varchar(36);
63ALTER TABLE inventoryitems change parentFolderID parentFolderIDold varchar(36);
64ALTER TABLE inventoryitems add inventoryID char(36) not null default '00000000-0000-0000-0000-000000000000';
65ALTER TABLE inventoryitems add avatarID char(36) default NULL;
66ALTER TABLE inventoryitems add parentFolderID char(36) default NULL;
67UPDATE inventoryitems set inventoryID = inventoryIDold, avatarID = avatarIDold, parentFolderID = parentFolderIDold;
68ALTER TABLE inventoryitems drop inventoryIDold;
69ALTER TABLE inventoryitems drop avatarIDold;
70ALTER TABLE inventoryitems drop parentFolderIDold;
71ALTER TABLE inventoryitems add constraint primary key(inventoryID);
72ALTER TABLE inventoryitems add index inventoryitems_avatarid(avatarID);
73ALTER TABLE inventoryitems add index inventoryitems_parentFolderid(parentFolderID);
74
75COMMIT;
76
77:VERSION 3 # ------------
78
79BEGIN;
80
81alter table inventoryitems add column inventoryGroupPermissions integer unsigned not null default 0;
82
83COMMIT;
84
85:VERSION 4 # ------------
86
87BEGIN;
88
89update inventoryitems set creatorID = '00000000-0000-0000-0000-000000000000' where creatorID is NULL;
90update inventoryitems set creatorID = '00000000-0000-0000-0000-000000000000' where creatorID = '';
91alter table inventoryitems modify column creatorID varchar(36) not NULL default '00000000-0000-0000-0000-000000000000';
92
93COMMIT;
diff --git a/OpenSim/Data/MySQL/Resources/001_LogStore.sql b/OpenSim/Data/MySQL/Resources/LogStore.migrations
index b4c29fb..9ac26ac 100644
--- a/OpenSim/Data/MySQL/Resources/001_LogStore.sql
+++ b/OpenSim/Data/MySQL/Resources/LogStore.migrations
@@ -1,3 +1,6 @@
1
2:VERSION 1
3
1CREATE TABLE `logs` ( 4CREATE TABLE `logs` (
2 `logID` int(10) unsigned NOT NULL auto_increment, 5 `logID` int(10) unsigned NOT NULL auto_increment,
3 `target` varchar(36) default NULL, 6 `target` varchar(36) default NULL,
diff --git a/OpenSim/Data/MySQL/Resources/Presence.migrations b/OpenSim/Data/MySQL/Resources/Presence.migrations
new file mode 100644
index 0000000..d513024
--- /dev/null
+++ b/OpenSim/Data/MySQL/Resources/Presence.migrations
@@ -0,0 +1,36 @@
1:VERSION 1 # --------------------------
2
3BEGIN;
4
5CREATE TABLE `Presence` (
6 `UserID` VARCHAR(255) NOT NULL,
7 `RegionID` CHAR(36) NOT NULL,
8 `SessionID` CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
9 `SecureSessionID` CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
10 `Online` CHAR(5) NOT NULL DEFAULT 'false',
11 `Login` CHAR(16) NOT NULL DEFAULT '0',
12 `Logout` CHAR(16) NOT NULL DEFAULT '0',
13 `Position` CHAR(64) NOT NULL DEFAULT '<0,0,0>',
14 `LookAt` CHAR(64) NOT NULL DEFAULT '<0,0,0>'
15) ENGINE=InnoDB;
16
17COMMIT;
18
19:VERSION 2 # --------------------------
20
21BEGIN;
22
23ALTER TABLE Presence ADD COLUMN `HomeRegionID` CHAR(36) NOT NULL;
24ALTER TABLE Presence ADD COLUMN `HomePosition` CHAR(64) NOT NULL DEFAULT '<0,0,0>';
25ALTER TABLE Presence ADD COLUMN `HomeLookAt` CHAR(64) NOT NULL DEFAULT '<0,0,0>';
26
27COMMIT;
28
29:VERSION 3 # --------------------------
30
31BEGIN;
32
33CREATE UNIQUE INDEX SessionID ON Presence(SessionID);
34CREATE INDEX UserID ON Presence(UserID);
35
36COMMIT;
diff --git a/OpenSim/Data/MySQL/Resources/RegionStore.migrations b/OpenSim/Data/MySQL/Resources/RegionStore.migrations
new file mode 100644
index 0000000..3dab67e
--- /dev/null
+++ b/OpenSim/Data/MySQL/Resources/RegionStore.migrations
@@ -0,0 +1,806 @@
1
2:VERSION 1 #---------------------
3
4BEGIN;
5
6CREATE TABLE `prims` (
7 `UUID` varchar(255) NOT NULL,
8 `RegionUUID` varchar(255) default NULL,
9 `ParentID` int(11) default NULL,
10 `CreationDate` int(11) default NULL,
11 `Name` varchar(255) default NULL,
12 `SceneGroupID` varchar(255) default NULL,
13 `Text` varchar(255) default NULL,
14 `Description` varchar(255) default NULL,
15 `SitName` varchar(255) default NULL,
16 `TouchName` varchar(255) default NULL,
17 `ObjectFlags` int(11) default NULL,
18 `CreatorID` varchar(255) default NULL,
19 `OwnerID` varchar(255) default NULL,
20 `GroupID` varchar(255) default NULL,
21 `LastOwnerID` varchar(255) default NULL,
22 `OwnerMask` int(11) default NULL,
23 `NextOwnerMask` int(11) default NULL,
24 `GroupMask` int(11) default NULL,
25 `EveryoneMask` int(11) default NULL,
26 `BaseMask` int(11) default NULL,
27 `PositionX` float default NULL,
28 `PositionY` float default NULL,
29 `PositionZ` float default NULL,
30 `GroupPositionX` float default NULL,
31 `GroupPositionY` float default NULL,
32 `GroupPositionZ` float default NULL,
33 `VelocityX` float default NULL,
34 `VelocityY` float default NULL,
35 `VelocityZ` float default NULL,
36 `AngularVelocityX` float default NULL,
37 `AngularVelocityY` float default NULL,
38 `AngularVelocityZ` float default NULL,
39 `AccelerationX` float default NULL,
40 `AccelerationY` float default NULL,
41 `AccelerationZ` float default NULL,
42 `RotationX` float default NULL,
43 `RotationY` float default NULL,
44 `RotationZ` float default NULL,
45 `RotationW` float default NULL,
46 `SitTargetOffsetX` float default NULL,
47 `SitTargetOffsetY` float default NULL,
48 `SitTargetOffsetZ` float default NULL,
49 `SitTargetOrientW` float default NULL,
50 `SitTargetOrientX` float default NULL,
51 `SitTargetOrientY` float default NULL,
52 `SitTargetOrientZ` float default NULL,
53 PRIMARY KEY (`UUID`)
54) ENGINE=MyISAM DEFAULT CHARSET=latin1;
55
56CREATE TABLE `primshapes` (
57 `UUID` varchar(255) NOT NULL,
58 `Shape` int(11) default NULL,
59 `ScaleX` float default NULL,
60 `ScaleY` float default NULL,
61 `ScaleZ` float default NULL,
62 `PCode` int(11) default NULL,
63 `PathBegin` int(11) default NULL,
64 `PathEnd` int(11) default NULL,
65 `PathScaleX` int(11) default NULL,
66 `PathScaleY` int(11) default NULL,
67 `PathShearX` int(11) default NULL,
68 `PathShearY` int(11) default NULL,
69 `PathSkew` int(11) default NULL,
70 `PathCurve` int(11) default NULL,
71 `PathRadiusOffset` int(11) default NULL,
72 `PathRevolutions` int(11) default NULL,
73 `PathTaperX` int(11) default NULL,
74 `PathTaperY` int(11) default NULL,
75 `PathTwist` int(11) default NULL,
76 `PathTwistBegin` int(11) default NULL,
77 `ProfileBegin` int(11) default NULL,
78 `ProfileEnd` int(11) default NULL,
79 `ProfileCurve` int(11) default NULL,
80 `ProfileHollow` int(11) default NULL,
81 `State` int(11) default NULL,
82 `Texture` longblob,
83 `ExtraParams` longblob,
84 PRIMARY KEY (`UUID`)
85) ENGINE=MyISAM DEFAULT CHARSET=latin1;
86
87CREATE TABLE `primitems` (
88 `itemID` varchar(255) NOT NULL,
89 `primID` varchar(255) default NULL,
90 `assetID` varchar(255) default NULL,
91 `parentFolderID` varchar(255) default NULL,
92 `invType` int(11) default NULL,
93 `assetType` int(11) default NULL,
94 `name` varchar(255) default NULL,
95 `description` varchar(255) default NULL,
96 `creationDate` bigint(20) default NULL,
97 `creatorID` varchar(255) default NULL,
98 `ownerID` varchar(255) default NULL,
99 `lastOwnerID` varchar(255) default NULL,
100 `groupID` varchar(255) default NULL,
101 `nextPermissions` int(11) default NULL,
102 `currentPermissions` int(11) default NULL,
103 `basePermissions` int(11) default NULL,
104 `everyonePermissions` int(11) default NULL,
105 `groupPermissions` int(11) default NULL,
106 PRIMARY KEY (`itemID`)
107) ENGINE=MyISAM DEFAULT CHARSET=latin1;
108
109CREATE TABLE `terrain` (
110 `RegionUUID` varchar(255) default NULL,
111 `Revision` int(11) default NULL,
112 `Heightfield` longblob
113) ENGINE=MyISAM DEFAULT CHARSET=latin1;
114
115CREATE TABLE `land` (
116 `UUID` varchar(255) NOT NULL,
117 `RegionUUID` varchar(255) default NULL,
118 `LocalLandID` int(11) default NULL,
119 `Bitmap` longblob,
120 `Name` varchar(255) default NULL,
121 `Description` varchar(255) default NULL,
122 `OwnerUUID` varchar(255) default NULL,
123 `IsGroupOwned` int(11) default NULL,
124 `Area` int(11) default NULL,
125 `AuctionID` int(11) default NULL,
126 `Category` int(11) default NULL,
127 `ClaimDate` int(11) default NULL,
128 `ClaimPrice` int(11) default NULL,
129 `GroupUUID` varchar(255) default NULL,
130 `SalePrice` int(11) default NULL,
131 `LandStatus` int(11) default NULL,
132 `LandFlags` int(11) default NULL,
133 `LandingType` int(11) default NULL,
134 `MediaAutoScale` int(11) default NULL,
135 `MediaTextureUUID` varchar(255) default NULL,
136 `MediaURL` varchar(255) default NULL,
137 `MusicURL` varchar(255) default NULL,
138 `PassHours` float default NULL,
139 `PassPrice` int(11) default NULL,
140 `SnapshotUUID` varchar(255) default NULL,
141 `UserLocationX` float default NULL,
142 `UserLocationY` float default NULL,
143 `UserLocationZ` float default NULL,
144 `UserLookAtX` float default NULL,
145 `UserLookAtY` float default NULL,
146 `UserLookAtZ` float default NULL,
147 `AuthbuyerID` varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000',
148 PRIMARY KEY (`UUID`)
149) ENGINE=InnoDB DEFAULT CHARSET=utf8;
150
151CREATE TABLE `landaccesslist` (
152 `LandUUID` varchar(255) default NULL,
153 `AccessUUID` varchar(255) default NULL,
154 `Flags` int(11) default NULL
155) ENGINE=MyISAM DEFAULT CHARSET=latin1;
156
157COMMIT;
158
159:VERSION 2 #---------------------
160
161BEGIN;
162
163CREATE index prims_regionuuid on prims(RegionUUID);
164CREATE index primitems_primid on primitems(primID);
165
166COMMIT;
167
168:VERSION 3 #---------------------
169
170BEGIN;
171 CREATE TABLE regionban (regionUUID VARCHAR(36) NOT NULL, bannedUUID VARCHAR(36) NOT NULL, bannedIp VARCHAR(16) NOT NULL, bannedIpHostMask VARCHAR(16) NOT NULL) ENGINE=INNODB DEFAULT CHARSET=utf8 COMMENT='Rev. 1';
172COMMIT;
173
174:VERSION 4 #---------------------
175
176BEGIN;
177
178ALTER TABLE primitems add flags integer not null default 0;
179
180COMMIT;
181
182:VERSION 5 #---------------------
183BEGIN;
184
185create table regionsettings (
186 regionUUID char(36) not null,
187 block_terraform integer not null,
188 block_fly integer not null,
189 allow_damage integer not null,
190 restrict_pushing integer not null,
191 allow_land_resell integer not null,
192 allow_land_join_divide integer not null,
193 block_show_in_search integer not null,
194 agent_limit integer not null,
195 object_bonus float not null,
196 maturity integer not null,
197 disable_scripts integer not null,
198 disable_collisions integer not null,
199 disable_physics integer not null,
200 terrain_texture_1 char(36) not null,
201 terrain_texture_2 char(36) not null,
202 terrain_texture_3 char(36) not null,
203 terrain_texture_4 char(36) not null,
204 elevation_1_nw float not null,
205 elevation_2_nw float not null,
206 elevation_1_ne float not null,
207 elevation_2_ne float not null,
208 elevation_1_se float not null,
209 elevation_2_se float not null,
210 elevation_1_sw float not null,
211 elevation_2_sw float not null,
212 water_height float not null,
213 terrain_raise_limit float not null,
214 terrain_lower_limit float not null,
215 use_estate_sun integer not null,
216 fixed_sun integer not null,
217 sun_position float not null,
218 covenant char(36),
219 primary key(regionUUID)
220);
221
222COMMIT;
223
224
225:VERSION 6 #---------------------
226
227BEGIN;
228
229alter table landaccesslist ENGINE = InnoDB;
230alter table migrations ENGINE = InnoDB;
231alter table primitems ENGINE = InnoDB;
232alter table prims ENGINE = InnoDB;
233alter table primshapes ENGINE = InnoDB;
234alter table regionsettings ENGINE = InnoDB;
235alter table terrain ENGINE = InnoDB;
236
237COMMIT;
238
239:VERSION 7 #---------------------
240
241BEGIN;
242
243ALTER TABLE prims change UUID UUIDold varchar(255);
244ALTER TABLE prims change RegionUUID RegionUUIDold varchar(255);
245ALTER TABLE prims change CreatorID CreatorIDold varchar(255);
246ALTER TABLE prims change OwnerID OwnerIDold varchar(255);
247ALTER TABLE prims change GroupID GroupIDold varchar(255);
248ALTER TABLE prims change LastOwnerID LastOwnerIDold varchar(255);
249ALTER TABLE prims add UUID char(36);
250ALTER TABLE prims add RegionUUID char(36);
251ALTER TABLE prims add CreatorID char(36);
252ALTER TABLE prims add OwnerID char(36);
253ALTER TABLE prims add GroupID char(36);
254ALTER TABLE prims add LastOwnerID char(36);
255UPDATE prims set UUID = UUIDold, RegionUUID = RegionUUIDold, CreatorID = CreatorIDold, OwnerID = OwnerIDold, GroupID = GroupIDold, LastOwnerID = LastOwnerIDold;
256ALTER TABLE prims drop UUIDold;
257ALTER TABLE prims drop RegionUUIDold;
258ALTER TABLE prims drop CreatorIDold;
259ALTER TABLE prims drop OwnerIDold;
260ALTER TABLE prims drop GroupIDold;
261ALTER TABLE prims drop LastOwnerIDold;
262ALTER TABLE prims add constraint primary key(UUID);
263ALTER TABLE prims add index prims_regionuuid(RegionUUID);
264
265COMMIT;
266
267:VERSION 8 #---------------------
268
269BEGIN;
270
271ALTER TABLE primshapes change UUID UUIDold varchar(255);
272ALTER TABLE primshapes add UUID char(36);
273UPDATE primshapes set UUID = UUIDold;
274ALTER TABLE primshapes drop UUIDold;
275ALTER TABLE primshapes add constraint primary key(UUID);
276
277COMMIT;
278
279:VERSION 9 #---------------------
280
281BEGIN;
282
283ALTER TABLE primitems change itemID itemIDold varchar(255);
284ALTER TABLE primitems change primID primIDold varchar(255);
285ALTER TABLE primitems change assetID assetIDold varchar(255);
286ALTER TABLE primitems change parentFolderID parentFolderIDold varchar(255);
287ALTER TABLE primitems change creatorID creatorIDold varchar(255);
288ALTER TABLE primitems change ownerID ownerIDold varchar(255);
289ALTER TABLE primitems change groupID groupIDold varchar(255);
290ALTER TABLE primitems change lastOwnerID lastOwnerIDold varchar(255);
291ALTER TABLE primitems add itemID char(36);
292ALTER TABLE primitems add primID char(36);
293ALTER TABLE primitems add assetID char(36);
294ALTER TABLE primitems add parentFolderID char(36);
295ALTER TABLE primitems add creatorID char(36);
296ALTER TABLE primitems add ownerID char(36);
297ALTER TABLE primitems add groupID char(36);
298ALTER TABLE primitems add lastOwnerID char(36);
299UPDATE primitems set itemID = itemIDold, primID = primIDold, assetID = assetIDold, parentFolderID = parentFolderIDold, creatorID = creatorIDold, ownerID = ownerIDold, groupID = groupIDold, lastOwnerID = lastOwnerIDold;
300ALTER TABLE primitems drop itemIDold;
301ALTER TABLE primitems drop primIDold;
302ALTER TABLE primitems drop assetIDold;
303ALTER TABLE primitems drop parentFolderIDold;
304ALTER TABLE primitems drop creatorIDold;
305ALTER TABLE primitems drop ownerIDold;
306ALTER TABLE primitems drop groupIDold;
307ALTER TABLE primitems drop lastOwnerIDold;
308ALTER TABLE primitems add constraint primary key(itemID);
309ALTER TABLE primitems add index primitems_primid(primID);
310
311COMMIT;
312
313:VERSION 10 #---------------------
314
315# 1 "010_RegionStore.sql"
316# 1 "<built-in>"
317# 1 "<command line>"
318# 1 "010_RegionStore.sql"
319BEGIN;
320
321DELETE FROM regionsettings;
322
323COMMIT;
324
325
326:VERSION 11 #---------------------
327
328BEGIN;
329
330ALTER TABLE prims change SceneGroupID SceneGroupIDold varchar(255);
331ALTER TABLE prims add SceneGroupID char(36);
332UPDATE prims set SceneGroupID = SceneGroupIDold;
333ALTER TABLE prims drop SceneGroupIDold;
334ALTER TABLE prims add index prims_scenegroupid(SceneGroupID);
335
336COMMIT;
337
338:VERSION 12 #---------------------
339
340BEGIN;
341
342ALTER TABLE prims add index prims_parentid(ParentID);
343
344COMMIT;
345
346:VERSION 13 #---------------------
347begin;
348
349drop table regionsettings;
350
351CREATE TABLE `regionsettings` (
352 `regionUUID` char(36) NOT NULL,
353 `block_terraform` int(11) NOT NULL,
354 `block_fly` int(11) NOT NULL,
355 `allow_damage` int(11) NOT NULL,
356 `restrict_pushing` int(11) NOT NULL,
357 `allow_land_resell` int(11) NOT NULL,
358 `allow_land_join_divide` int(11) NOT NULL,
359 `block_show_in_search` int(11) NOT NULL,
360 `agent_limit` int(11) NOT NULL,
361 `object_bonus` float NOT NULL,
362 `maturity` int(11) NOT NULL,
363 `disable_scripts` int(11) NOT NULL,
364 `disable_collisions` int(11) NOT NULL,
365 `disable_physics` int(11) NOT NULL,
366 `terrain_texture_1` char(36) NOT NULL,
367 `terrain_texture_2` char(36) NOT NULL,
368 `terrain_texture_3` char(36) NOT NULL,
369 `terrain_texture_4` char(36) NOT NULL,
370 `elevation_1_nw` float NOT NULL,
371 `elevation_2_nw` float NOT NULL,
372 `elevation_1_ne` float NOT NULL,
373 `elevation_2_ne` float NOT NULL,
374 `elevation_1_se` float NOT NULL,
375 `elevation_2_se` float NOT NULL,
376 `elevation_1_sw` float NOT NULL,
377 `elevation_2_sw` float NOT NULL,
378 `water_height` float NOT NULL,
379 `terrain_raise_limit` float NOT NULL,
380 `terrain_lower_limit` float NOT NULL,
381 `use_estate_sun` int(11) NOT NULL,
382 `fixed_sun` int(11) NOT NULL,
383 `sun_position` float NOT NULL,
384 `covenant` char(36) default NULL,
385 `Sandbox` tinyint(4) NOT NULL,
386 PRIMARY KEY (`regionUUID`)
387) ENGINE=InnoDB;
388
389CREATE TABLE `estate_managers` (
390 `EstateID` int(10) unsigned NOT NULL,
391 `uuid` char(36) NOT NULL,
392 KEY `EstateID` (`EstateID`)
393) ENGINE=InnoDB;
394
395CREATE TABLE `estate_groups` (
396 `EstateID` int(10) unsigned NOT NULL,
397 `uuid` char(36) NOT NULL,
398 KEY `EstateID` (`EstateID`)
399) ENGINE=InnoDB;
400
401CREATE TABLE `estate_users` (
402 `EstateID` int(10) unsigned NOT NULL,
403 `uuid` char(36) NOT NULL,
404 KEY `EstateID` (`EstateID`)
405) ENGINE=InnoDB;
406
407CREATE TABLE `estateban` (
408 `EstateID` int(10) unsigned NOT NULL,
409 `bannedUUID` varchar(36) NOT NULL,
410 `bannedIp` varchar(16) NOT NULL,
411 `bannedIpHostMask` varchar(16) NOT NULL,
412 `bannedNameMask` varchar(64) default NULL,
413 KEY `estateban_EstateID` (`EstateID`)
414) ENGINE=InnoDB;
415
416CREATE TABLE `estate_settings` (
417 `EstateID` int(10) unsigned NOT NULL auto_increment,
418 `EstateName` varchar(64) default NULL,
419 `AbuseEmailToEstateOwner` tinyint(4) NOT NULL,
420 `DenyAnonymous` tinyint(4) NOT NULL,
421 `ResetHomeOnTeleport` tinyint(4) NOT NULL,
422 `FixedSun` tinyint(4) NOT NULL,
423 `DenyTransacted` tinyint(4) NOT NULL,
424 `BlockDwell` tinyint(4) NOT NULL,
425 `DenyIdentified` tinyint(4) NOT NULL,
426 `AllowVoice` tinyint(4) NOT NULL,
427 `UseGlobalTime` tinyint(4) NOT NULL,
428 `PricePerMeter` int(11) NOT NULL,
429 `TaxFree` tinyint(4) NOT NULL,
430 `AllowDirectTeleport` tinyint(4) NOT NULL,
431 `RedirectGridX` int(11) NOT NULL,
432 `RedirectGridY` int(11) NOT NULL,
433 `ParentEstateID` int(10) unsigned NOT NULL,
434 `SunPosition` double NOT NULL,
435 `EstateSkipScripts` tinyint(4) NOT NULL,
436 `BillableFactor` float NOT NULL,
437 `PublicAccess` tinyint(4) NOT NULL,
438 PRIMARY KEY (`EstateID`)
439) ENGINE=InnoDB AUTO_INCREMENT=100;
440
441CREATE TABLE `estate_map` (
442 `RegionID` char(36) NOT NULL default '00000000-0000-0000-0000-000000000000',
443 `EstateID` int(11) NOT NULL,
444 PRIMARY KEY (`RegionID`),
445 KEY `EstateID` (`EstateID`)
446) ENGINE=InnoDB;
447
448commit;
449
450:VERSION 14 #---------------------
451
452begin;
453
454alter table estate_settings add column AbuseEmail varchar(255) not null;
455
456alter table estate_settings add column EstateOwner varchar(36) not null;
457
458commit;
459
460
461:VERSION 15 #---------------------
462
463begin;
464
465alter table estate_settings add column DenyMinors tinyint not null;
466
467commit;
468
469:VERSION 16 #---------------------
470
471BEGIN;
472
473ALTER TABLE prims ADD COLUMN PayPrice integer not null default 0;
474ALTER TABLE prims ADD COLUMN PayButton1 integer not null default 0;
475ALTER TABLE prims ADD COLUMN PayButton2 integer not null default 0;
476ALTER TABLE prims ADD COLUMN PayButton3 integer not null default 0;
477ALTER TABLE prims ADD COLUMN PayButton4 integer not null default 0;
478ALTER TABLE prims ADD COLUMN LoopedSound char(36) not null default '00000000-0000-0000-0000-000000000000';
479ALTER TABLE prims ADD COLUMN LoopedSoundGain float not null default 0.0;
480ALTER TABLE prims ADD COLUMN TextureAnimation blob;
481ALTER TABLE prims ADD COLUMN OmegaX float not null default 0.0;
482ALTER TABLE prims ADD COLUMN OmegaY float not null default 0.0;
483ALTER TABLE prims ADD COLUMN OmegaZ float not null default 0.0;
484ALTER TABLE prims ADD COLUMN CameraEyeOffsetX float not null default 0.0;
485ALTER TABLE prims ADD COLUMN CameraEyeOffsetY float not null default 0.0;
486ALTER TABLE prims ADD COLUMN CameraEyeOffsetZ float not null default 0.0;
487ALTER TABLE prims ADD COLUMN CameraAtOffsetX float not null default 0.0;
488ALTER TABLE prims ADD COLUMN CameraAtOffsetY float not null default 0.0;
489ALTER TABLE prims ADD COLUMN CameraAtOffsetZ float not null default 0.0;
490ALTER TABLE prims ADD COLUMN ForceMouselook tinyint not null default 0;
491ALTER TABLE prims ADD COLUMN ScriptAccessPin integer not null default 0;
492ALTER TABLE prims ADD COLUMN AllowedDrop tinyint not null default 0;
493ALTER TABLE prims ADD COLUMN DieAtEdge tinyint not null default 0;
494ALTER TABLE prims ADD COLUMN SalePrice integer not null default 10;
495ALTER TABLE prims ADD COLUMN SaleType tinyint not null default 0;
496
497COMMIT;
498
499
500:VERSION 17 #---------------------
501
502BEGIN;
503
504ALTER TABLE prims ADD COLUMN ColorR integer not null default 0;
505ALTER TABLE prims ADD COLUMN ColorG integer not null default 0;
506ALTER TABLE prims ADD COLUMN ColorB integer not null default 0;
507ALTER TABLE prims ADD COLUMN ColorA integer not null default 0;
508ALTER TABLE prims ADD COLUMN ParticleSystem blob;
509
510COMMIT;
511
512
513:VERSION 18 #---------------------
514
515begin;
516
517ALTER TABLE prims ADD COLUMN ClickAction tinyint NOT NULL default 0;
518
519commit;
520
521:VERSION 19 #---------------------
522
523begin;
524
525ALTER TABLE prims ADD COLUMN Material tinyint NOT NULL default 3;
526
527commit;
528
529
530:VERSION 20 #---------------------
531
532begin;
533
534ALTER TABLE land ADD COLUMN OtherCleanTime integer NOT NULL default 0;
535ALTER TABLE land ADD COLUMN Dwell integer NOT NULL default 0;
536
537commit;
538
539:VERSION 21 #---------------------
540
541begin;
542
543ALTER TABLE regionsettings ADD COLUMN sunvectorx double NOT NULL default 0;
544ALTER TABLE regionsettings ADD COLUMN sunvectory double NOT NULL default 0;
545ALTER TABLE regionsettings ADD COLUMN sunvectorz double NOT NULL default 0;
546
547commit;
548
549
550:VERSION 22 #---------------------
551
552BEGIN;
553
554ALTER TABLE prims ADD COLUMN CollisionSound char(36) not null default '00000000-0000-0000-0000-000000000000';
555ALTER TABLE prims ADD COLUMN CollisionSoundVolume float not null default 0.0;
556
557COMMIT;
558
559:VERSION 23 #---------------------
560
561BEGIN;
562
563ALTER TABLE prims ADD COLUMN LinkNumber integer not null default 0;
564
565COMMIT;
566
567:VERSION 24 #---------------------
568
569BEGIN;
570
571alter table regionsettings change column `object_bonus` `object_bonus` double NOT NULL;
572alter table regionsettings change column `elevation_1_nw` `elevation_1_nw` double NOT NULL;
573alter table regionsettings change column `elevation_2_nw` `elevation_2_nw` double NOT NULL;
574alter table regionsettings change column `elevation_1_ne` `elevation_1_ne` double NOT NULL;
575alter table regionsettings change column `elevation_2_ne` `elevation_2_ne` double NOT NULL;
576alter table regionsettings change column `elevation_1_se` `elevation_1_se` double NOT NULL;
577alter table regionsettings change column `elevation_2_se` `elevation_2_se` double NOT NULL;
578alter table regionsettings change column `elevation_1_sw` `elevation_1_sw` double NOT NULL;
579alter table regionsettings change column `elevation_2_sw` `elevation_2_sw` double NOT NULL;
580alter table regionsettings change column `water_height` `water_height` double NOT NULL;
581alter table regionsettings change column `terrain_raise_limit` `terrain_raise_limit` double NOT NULL;
582alter table regionsettings change column `terrain_lower_limit` `terrain_lower_limit` double NOT NULL;
583alter table regionsettings change column `sun_position` `sun_position` double NOT NULL;
584
585COMMIT;
586
587
588:VERSION 25 #---------------------
589
590BEGIN;
591
592alter table prims change column `PositionX` `PositionX` double default NULL;
593alter table prims change column `PositionY` `PositionY` double default NULL;
594alter table prims change column `PositionZ` `PositionZ` double default NULL;
595alter table prims change column `GroupPositionX` `GroupPositionX` double default NULL;
596alter table prims change column `GroupPositionY` `GroupPositionY` double default NULL;
597alter table prims change column `GroupPositionZ` `GroupPositionZ` double default NULL;
598alter table prims change column `VelocityX` `VelocityX` double default NULL;
599alter table prims change column `VelocityY` `VelocityY` double default NULL;
600alter table prims change column `VelocityZ` `VelocityZ` double default NULL;
601alter table prims change column `AngularVelocityX` `AngularVelocityX` double default NULL;
602alter table prims change column `AngularVelocityY` `AngularVelocityY` double default NULL;
603alter table prims change column `AngularVelocityZ` `AngularVelocityZ` double default NULL;
604alter table prims change column `AccelerationX` `AccelerationX` double default NULL;
605alter table prims change column `AccelerationY` `AccelerationY` double default NULL;
606alter table prims change column `AccelerationZ` `AccelerationZ` double default NULL;
607alter table prims change column `RotationX` `RotationX` double default NULL;
608alter table prims change column `RotationY` `RotationY` double default NULL;
609alter table prims change column `RotationZ` `RotationZ` double default NULL;
610alter table prims change column `RotationW` `RotationW` double default NULL;
611alter table prims change column `SitTargetOffsetX` `SitTargetOffsetX` double default NULL;
612alter table prims change column `SitTargetOffsetY` `SitTargetOffsetY` double default NULL;
613alter table prims change column `SitTargetOffsetZ` `SitTargetOffsetZ` double default NULL;
614alter table prims change column `SitTargetOrientW` `SitTargetOrientW` double default NULL;
615alter table prims change column `SitTargetOrientX` `SitTargetOrientX` double default NULL;
616alter table prims change column `SitTargetOrientY` `SitTargetOrientY` double default NULL;
617alter table prims change column `SitTargetOrientZ` `SitTargetOrientZ` double default NULL;
618alter table prims change column `LoopedSoundGain` `LoopedSoundGain` double NOT NULL default '0';
619alter table prims change column `OmegaX` `OmegaX` double NOT NULL default '0';
620alter table prims change column `OmegaY` `OmegaY` double NOT NULL default '0';
621alter table prims change column `OmegaZ` `OmegaZ` double NOT NULL default '0';
622alter table prims change column `CameraEyeOffsetX` `CameraEyeOffsetX` double NOT NULL default '0';
623alter table prims change column `CameraEyeOffsetY` `CameraEyeOffsetY` double NOT NULL default '0';
624alter table prims change column `CameraEyeOffsetZ` `CameraEyeOffsetZ` double NOT NULL default '0';
625alter table prims change column `CameraAtOffsetX` `CameraAtOffsetX` double NOT NULL default '0';
626alter table prims change column `CameraAtOffsetY` `CameraAtOffsetY` double NOT NULL default '0';
627alter table prims change column `CameraAtOffsetZ` `CameraAtOffsetZ` double NOT NULL default '0';
628alter table prims change column `CollisionSoundVolume` `CollisionSoundVolume` double NOT NULL default '0';
629
630alter table primshapes change column `ScaleX` `ScaleX` double NOT NULL default '0';
631alter table primshapes change column `ScaleY` `ScaleY` double NOT NULL default '0';
632alter table primshapes change column `ScaleZ` `ScaleZ` double NOT NULL default '0';
633
634COMMIT;
635
636:VERSION 26 #---------------------
637
638begin;
639
640alter table prims change column `PositionX` `PositionX` double default NULL;
641alter table prims change column `PositionY` `PositionY` double default NULL;
642alter table prims change column `PositionZ` `PositionZ` double default NULL;
643alter table prims change column `GroupPositionX` `GroupPositionX` double default NULL;
644alter table prims change column `GroupPositionY` `GroupPositionY` double default NULL;
645alter table prims change column `GroupPositionZ` `GroupPositionZ` double default NULL;
646alter table prims change column `VelocityX` `VelocityX` double default NULL;
647alter table prims change column `VelocityY` `VelocityY` double default NULL;
648alter table prims change column `VelocityZ` `VelocityZ` double default NULL;
649alter table prims change column `AngularVelocityX` `AngularVelocityX` double default NULL;
650alter table prims change column `AngularVelocityY` `AngularVelocityY` double default NULL;
651alter table prims change column `AngularVelocityZ` `AngularVelocityZ` double default NULL;
652alter table prims change column `AccelerationX` `AccelerationX` double default NULL;
653alter table prims change column `AccelerationY` `AccelerationY` double default NULL;
654alter table prims change column `AccelerationZ` `AccelerationZ` double default NULL;
655alter table prims change column `RotationX` `RotationX` double default NULL;
656alter table prims change column `RotationY` `RotationY` double default NULL;
657alter table prims change column `RotationZ` `RotationZ` double default NULL;
658alter table prims change column `RotationW` `RotationW` double default NULL;
659alter table prims change column `SitTargetOffsetX` `SitTargetOffsetX` double default NULL;
660alter table prims change column `SitTargetOffsetY` `SitTargetOffsetY` double default NULL;
661alter table prims change column `SitTargetOffsetZ` `SitTargetOffsetZ` double default NULL;
662alter table prims change column `SitTargetOrientW` `SitTargetOrientW` double default NULL;
663alter table prims change column `SitTargetOrientX` `SitTargetOrientX` double default NULL;
664alter table prims change column `SitTargetOrientY` `SitTargetOrientY` double default NULL;
665alter table prims change column `SitTargetOrientZ` `SitTargetOrientZ` double default NULL;
666alter table prims change column `LoopedSoundGain` `LoopedSoundGain` double NOT NULL default '0';
667alter table prims change column `OmegaX` `OmegaX` double NOT NULL default '0';
668alter table prims change column `OmegaY` `OmegaY` double NOT NULL default '0';
669alter table prims change column `OmegaZ` `OmegaZ` double NOT NULL default '0';
670alter table prims change column `CameraEyeOffsetX` `CameraEyeOffsetX` double NOT NULL default '0';
671alter table prims change column `CameraEyeOffsetY` `CameraEyeOffsetY` double NOT NULL default '0';
672alter table prims change column `CameraEyeOffsetZ` `CameraEyeOffsetZ` double NOT NULL default '0';
673alter table prims change column `CameraAtOffsetX` `CameraAtOffsetX` double NOT NULL default '0';
674alter table prims change column `CameraAtOffsetY` `CameraAtOffsetY` double NOT NULL default '0';
675alter table prims change column `CameraAtOffsetZ` `CameraAtOffsetZ` double NOT NULL default '0';
676alter table prims change column `CollisionSoundVolume` `CollisionSoundVolume` double NOT NULL default '0';
677
678commit;
679
680:VERSION 27 #---------------------
681
682BEGIN;
683
684ALTER TABLE prims DROP COLUMN ParentID;
685
686COMMIT;
687
688:VERSION 28 #---------------------
689
690BEGIN;
691
692update terrain
693 set RegionUUID = concat(substr(RegionUUID, 1, 8), "-", substr(RegionUUID, 9, 4), "-", substr(RegionUUID, 13, 4), "-", substr(RegionUUID, 17, 4), "-", substr(RegionUUID, 21, 12))
694 where RegionUUID not like '%-%';
695
696
697update landaccesslist
698 set LandUUID = concat(substr(LandUUID, 1, 8), "-", substr(LandUUID, 9, 4), "-", substr(LandUUID, 13, 4), "-", substr(LandUUID, 17, 4), "-", substr(LandUUID, 21, 12))
699 where LandUUID not like '%-%';
700
701update landaccesslist
702 set AccessUUID = concat(substr(AccessUUID, 1, 8), "-", substr(AccessUUID, 9, 4), "-", substr(AccessUUID, 13, 4), "-", substr(AccessUUID, 17, 4), "-", substr(AccessUUID, 21, 12))
703 where AccessUUID not like '%-%';
704
705
706update prims
707 set UUID = concat(substr(UUID, 1, 8), "-", substr(UUID, 9, 4), "-", substr(UUID, 13, 4), "-", substr(UUID, 17, 4), "-", substr(UUID, 21, 12))
708 where UUID not like '%-%';
709
710update prims
711 set RegionUUID = concat(substr(RegionUUID, 1, 8), "-", substr(RegionUUID, 9, 4), "-", substr(RegionUUID, 13, 4), "-", substr(RegionUUID, 17, 4), "-", substr(RegionUUID, 21, 12))
712 where RegionUUID not like '%-%';
713
714update prims
715 set SceneGroupID = concat(substr(SceneGroupID, 1, 8), "-", substr(SceneGroupID, 9, 4), "-", substr(SceneGroupID, 13, 4), "-", substr(SceneGroupID, 17, 4), "-", substr(SceneGroupID, 21, 12))
716 where SceneGroupID not like '%-%';
717
718update prims
719 set CreatorID = concat(substr(CreatorID, 1, 8), "-", substr(CreatorID, 9, 4), "-", substr(CreatorID, 13, 4), "-", substr(CreatorID, 17, 4), "-", substr(CreatorID, 21, 12))
720 where CreatorID not like '%-%';
721
722update prims
723 set OwnerID = concat(substr(OwnerID, 1, 8), "-", substr(OwnerID, 9, 4), "-", substr(OwnerID, 13, 4), "-", substr(OwnerID, 17, 4), "-", substr(OwnerID, 21, 12))
724 where OwnerID not like '%-%';
725
726update prims
727 set GroupID = concat(substr(GroupID, 1, 8), "-", substr(GroupID, 9, 4), "-", substr(GroupID, 13, 4), "-", substr(GroupID, 17, 4), "-", substr(GroupID, 21, 12))
728 where GroupID not like '%-%';
729
730update prims
731 set LastOwnerID = concat(substr(LastOwnerID, 1, 8), "-", substr(LastOwnerID, 9, 4), "-", substr(LastOwnerID, 13, 4), "-", substr(LastOwnerID, 17, 4), "-", substr(LastOwnerID, 21, 12))
732 where LastOwnerID not like '%-%';
733
734
735update primshapes
736 set UUID = concat(substr(UUID, 1, 8), "-", substr(UUID, 9, 4), "-", substr(UUID, 13, 4), "-", substr(UUID, 17, 4), "-", substr(UUID, 21, 12))
737 where UUID not like '%-%';
738
739
740update land
741 set UUID = concat(substr(UUID, 1, 8), "-", substr(UUID, 9, 4), "-", substr(UUID, 13, 4), "-", substr(UUID, 17, 4), "-", substr(UUID, 21, 12))
742 where UUID not like '%-%';
743
744update land
745 set RegionUUID = concat(substr(RegionUUID, 1, 8), "-", substr(RegionUUID, 9, 4), "-", substr(RegionUUID, 13, 4), "-", substr(RegionUUID, 17, 4), "-", substr(RegionUUID, 21, 12))
746 where RegionUUID not like '%-%';
747
748update land
749 set OwnerUUID = concat(substr(OwnerUUID, 1, 8), "-", substr(OwnerUUID, 9, 4), "-", substr(OwnerUUID, 13, 4), "-", substr(OwnerUUID, 17, 4), "-", substr(OwnerUUID, 21, 12))
750 where OwnerUUID not like '%-%';
751
752update land
753 set GroupUUID = concat(substr(GroupUUID, 1, 8), "-", substr(GroupUUID, 9, 4), "-", substr(GroupUUID, 13, 4), "-", substr(GroupUUID, 17, 4), "-", substr(GroupUUID, 21, 12))
754 where GroupUUID not like '%-%';
755
756update land
757 set MediaTextureUUID = concat(substr(MediaTextureUUID, 1, 8), "-", substr(MediaTextureUUID, 9, 4), "-", substr(MediaTextureUUID, 13, 4), "-", substr(MediaTextureUUID, 17, 4), "-", substr(MediaTextureUUID, 21, 12))
758 where MediaTextureUUID not like '%-%';
759
760update land
761 set SnapshotUUID = concat(substr(SnapshotUUID, 1, 8), "-", substr(SnapshotUUID, 9, 4), "-", substr(SnapshotUUID, 13, 4), "-", substr(SnapshotUUID, 17, 4), "-", substr(SnapshotUUID, 21, 12))
762 where SnapshotUUID not like '%-%';
763
764update land
765 set AuthbuyerID = concat(substr(AuthbuyerID, 1, 8), "-", substr(AuthbuyerID, 9, 4), "-", substr(AuthbuyerID, 13, 4), "-", substr(AuthbuyerID, 17, 4), "-", substr(AuthbuyerID, 21, 12))
766 where AuthbuyerID not like '%-%';
767
768COMMIT;
769
770:VERSION 29 #---------------------
771
772BEGIN;
773
774ALTER TABLE prims ADD COLUMN PassTouches tinyint not null default 0;
775
776COMMIT;
777
778:VERSION 30 #---------------------
779
780BEGIN;
781
782ALTER TABLE regionsettings ADD COLUMN loaded_creation_date varchar(20) default NULL;
783ALTER TABLE regionsettings ADD COLUMN loaded_creation_time varchar(20) default NULL;
784ALTER TABLE regionsettings ADD COLUMN loaded_creation_id varchar(64) default NULL;
785
786COMMIT;
787
788:VERSION 31 #---------------------
789
790BEGIN;
791
792ALTER TABLE regionsettings DROP COLUMN loaded_creation_date;
793ALTER TABLE regionsettings DROP COLUMN loaded_creation_time;
794ALTER TABLE regionsettings ADD COLUMN loaded_creation_datetime int unsigned NOT NULL default 0;
795
796COMMIT;
797
798:VERSION 32 #---------------------
799
800BEGIN;
801ALTER TABLE estate_settings AUTO_INCREMENT = 100;
802COMMIT;
803
804
805
806
diff --git a/OpenSim/Data/MySQL/Resources/UserAccount.migrations b/OpenSim/Data/MySQL/Resources/UserAccount.migrations
new file mode 100644
index 0000000..84011e6
--- /dev/null
+++ b/OpenSim/Data/MySQL/Resources/UserAccount.migrations
@@ -0,0 +1,47 @@
1:VERSION 1 # -------------------------
2
3BEGIN;
4
5CREATE TABLE `UserAccounts` (
6 `PrincipalID` CHAR(36) NOT NULL,
7 `ScopeID` CHAR(36) NOT NULL,
8 `FirstName` VARCHAR(64) NOT NULL,
9 `LastName` VARCHAR(64) NOT NULL,
10 `Email` VARCHAR(64),
11 `ServiceURLs` TEXT,
12 `Created` INT(11)
13) ENGINE=InnoDB DEFAULT CHARSET=utf8;
14
15COMMIT;
16
17:VERSION 2 # -------------------------
18
19BEGIN;
20
21INSERT INTO UserAccounts (PrincipalID, ScopeID, FirstName, LastName, Email, ServiceURLs, Created) SELECT `UUID` AS PrincipalID, '00000000-0000-0000-0000-000000000000' AS ScopeID, username AS FirstName, lastname AS LastName, email as Email, CONCAT('AssetServerURI=', userAssetURI, ' InventoryServerURI=', userInventoryURI, ' GatewayURI= HomeURI=') AS ServiceURLs, created as Created FROM users;
22
23COMMIT;
24
25:VERSION 3 # -------------------------
26
27BEGIN;
28
29CREATE UNIQUE INDEX PrincipalID ON UserAccounts(PrincipalID);
30CREATE INDEX Email ON UserAccounts(Email);
31CREATE INDEX FirstName ON UserAccounts(FirstName);
32CREATE INDEX LastName ON UserAccounts(LastName);
33CREATE INDEX Name ON UserAccounts(FirstName,LastName);
34
35COMMIT;
36
37:VERSION 4 # -------------------------
38
39BEGIN;
40
41ALTER TABLE UserAccounts ADD COLUMN UserLevel integer NOT NULL DEFAULT 0;
42ALTER TABLE UserAccounts ADD COLUMN UserFlags integer NOT NULL DEFAULT 0;
43ALTER TABLE UserAccounts ADD COLUMN UserTitle varchar(64) NOT NULL DEFAULT '';
44
45COMMIT;
46
47
diff --git a/OpenSim/Data/MySQL/Resources/001_UserStore.sql b/OpenSim/Data/MySQL/Resources/UserStore.migrations
index 29ebc7d..f054611 100644
--- a/OpenSim/Data/MySQL/Resources/001_UserStore.sql
+++ b/OpenSim/Data/MySQL/Resources/UserStore.migrations
@@ -1,3 +1,5 @@
1:VERSION 1 # -----------------------------
2
1BEGIN; 3BEGIN;
2 4
3SET FOREIGN_KEY_CHECKS=0; 5SET FOREIGN_KEY_CHECKS=0;
@@ -104,4 +106,63 @@ CREATE TABLE `users` (
104-- ---------------------------- 106-- ----------------------------
105-- Records 107-- Records
106-- ---------------------------- 108-- ----------------------------
107COMMIT; \ No newline at end of file 109COMMIT;
110
111:VERSION 2 # -----------------------------
112
113BEGIN;
114
115ALTER TABLE users add homeRegionID char(36) NOT NULL default '00000000-0000-0000-0000-000000000000';
116
117COMMIT;
118
119:VERSION 3 # -----------------------------
120
121BEGIN;
122
123ALTER TABLE users add userFlags integer NOT NULL default 0;
124ALTER TABLE users add godLevel integer NOT NULL default 0;
125
126COMMIT;
127
128:VERSION 4 # -----------------------------
129
130BEGIN;
131
132ALTER TABLE users add customType varchar(32) not null default '';
133ALTER TABLE users add partner char(36) not null default '00000000-0000-0000-0000-000000000000';
134
135COMMIT;
136
137:VERSION 5 # -----------------------------
138
139BEGIN;
140
141CREATE TABLE `avatarattachments` (`UUID` char(36) NOT NULL, `attachpoint` int(11) NOT NULL, `item` char(36) NOT NULL, `asset` char(36) NOT NULL) ENGINE=InnoDB;
142
143COMMIT;
144
145:VERSION 6 # -----------------------------
146
147BEGIN;
148
149ALTER TABLE agents add currentLookAt varchar(36) not null default '';
150
151COMMIT;
152
153:VERSION 7 # -----------------------------
154
155BEGIN;
156
157ALTER TABLE users add email varchar(250);
158
159COMMIT;
160
161:VERSION 8 # -----------------------------
162
163BEGIN;
164
165ALTER TABLE users add scopeID char(36) not null default '00000000-0000-0000-0000-000000000000';
166
167COMMIT;
168
diff --git a/OpenSim/Data/SQLite/Resources/001_AssetStore.sql b/OpenSim/Data/SQLite/Resources/001_AssetStore.sql
deleted file mode 100644
index 2e026ca..0000000
--- a/OpenSim/Data/SQLite/Resources/001_AssetStore.sql
+++ /dev/null
@@ -1,12 +0,0 @@
1BEGIN TRANSACTION;
2CREATE TABLE assets(
3 UUID varchar(255) primary key,
4 Name varchar(255),
5 Description varchar(255),
6 Type integer,
7 InvType integer,
8 Local integer,
9 Temporary integer,
10 Data blob);
11
12COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/001_InventoryStore.sql b/OpenSim/Data/SQLite/Resources/001_InventoryStore.sql
deleted file mode 100644
index 554d5c2..0000000
--- a/OpenSim/Data/SQLite/Resources/001_InventoryStore.sql
+++ /dev/null
@@ -1,32 +0,0 @@
1BEGIN TRANSACTION;
2
3CREATE TABLE inventoryfolders(
4 UUID varchar(255) primary key,
5 name varchar(255),
6 agentID varchar(255),
7 parentID varchar(255),
8 type integer,
9 version integer);
10
11CREATE TABLE inventoryitems(
12 UUID varchar(255) primary key,
13 assetID varchar(255),
14 assetType integer,
15 invType integer,
16 parentFolderID varchar(255),
17 avatarID varchar(255),
18 creatorsID varchar(255),
19 inventoryName varchar(255),
20 inventoryDescription varchar(255),
21 inventoryNextPermissions integer,
22 inventoryCurrentPermissions integer,
23 inventoryBasePermissions integer,
24 inventoryEveryOnePermissions integer,
25 salePrice integer default 99,
26 saleType integer default 0,
27 creationDate integer default 2000,
28 groupID varchar(255) default '00000000-0000-0000-0000-000000000000',
29 groupOwned integer default 0,
30 flags integer default 0);
31
32COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/001_RegionStore.sql b/OpenSim/Data/SQLite/Resources/001_RegionStore.sql
deleted file mode 100644
index 39e8180..0000000
--- a/OpenSim/Data/SQLite/Resources/001_RegionStore.sql
+++ /dev/null
@@ -1,144 +0,0 @@
1BEGIN TRANSACTION;
2
3CREATE TABLE prims(
4 UUID varchar(255) primary key,
5 RegionUUID varchar(255),
6 ParentID integer,
7 CreationDate integer,
8 Name varchar(255),
9 SceneGroupID varchar(255),
10 Text varchar(255),
11 Description varchar(255),
12 SitName varchar(255),
13 TouchName varchar(255),
14 CreatorID varchar(255),
15 OwnerID varchar(255),
16 GroupID varchar(255),
17 LastOwnerID varchar(255),
18 OwnerMask integer,
19 NextOwnerMask integer,
20 GroupMask integer,
21 EveryoneMask integer,
22 BaseMask integer,
23 PositionX float,
24 PositionY float,
25 PositionZ float,
26 GroupPositionX float,
27 GroupPositionY float,
28 GroupPositionZ float,
29 VelocityX float,
30 VelocityY float,
31 VelocityZ float,
32 AngularVelocityX float,
33 AngularVelocityY float,
34 AngularVelocityZ float,
35 AccelerationX float,
36 AccelerationY float,
37 AccelerationZ float,
38 RotationX float,
39 RotationY float,
40 RotationZ float,
41 RotationW float,
42 ObjectFlags integer,
43 SitTargetOffsetX float NOT NULL default 0,
44 SitTargetOffsetY float NOT NULL default 0,
45 SitTargetOffsetZ float NOT NULL default 0,
46 SitTargetOrientW float NOT NULL default 0,
47 SitTargetOrientX float NOT NULL default 0,
48 SitTargetOrientY float NOT NULL default 0,
49 SitTargetOrientZ float NOT NULL default 0);
50
51CREATE TABLE primshapes(
52 UUID varchar(255) primary key,
53 Shape integer,
54 ScaleX float,
55 ScaleY float,
56 ScaleZ float,
57 PCode integer,
58 PathBegin integer,
59 PathEnd integer,
60 PathScaleX integer,
61 PathScaleY integer,
62 PathShearX integer,
63 PathShearY integer,
64 PathSkew integer,
65 PathCurve integer,
66 PathRadiusOffset integer,
67 PathRevolutions integer,
68 PathTaperX integer,
69 PathTaperY integer,
70 PathTwist integer,
71 PathTwistBegin integer,
72 ProfileBegin integer,
73 ProfileEnd integer,
74 ProfileCurve integer,
75 ProfileHollow integer,
76 Texture blob,
77 ExtraParams blob,
78 State Integer NOT NULL default 0);
79
80CREATE TABLE primitems(
81 itemID varchar(255) primary key,
82 primID varchar(255),
83 assetID varchar(255),
84 parentFolderID varchar(255),
85 invType integer,
86 assetType integer,
87 name varchar(255),
88 description varchar(255),
89 creationDate integer,
90 creatorID varchar(255),
91 ownerID varchar(255),
92 lastOwnerID varchar(255),
93 groupID varchar(255),
94 nextPermissions string,
95 currentPermissions string,
96 basePermissions string,
97 everyonePermissions string,
98 groupPermissions string);
99
100CREATE TABLE terrain(
101 RegionUUID varchar(255),
102 Revision integer,
103 Heightfield blob);
104
105CREATE TABLE land(
106 UUID varchar(255) primary key,
107 RegionUUID varchar(255),
108 LocalLandID string,
109 Bitmap blob,
110 Name varchar(255),
111 Desc varchar(255),
112 OwnerUUID varchar(255),
113 IsGroupOwned string,
114 Area integer,
115 AuctionID integer,
116 Category integer,
117 ClaimDate integer,
118 ClaimPrice integer,
119 GroupUUID varchar(255),
120 SalePrice integer,
121 LandStatus integer,
122 LandFlags string,
123 LandingType string,
124 MediaAutoScale string,
125 MediaTextureUUID varchar(255),
126 MediaURL varchar(255),
127 MusicURL varchar(255),
128 PassHours float,
129 PassPrice string,
130 SnapshotUUID varchar(255),
131 UserLocationX float,
132 UserLocationY float,
133 UserLocationZ float,
134 UserLookAtX float,
135 UserLookAtY float,
136 UserLookAtZ float,
137 AuthbuyerID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000');
138
139CREATE TABLE landaccesslist(
140 LandUUID varchar(255),
141 AccessUUID varchar(255),
142 Flags string);
143
144COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/001_UserStore.sql b/OpenSim/Data/SQLite/Resources/001_UserStore.sql
deleted file mode 100644
index b584594..0000000
--- a/OpenSim/Data/SQLite/Resources/001_UserStore.sql
+++ /dev/null
@@ -1,39 +0,0 @@
1BEGIN TRANSACTION;
2
3-- users table
4CREATE TABLE users(
5 UUID varchar(255) primary key,
6 username varchar(255),
7 surname varchar(255),
8 passwordHash varchar(255),
9 passwordSalt varchar(255),
10 homeRegionX integer,
11 homeRegionY integer,
12 homeLocationX float,
13 homeLocationY float,
14 homeLocationZ float,
15 homeLookAtX float,
16 homeLookAtY float,
17 homeLookAtZ float,
18 created integer,
19 lastLogin integer,
20 rootInventoryFolderID varchar(255),
21 userInventoryURI varchar(255),
22 userAssetURI varchar(255),
23 profileCanDoMask integer,
24 profileWantDoMask integer,
25 profileAboutText varchar(255),
26 profileFirstText varchar(255),
27 profileImage varchar(255),
28 profileFirstImage varchar(255),
29 webLoginKey text default '00000000-0000-0000-0000-000000000000');
30-- friends table
31CREATE TABLE userfriends(
32 ownerID varchar(255),
33 friendID varchar(255),
34 friendPerms integer,
35 ownerPerms integer,
36 datetimestamp integer);
37
38COMMIT;
39
diff --git a/OpenSim/Data/SQLite/Resources/002_AssetStore.sql b/OpenSim/Data/SQLite/Resources/002_AssetStore.sql
deleted file mode 100644
index 5339b84..0000000
--- a/OpenSim/Data/SQLite/Resources/002_AssetStore.sql
+++ /dev/null
@@ -1,10 +0,0 @@
1BEGIN TRANSACTION;
2
3CREATE TEMPORARY TABLE assets_backup(UUID,Name,Description,Type,Local,Temporary,Data);
4INSERT INTO assets_backup SELECT UUID,Name,Description,Type,Local,Temporary,Data FROM assets;
5DROP TABLE assets;
6CREATE TABLE assets(UUID,Name,Description,Type,Local,Temporary,Data);
7INSERT INTO assets SELECT UUID,Name,Description,Type,Local,Temporary,Data FROM assets_backup;
8DROP TABLE assets_backup;
9
10COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/002_AuthStore.sql b/OpenSim/Data/SQLite/Resources/002_AuthStore.sql
deleted file mode 100644
index 3237b68..0000000
--- a/OpenSim/Data/SQLite/Resources/002_AuthStore.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN TRANSACTION;
2
3INSERT INTO auth (UUID, passwordHash, passwordSalt, webLoginKey) SELECT `UUID` AS UUID, `passwordHash` AS passwordHash, `passwordSalt` AS passwordSalt, `webLoginKey` AS webLoginKey FROM users;
4
5COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/002_FriendsStore.sql b/OpenSim/Data/SQLite/Resources/002_FriendsStore.sql
deleted file mode 100644
index 6733502..0000000
--- a/OpenSim/Data/SQLite/Resources/002_FriendsStore.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN TRANSACTION;
2
3INSERT INTO `Friends` SELECT `ownerID`, `friendID`, `friendPerms`, 0 FROM `userfriends`;
4
5COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/002_InventoryStore.sql b/OpenSim/Data/SQLite/Resources/002_InventoryStore.sql
deleted file mode 100644
index 01951d6..0000000
--- a/OpenSim/Data/SQLite/Resources/002_InventoryStore.sql
+++ /dev/null
@@ -1,8 +0,0 @@
1BEGIN TRANSACTION;
2
3create index inventoryfolders_agentid on inventoryfolders(agentid);
4create index inventoryfolders_parentid on inventoryfolders(parentid);
5create index inventoryitems_parentfolderid on inventoryitems(parentfolderid);
6create index inventoryitems_avatarid on inventoryitems(avatarid);
7
8COMMIT; \ No newline at end of file
diff --git a/OpenSim/Data/SQLite/Resources/002_RegionStore.sql b/OpenSim/Data/SQLite/Resources/002_RegionStore.sql
deleted file mode 100644
index c5c7c99..0000000
--- a/OpenSim/Data/SQLite/Resources/002_RegionStore.sql
+++ /dev/null
@@ -1,10 +0,0 @@
1BEGIN TRANSACTION;
2
3CREATE TABLE regionban(
4 regionUUID varchar (255),
5 bannedUUID varchar (255),
6 bannedIp varchar (255),
7 bannedIpHostMask varchar (255)
8 );
9
10COMMIT; \ No newline at end of file
diff --git a/OpenSim/Data/SQLite/Resources/002_UserAccount.sql b/OpenSim/Data/SQLite/Resources/002_UserAccount.sql
deleted file mode 100644
index c7a6293..0000000
--- a/OpenSim/Data/SQLite/Resources/002_UserAccount.sql
+++ /dev/null
@@ -1,5 +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, username AS FirstName, surname AS LastName, '' as Email, '' AS ServiceURLs, created as Created FROM users;
4
5COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/002_UserStore.sql b/OpenSim/Data/SQLite/Resources/002_UserStore.sql
deleted file mode 100644
index 48fc680..0000000
--- a/OpenSim/Data/SQLite/Resources/002_UserStore.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN;
2
3ALTER TABLE users add homeRegionID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000';
4
5COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/003_AssetStore.sql b/OpenSim/Data/SQLite/Resources/003_AssetStore.sql
deleted file mode 100644
index f54f8d9..0000000
--- a/OpenSim/Data/SQLite/Resources/003_AssetStore.sql
+++ /dev/null
@@ -1 +0,0 @@
1DELETE FROM assets WHERE UUID = 'dc4b9f0bd00845c696a401dd947ac621'
diff --git a/OpenSim/Data/SQLite/Resources/003_InventoryStore.sql b/OpenSim/Data/SQLite/Resources/003_InventoryStore.sql
deleted file mode 100644
index 4c6da91..0000000
--- a/OpenSim/Data/SQLite/Resources/003_InventoryStore.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN;
2
3alter table inventoryitems add column inventoryGroupPermissions integer unsigned not null default 0;
4
5COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/003_RegionStore.sql b/OpenSim/Data/SQLite/Resources/003_RegionStore.sql
deleted file mode 100644
index 4db2f75..0000000
--- a/OpenSim/Data/SQLite/Resources/003_RegionStore.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN;
2
3ALTER TABLE primitems add flags integer not null default 0;
4
5COMMIT; \ No newline at end of file
diff --git a/OpenSim/Data/SQLite/Resources/003_UserStore.sql b/OpenSim/Data/SQLite/Resources/003_UserStore.sql
deleted file mode 100644
index 6f890ee..0000000
--- a/OpenSim/Data/SQLite/Resources/003_UserStore.sql
+++ /dev/null
@@ -1,6 +0,0 @@
1BEGIN;
2
3ALTER TABLE users add userFlags integer NOT NULL default 0;
4ALTER TABLE users add godLevel integer NOT NULL default 0;
5
6COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/004_AssetStore.sql b/OpenSim/Data/SQLite/Resources/004_AssetStore.sql
deleted file mode 100644
index 39421c4..0000000
--- a/OpenSim/Data/SQLite/Resources/004_AssetStore.sql
+++ /dev/null
@@ -1,7 +0,0 @@
1BEGIN;
2
3update assets
4 set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12)
5 where UUID not like '%-%';
6
7COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/004_RegionStore.sql b/OpenSim/Data/SQLite/Resources/004_RegionStore.sql
deleted file mode 100644
index de328cb..0000000
--- a/OpenSim/Data/SQLite/Resources/004_RegionStore.sql
+++ /dev/null
@@ -1,38 +0,0 @@
1BEGIN;
2
3create table regionsettings (
4 regionUUID char(36) not null,
5 block_terraform integer not null,
6 block_fly integer not null,
7 allow_damage integer not null,
8 restrict_pushing integer not null,
9 allow_land_resell integer not null,
10 allow_land_join_divide integer not null,
11 block_show_in_search integer not null,
12 agent_limit integer not null,
13 object_bonus float not null,
14 maturity integer not null,
15 disable_scripts integer not null,
16 disable_collisions integer not null,
17 disable_physics integer not null,
18 terrain_texture_1 char(36) not null,
19 terrain_texture_2 char(36) not null,
20 terrain_texture_3 char(36) not null,
21 terrain_texture_4 char(36) not null,
22 elevation_1_nw float not null,
23 elevation_2_nw float not null,
24 elevation_1_ne float not null,
25 elevation_2_ne float not null,
26 elevation_1_se float not null,
27 elevation_2_se float not null,
28 elevation_1_sw float not null,
29 elevation_2_sw float not null,
30 water_height float not null,
31 terrain_raise_limit float not null,
32 terrain_lower_limit float not null,
33 use_estate_sun integer not null,
34 fixed_sun integer not null,
35 sun_position float not null,
36 covenant char(36));
37
38COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/004_UserStore.sql b/OpenSim/Data/SQLite/Resources/004_UserStore.sql
deleted file mode 100644
index 03142af..0000000
--- a/OpenSim/Data/SQLite/Resources/004_UserStore.sql
+++ /dev/null
@@ -1,6 +0,0 @@
1BEGIN;
2
3ALTER TABLE users add customType varchar(32) not null default '';
4ALTER TABLE users add partner char(36) not null default '00000000-0000-0000-0000-000000000000';
5
6COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/005_RegionStore.sql b/OpenSim/Data/SQLite/Resources/005_RegionStore.sql
deleted file mode 100644
index 1f6d1bd..0000000
--- a/OpenSim/Data/SQLite/Resources/005_RegionStore.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN;
2
3delete from regionsettings;
4
5COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/005_UserStore.sql b/OpenSim/Data/SQLite/Resources/005_UserStore.sql
deleted file mode 100644
index e45c09a..0000000
--- a/OpenSim/Data/SQLite/Resources/005_UserStore.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN;
2
3CREATE TABLE `avatarattachments` (`UUID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', `attachpoint` int(11) NOT NULL DEFAULT 0, `item` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', `asset` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000');
4
5COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/006_RegionStore.sql b/OpenSim/Data/SQLite/Resources/006_RegionStore.sql
deleted file mode 100644
index 94ed818..0000000
--- a/OpenSim/Data/SQLite/Resources/006_RegionStore.sql
+++ /dev/null
@@ -1,102 +0,0 @@
1BEGIN TRANSACTION;
2
3CREATE TABLE estate_groups (
4 EstateID int(10) NOT NULL,
5 uuid char(36) NOT NULL
6);
7
8CREATE TABLE estate_managers (
9 EstateID int(10) NOT NULL,
10 uuid char(36) NOT NULL
11);
12
13CREATE TABLE estate_map (
14 RegionID char(36) NOT NULL default '00000000-0000-0000-0000-000000000000',
15 EstateID int(11) NOT NULL
16);
17
18CREATE TABLE estate_settings (
19 EstateID INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
20 EstateName varchar(64) default NULL,
21 AbuseEmailToEstateOwner tinyint(4) NOT NULL,
22 DenyAnonymous tinyint(4) NOT NULL,
23 ResetHomeOnTeleport tinyint(4) NOT NULL,
24 FixedSun tinyint(4) NOT NULL,
25 DenyTransacted tinyint(4) NOT NULL,
26 BlockDwell tinyint(4) NOT NULL,
27 DenyIdentified tinyint(4) NOT NULL,
28 AllowVoice tinyint(4) NOT NULL,
29 UseGlobalTime tinyint(4) NOT NULL,
30 PricePerMeter int(11) NOT NULL,
31 TaxFree tinyint(4) NOT NULL,
32 AllowDirectTeleport tinyint(4) NOT NULL,
33 RedirectGridX int(11) NOT NULL,
34 RedirectGridY int(11) NOT NULL,
35 ParentEstateID int(10) NOT NULL,
36 SunPosition double NOT NULL,
37 EstateSkipScripts tinyint(4) NOT NULL,
38 BillableFactor float NOT NULL,
39 PublicAccess tinyint(4) NOT NULL
40);
41insert into estate_settings (EstateID,EstateName,AbuseEmailToEstateOwner,DenyAnonymous,ResetHomeOnTeleport,FixedSun,DenyTransacted,BlockDwell,DenyIdentified,AllowVoice,UseGlobalTime,PricePerMeter,TaxFree,AllowDirectTeleport,RedirectGridX,RedirectGridY,ParentEstateID,SunPosition,PublicAccess,EstateSkipScripts,BillableFactor) values ( 99, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '');
42delete from estate_settings;
43CREATE TABLE estate_users (
44 EstateID int(10) NOT NULL,
45 uuid char(36) NOT NULL
46);
47
48CREATE TABLE estateban (
49 EstateID int(10) NOT NULL,
50 bannedUUID varchar(36) NOT NULL,
51 bannedIp varchar(16) NOT NULL,
52 bannedIpHostMask varchar(16) NOT NULL,
53 bannedNameMask varchar(64) default NULL
54);
55
56drop table regionsettings;
57CREATE TABLE regionsettings (
58 regionUUID char(36) NOT NULL,
59 block_terraform int(11) NOT NULL,
60 block_fly int(11) NOT NULL,
61 allow_damage int(11) NOT NULL,
62 restrict_pushing int(11) NOT NULL,
63 allow_land_resell int(11) NOT NULL,
64 allow_land_join_divide int(11) NOT NULL,
65 block_show_in_search int(11) NOT NULL,
66 agent_limit int(11) NOT NULL,
67 object_bonus float NOT NULL,
68 maturity int(11) NOT NULL,
69 disable_scripts int(11) NOT NULL,
70 disable_collisions int(11) NOT NULL,
71 disable_physics int(11) NOT NULL,
72 terrain_texture_1 char(36) NOT NULL,
73 terrain_texture_2 char(36) NOT NULL,
74 terrain_texture_3 char(36) NOT NULL,
75 terrain_texture_4 char(36) NOT NULL,
76 elevation_1_nw float NOT NULL,
77 elevation_2_nw float NOT NULL,
78 elevation_1_ne float NOT NULL,
79 elevation_2_ne float NOT NULL,
80 elevation_1_se float NOT NULL,
81 elevation_2_se float NOT NULL,
82 elevation_1_sw float NOT NULL,
83 elevation_2_sw float NOT NULL,
84 water_height float NOT NULL,
85 terrain_raise_limit float NOT NULL,
86 terrain_lower_limit float NOT NULL,
87 use_estate_sun int(11) NOT NULL,
88 fixed_sun int(11) NOT NULL,
89 sun_position float NOT NULL,
90 covenant char(36) default NULL,
91 Sandbox tinyint(4) NOT NULL,
92 PRIMARY KEY (regionUUID)
93);
94
95CREATE INDEX estate_ban_estate_id on estateban(EstateID);
96CREATE INDEX estate_groups_estate_id on estate_groups(EstateID);
97CREATE INDEX estate_managers_estate_id on estate_managers(EstateID);
98CREATE INDEX estate_map_estate_id on estate_map(EstateID);
99CREATE UNIQUE INDEX estate_map_region_id on estate_map(RegionID);
100CREATE INDEX estate_users_estate_id on estate_users(EstateID);
101
102COMMIT; \ No newline at end of file
diff --git a/OpenSim/Data/SQLite/Resources/006_UserStore.sql b/OpenSim/Data/SQLite/Resources/006_UserStore.sql
deleted file mode 100644
index f9454c5..0000000
--- a/OpenSim/Data/SQLite/Resources/006_UserStore.sql
+++ /dev/null
@@ -1,20 +0,0 @@
1BEGIN TRANSACTION;
2
3-- usersagents table
4CREATE TABLE IF NOT EXISTS useragents(
5 UUID varchar(255) primary key,
6 agentIP varchar(255),
7 agentPort integer,
8 agentOnline boolean,
9 sessionID varchar(255),
10 secureSessionID varchar(255),
11 regionID varchar(255),
12 loginTime integer,
13 logoutTime integer,
14 currentRegion varchar(255),
15 currentHandle varchar(255),
16 currentPosX float,
17 currentPosY float,
18 currentPosZ float);
19
20COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/007_RegionStore.sql b/OpenSim/Data/SQLite/Resources/007_RegionStore.sql
deleted file mode 100644
index 1c813a0..0000000
--- a/OpenSim/Data/SQLite/Resources/007_RegionStore.sql
+++ /dev/null
@@ -1,8 +0,0 @@
1begin;
2
3alter table estate_settings add column AbuseEmail varchar(255) not null default '';
4
5alter table estate_settings add column EstateOwner varchar(36) not null default '';
6
7commit;
8
diff --git a/OpenSim/Data/SQLite/Resources/007_UserStore.sql b/OpenSim/Data/SQLite/Resources/007_UserStore.sql
deleted file mode 100644
index 8b0cd28..0000000
--- a/OpenSim/Data/SQLite/Resources/007_UserStore.sql
+++ /dev/null
@@ -1,7 +0,0 @@
1BEGIN TRANSACTION;
2
3ALTER TABLE useragents add currentLookAtX float not null default 128;
4ALTER TABLE useragents add currentLookAtY float not null default 128;
5ALTER TABLE useragents add currentLookAtZ float not null default 70;
6
7COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/008_RegionStore.sql b/OpenSim/Data/SQLite/Resources/008_RegionStore.sql
deleted file mode 100644
index 28bfbf5..0000000
--- a/OpenSim/Data/SQLite/Resources/008_RegionStore.sql
+++ /dev/null
@@ -1,6 +0,0 @@
1begin;
2
3alter table estate_settings add column DenyMinors tinyint not null default 0;
4
5commit;
6
diff --git a/OpenSim/Data/SQLite/Resources/008_UserStore.sql b/OpenSim/Data/SQLite/Resources/008_UserStore.sql
deleted file mode 100644
index 97da818..0000000
--- a/OpenSim/Data/SQLite/Resources/008_UserStore.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN TRANSACTION;
2
3ALTER TABLE users add email varchar(250);
4
5COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/009_RegionStore.sql b/OpenSim/Data/SQLite/Resources/009_RegionStore.sql
deleted file mode 100644
index 1f40548..0000000
--- a/OpenSim/Data/SQLite/Resources/009_RegionStore.sql
+++ /dev/null
@@ -1,8 +0,0 @@
1BEGIN;
2
3ALTER TABLE prims ADD COLUMN ColorR integer not null default 0;
4ALTER TABLE prims ADD COLUMN ColorG integer not null default 0;
5ALTER TABLE prims ADD COLUMN ColorB integer not null default 0;
6ALTER TABLE prims ADD COLUMN ColorA integer not null default 0;
7
8COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/009_UserStore.sql b/OpenSim/Data/SQLite/Resources/009_UserStore.sql
deleted file mode 100644
index 8ab03ef..0000000
--- a/OpenSim/Data/SQLite/Resources/009_UserStore.sql
+++ /dev/null
@@ -1,11 +0,0 @@
1BEGIN;
2
3update users
4 set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12)
5 where UUID not like '%-%';
6
7update useragents
8 set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12)
9 where UUID not like '%-%';
10
11COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/010_RegionStore.sql b/OpenSim/Data/SQLite/Resources/010_RegionStore.sql
deleted file mode 100644
index b91ccf0..0000000
--- a/OpenSim/Data/SQLite/Resources/010_RegionStore.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN;
2
3ALTER TABLE prims ADD COLUMN ClickAction INTEGER NOT NULL default 0;
4
5COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/010_UserStore.sql b/OpenSim/Data/SQLite/Resources/010_UserStore.sql
deleted file mode 100644
index 5f956da..0000000
--- a/OpenSim/Data/SQLite/Resources/010_UserStore.sql
+++ /dev/null
@@ -1,37 +0,0 @@
1BEGIN TRANSACTION;
2
3CREATE TABLE IF NOT EXISTS avatarappearance(
4 Owner varchar(36) NOT NULL primary key,
5 BodyItem varchar(36) DEFAULT NULL,
6 BodyAsset varchar(36) DEFAULT NULL,
7 SkinItem varchar(36) DEFAULT NULL,
8 SkinAsset varchar(36) DEFAULT NULL,
9 HairItem varchar(36) DEFAULT NULL,
10 HairAsset varchar(36) DEFAULT NULL,
11 EyesItem varchar(36) DEFAULT NULL,
12 EyesAsset varchar(36) DEFAULT NULL,
13 ShirtItem varchar(36) DEFAULT NULL,
14 ShirtAsset varchar(36) DEFAULT NULL,
15 PantsItem varchar(36) DEFAULT NULL,
16 PantsAsset varchar(36) DEFAULT NULL,
17 ShoesItem varchar(36) DEFAULT NULL,
18 ShoesAsset varchar(36) DEFAULT NULL,
19 SocksItem varchar(36) DEFAULT NULL,
20 SocksAsset varchar(36) DEFAULT NULL,
21 JacketItem varchar(36) DEFAULT NULL,
22 JacketAsset varchar(36) DEFAULT NULL,
23 GlovesItem varchar(36) DEFAULT NULL,
24 GlovesAsset varchar(36) DEFAULT NULL,
25 UnderShirtItem varchar(36) DEFAULT NULL,
26 UnderShirtAsset varchar(36) DEFAULT NULL,
27 UnderPantsItem varchar(36) DEFAULT NULL,
28 UnderPantsAsset varchar(36) DEFAULT NULL,
29 SkirtItem varchar(36) DEFAULT NULL,
30 SkirtAsset varchar(36) DEFAULT NULL,
31 Texture blob,
32 VisualParams blob,
33 Serial int DEFAULT NULL,
34 AvatarHeight float DEFAULT NULL
35);
36
37COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/011_RegionStore.sql b/OpenSim/Data/SQLite/Resources/011_RegionStore.sql
deleted file mode 100644
index 42bef89..0000000
--- a/OpenSim/Data/SQLite/Resources/011_RegionStore.sql
+++ /dev/null
@@ -1,28 +0,0 @@
1BEGIN;
2
3ALTER TABLE prims ADD COLUMN PayPrice INTEGER NOT NULL default 0;
4ALTER TABLE prims ADD COLUMN PayButton1 INTEGER NOT NULL default 0;
5ALTER TABLE prims ADD COLUMN PayButton2 INTEGER NOT NULL default 0;
6ALTER TABLE prims ADD COLUMN PayButton3 INTEGER NOT NULL default 0;
7ALTER TABLE prims ADD COLUMN PayButton4 INTEGER NOT NULL default 0;
8ALTER TABLE prims ADD COLUMN LoopedSound varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000';
9ALTER TABLE prims ADD COLUMN LoopedSoundGain float NOT NULL default 0;
10ALTER TABLE prims ADD COLUMN TextureAnimation string;
11ALTER TABLE prims ADD COLUMN ParticleSystem string;
12ALTER TABLE prims ADD COLUMN OmegaX float NOT NULL default 0;
13ALTER TABLE prims ADD COLUMN OmegaY float NOT NULL default 0;
14ALTER TABLE prims ADD COLUMN OmegaZ float NOT NULL default 0;
15ALTER TABLE prims ADD COLUMN CameraEyeOffsetX float NOT NULL default 0;
16ALTER TABLE prims ADD COLUMN CameraEyeOffsetY float NOT NULL default 0;
17ALTER TABLE prims ADD COLUMN CameraEyeOffsetZ float NOT NULL default 0;
18ALTER TABLE prims ADD COLUMN CameraAtOffsetX float NOT NULL default 0;
19ALTER TABLE prims ADD COLUMN CameraAtOffsetY float NOT NULL default 0;
20ALTER TABLE prims ADD COLUMN CameraAtOffsetZ float NOT NULL default 0;
21ALTER TABLE prims ADD COLUMN ForceMouselook string NOT NULL default 0;
22ALTER TABLE prims ADD COLUMN ScriptAccessPin INTEGER NOT NULL default 0;
23ALTER TABLE prims ADD COLUMN AllowedDrop INTEGER NOT NULL default 0;
24ALTER TABLE prims ADD COLUMN DieAtEdge string NOT NULL default 0;
25ALTER TABLE prims ADD COLUMN SalePrice INTEGER NOT NULL default 0;
26ALTER TABLE prims ADD COLUMN SaleType string NOT NULL default 0;
27
28COMMIT; \ No newline at end of file
diff --git a/OpenSim/Data/SQLite/Resources/012_RegionStore.sql b/OpenSim/Data/SQLite/Resources/012_RegionStore.sql
deleted file mode 100644
index d952b78..0000000
--- a/OpenSim/Data/SQLite/Resources/012_RegionStore.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN;
2
3ALTER TABLE prims ADD COLUMN Material INTEGER NOT NULL default 3;
4
5COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/013_RegionStore.sql b/OpenSim/Data/SQLite/Resources/013_RegionStore.sql
deleted file mode 100644
index 11529cd..0000000
--- a/OpenSim/Data/SQLite/Resources/013_RegionStore.sql
+++ /dev/null
@@ -1,6 +0,0 @@
1BEGIN;
2
3ALTER TABLE land ADD COLUMN OtherCleanTime INTEGER NOT NULL default 0;
4ALTER TABLE land ADD COLUMN Dwell INTEGER NOT NULL default 0;
5
6COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/014_RegionStore.sql b/OpenSim/Data/SQLite/Resources/014_RegionStore.sql
deleted file mode 100644
index c59b27e..0000000
--- a/OpenSim/Data/SQLite/Resources/014_RegionStore.sql
+++ /dev/null
@@ -1,8 +0,0 @@
1begin;
2
3ALTER TABLE regionsettings ADD COLUMN sunvectorx double NOT NULL default 0;
4ALTER TABLE regionsettings ADD COLUMN sunvectory double NOT NULL default 0;
5ALTER TABLE regionsettings ADD COLUMN sunvectorz double NOT NULL default 0;
6
7commit;
8
diff --git a/OpenSim/Data/SQLite/Resources/015_RegionStore.sql b/OpenSim/Data/SQLite/Resources/015_RegionStore.sql
deleted file mode 100644
index c43f356..0000000
--- a/OpenSim/Data/SQLite/Resources/015_RegionStore.sql
+++ /dev/null
@@ -1,6 +0,0 @@
1BEGIN;
2
3ALTER TABLE prims ADD COLUMN CollisionSound varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000';
4ALTER TABLE prims ADD COLUMN CollisionSoundVolume float NOT NULL default 0;
5
6COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/016_RegionStore.sql b/OpenSim/Data/SQLite/Resources/016_RegionStore.sql
deleted file mode 100644
index 52f160c..0000000
--- a/OpenSim/Data/SQLite/Resources/016_RegionStore.sql
+++ /dev/null
@@ -1,5 +0,0 @@
1BEGIN;
2
3ALTER TABLE prims ADD COLUMN VolumeDetect INTEGER NOT NULL DEFAULT 0;
4
5COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/017_RegionStore.sql b/OpenSim/Data/SQLite/Resources/017_RegionStore.sql
deleted file mode 100644
index 6c6b7b5..0000000
--- a/OpenSim/Data/SQLite/Resources/017_RegionStore.sql
+++ /dev/null
@@ -1,8 +0,0 @@
1BEGIN;
2CREATE TEMPORARY TABLE prims_backup(UUID,RegionUUID,CreationDate,Name,SceneGroupID,Text,Description,SitName,TouchName,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,ObjectFlags,SitTargetOffsetX,SitTargetOffsetY,SitTargetOffsetZ,SitTargetOrientW,SitTargetOrientX,SitTargetOrientY,SitTargetOrientZ,ColorR,ColorG,ColorB,ColorA,ClickAction,PayPrice,PayButton1,PayButton2,PayButton3,PayButton4,LoopedSound,LoopedSoundGain,TextureAnimation,ParticleSystem,OmegaX,OmegaY,OmegaZ,CameraEyeOffsetX,CameraEyeOffsetY,CameraEyeOffsetZ,CameraAtOffsetX,CameraAtOffsetY,CameraAtOffsetZ,ForceMouselook,ScriptAccessPin,AllowedDrop,DieAtEdge,SalePrice,SaleType,Material,CollisionSound,CollisionSoundVolume,VolumeDetect);
3INSERT INTO prims_backup SELECT UUID,RegionUUID,CreationDate,Name,SceneGroupID,Text,Description,SitName,TouchName,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,ObjectFlags,SitTargetOffsetX,SitTargetOffsetY,SitTargetOffsetZ,SitTargetOrientW,SitTargetOrientX,SitTargetOrientY,SitTargetOrientZ,ColorR,ColorG,ColorB,ColorA,ClickAction,PayPrice,PayButton1,PayButton2,PayButton3,PayButton4,LoopedSound,LoopedSoundGain,TextureAnimation,ParticleSystem,OmegaX,OmegaY,OmegaZ,CameraEyeOffsetX,CameraEyeOffsetY,CameraEyeOffsetZ,CameraAtOffsetX,CameraAtOffsetY,CameraAtOffsetZ,ForceMouselook,ScriptAccessPin,AllowedDrop,DieAtEdge,SalePrice,SaleType,Material,CollisionSound,CollisionSoundVolume,VolumeDetect FROM prims;
4DROP TABLE prims;
5CREATE TABLE prims(UUID,RegionUUID,CreationDate,Name,SceneGroupID,Text,Description,SitName,TouchName,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,ObjectFlags,SitTargetOffsetX,SitTargetOffsetY,SitTargetOffsetZ,SitTargetOrientW,SitTargetOrientX,SitTargetOrientY,SitTargetOrientZ,ColorR,ColorG,ColorB,ColorA,ClickAction,PayPrice,PayButton1,PayButton2,PayButton3,PayButton4,LoopedSound,LoopedSoundGain,TextureAnimation,ParticleSystem,OmegaX,OmegaY,OmegaZ,CameraEyeOffsetX,CameraEyeOffsetY,CameraEyeOffsetZ,CameraAtOffsetX,CameraAtOffsetY,CameraAtOffsetZ,ForceMouselook,ScriptAccessPin,AllowedDrop,DieAtEdge,SalePrice,SaleType,Material,CollisionSound,CollisionSoundVolume,VolumeDetect);
6INSERT INTO prims SELECT UUID,RegionUUID,CreationDate,Name,SceneGroupID,Text,Description,SitName,TouchName,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,ObjectFlags,SitTargetOffsetX,SitTargetOffsetY,SitTargetOffsetZ,SitTargetOrientW,SitTargetOrientX,SitTargetOrientY,SitTargetOrientZ,ColorR,ColorG,ColorB,ColorA,ClickAction,PayPrice,PayButton1,PayButton2,PayButton3,PayButton4,LoopedSound,LoopedSoundGain,TextureAnimation,ParticleSystem,OmegaX,OmegaY,OmegaZ,CameraEyeOffsetX,CameraEyeOffsetY,CameraEyeOffsetZ,CameraAtOffsetX,CameraAtOffsetY,CameraAtOffsetZ,ForceMouselook,ScriptAccessPin,AllowedDrop,DieAtEdge,SalePrice,SaleType,Material,CollisionSound,CollisionSoundVolume,VolumeDetect FROM prims_backup;
7DROP TABLE prims_backup;
8COMMIT; \ No newline at end of file
diff --git a/OpenSim/Data/SQLite/Resources/018_RegionStore.sql b/OpenSim/Data/SQLite/Resources/018_RegionStore.sql
deleted file mode 100644
index 6a390c2..0000000
--- a/OpenSim/Data/SQLite/Resources/018_RegionStore.sql
+++ /dev/null
@@ -1,79 +0,0 @@
1BEGIN;
2
3update terrain
4 set RegionUUID = substr(RegionUUID, 1, 8) || "-" || substr(RegionUUID, 9, 4) || "-" || substr(RegionUUID, 13, 4) || "-" || substr(RegionUUID, 17, 4) || "-" || substr(RegionUUID, 21, 12)
5 where RegionUUID not like '%-%';
6
7
8update landaccesslist
9 set LandUUID = substr(LandUUID, 1, 8) || "-" || substr(LandUUID, 9, 4) || "-" || substr(LandUUID, 13, 4) || "-" || substr(LandUUID, 17, 4) || "-" || substr(LandUUID, 21, 12)
10 where LandUUID not like '%-%';
11
12update landaccesslist
13 set AccessUUID = substr(AccessUUID, 1, 8) || "-" || substr(AccessUUID, 9, 4) || "-" || substr(AccessUUID, 13, 4) || "-" || substr(AccessUUID, 17, 4) || "-" || substr(AccessUUID, 21, 12)
14 where AccessUUID not like '%-%';
15
16
17update prims
18 set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12)
19 where UUID not like '%-%';
20
21update prims
22 set RegionUUID = substr(RegionUUID, 1, 8) || "-" || substr(RegionUUID, 9, 4) || "-" || substr(RegionUUID, 13, 4) || "-" || substr(RegionUUID, 17, 4) || "-" || substr(RegionUUID, 21, 12)
23 where RegionUUID not like '%-%';
24
25update prims
26 set SceneGroupID = substr(SceneGroupID, 1, 8) || "-" || substr(SceneGroupID, 9, 4) || "-" || substr(SceneGroupID, 13, 4) || "-" || substr(SceneGroupID, 17, 4) || "-" || substr(SceneGroupID, 21, 12)
27 where SceneGroupID not like '%-%';
28
29update prims
30 set CreatorID = substr(CreatorID, 1, 8) || "-" || substr(CreatorID, 9, 4) || "-" || substr(CreatorID, 13, 4) || "-" || substr(CreatorID, 17, 4) || "-" || substr(CreatorID, 21, 12)
31 where CreatorID not like '%-%';
32
33update prims
34 set OwnerID = substr(OwnerID, 1, 8) || "-" || substr(OwnerID, 9, 4) || "-" || substr(OwnerID, 13, 4) || "-" || substr(OwnerID, 17, 4) || "-" || substr(OwnerID, 21, 12)
35 where OwnerID not like '%-%';
36
37update prims
38 set GroupID = substr(GroupID, 1, 8) || "-" || substr(GroupID, 9, 4) || "-" || substr(GroupID, 13, 4) || "-" || substr(GroupID, 17, 4) || "-" || substr(GroupID, 21, 12)
39 where GroupID not like '%-%';
40
41update prims
42 set LastOwnerID = substr(LastOwnerID, 1, 8) || "-" || substr(LastOwnerID, 9, 4) || "-" || substr(LastOwnerID, 13, 4) || "-" || substr(LastOwnerID, 17, 4) || "-" || substr(LastOwnerID, 21, 12)
43 where LastOwnerID not like '%-%';
44
45
46update primshapes
47 set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12)
48 where UUID not like '%-%';
49
50
51update land
52 set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12)
53 where UUID not like '%-%';
54
55update land
56 set RegionUUID = substr(RegionUUID, 1, 8) || "-" || substr(RegionUUID, 9, 4) || "-" || substr(RegionUUID, 13, 4) || "-" || substr(RegionUUID, 17, 4) || "-" || substr(RegionUUID, 21, 12)
57 where RegionUUID not like '%-%';
58
59update land
60 set OwnerUUID = substr(OwnerUUID, 1, 8) || "-" || substr(OwnerUUID, 9, 4) || "-" || substr(OwnerUUID, 13, 4) || "-" || substr(OwnerUUID, 17, 4) || "-" || substr(OwnerUUID, 21, 12)
61 where OwnerUUID not like '%-%';
62
63update land
64 set GroupUUID = substr(GroupUUID, 1, 8) || "-" || substr(GroupUUID, 9, 4) || "-" || substr(GroupUUID, 13, 4) || "-" || substr(GroupUUID, 17, 4) || "-" || substr(GroupUUID, 21, 12)
65 where GroupUUID not like '%-%';
66
67update land
68 set MediaTextureUUID = substr(MediaTextureUUID, 1, 8) || "-" || substr(MediaTextureUUID, 9, 4) || "-" || substr(MediaTextureUUID, 13, 4) || "-" || substr(MediaTextureUUID, 17, 4) || "-" || substr(MediaTextureUUID, 21, 12)
69 where MediaTextureUUID not like '%-%';
70
71update land
72 set SnapshotUUID = substr(SnapshotUUID, 1, 8) || "-" || substr(SnapshotUUID, 9, 4) || "-" || substr(SnapshotUUID, 13, 4) || "-" || substr(SnapshotUUID, 17, 4) || "-" || substr(SnapshotUUID, 21, 12)
73 where SnapshotUUID not like '%-%';
74
75update land
76 set AuthbuyerID = substr(AuthbuyerID, 1, 8) || "-" || substr(AuthbuyerID, 9, 4) || "-" || substr(AuthbuyerID, 13, 4) || "-" || substr(AuthbuyerID, 17, 4) || "-" || substr(AuthbuyerID, 21, 12)
77 where AuthbuyerID not like '%-%';
78
79COMMIT; \ No newline at end of file
diff --git a/OpenSim/Data/SQLite/Resources/AssetStore.migrations b/OpenSim/Data/SQLite/Resources/AssetStore.migrations
new file mode 100644
index 0000000..fb72b91
--- /dev/null
+++ b/OpenSim/Data/SQLite/Resources/AssetStore.migrations
@@ -0,0 +1,42 @@
1:VERSION 1
2
3BEGIN TRANSACTION;
4CREATE TABLE assets(
5 UUID varchar(255) primary key,
6 Name varchar(255),
7 Description varchar(255),
8 Type integer,
9 InvType integer,
10 Local integer,
11 Temporary integer,
12 Data blob);
13
14COMMIT;
15
16:VERSION 2
17
18BEGIN TRANSACTION;
19
20CREATE TEMPORARY TABLE assets_backup(UUID,Name,Description,Type,Local,Temporary,Data);
21INSERT INTO assets_backup SELECT UUID,Name,Description,Type,Local,Temporary,Data FROM assets;
22DROP TABLE assets;
23CREATE TABLE assets(UUID,Name,Description,Type,Local,Temporary,Data);
24INSERT INTO assets SELECT UUID,Name,Description,Type,Local,Temporary,Data FROM assets_backup;
25DROP TABLE assets_backup;
26
27COMMIT;
28
29:VERSION 3
30
31DELETE FROM assets WHERE UUID = 'dc4b9f0bd00845c696a401dd947ac621'
32
33:VERSION 4
34
35BEGIN;
36
37update assets
38 set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12)
39 where UUID not like '%-%';
40
41COMMIT;
42
diff --git a/OpenSim/Data/SQLite/Resources/001_AuthStore.sql b/OpenSim/Data/SQLite/Resources/AuthStore.migrations
index 468567d..ca6bdf5 100644
--- a/OpenSim/Data/SQLite/Resources/001_AuthStore.sql
+++ b/OpenSim/Data/SQLite/Resources/AuthStore.migrations
@@ -1,3 +1,5 @@
1:VERSION 1
2
1BEGIN TRANSACTION; 3BEGIN TRANSACTION;
2 4
3CREATE TABLE auth ( 5CREATE TABLE auth (
@@ -16,3 +18,12 @@ CREATE TABLE tokens (
16); 18);
17 19
18COMMIT; 20COMMIT;
21
22:VERSION 2
23
24BEGIN TRANSACTION;
25
26INSERT INTO auth (UUID, passwordHash, passwordSalt, webLoginKey) SELECT `UUID` AS UUID, `passwordHash` AS passwordHash, `passwordSalt` AS passwordSalt, `webLoginKey` AS webLoginKey FROM users;
27
28COMMIT;
29
diff --git a/OpenSim/Data/SQLite/Resources/001_Avatar.sql b/OpenSim/Data/SQLite/Resources/Avatar.migrations
index 7ec906b..13b4196 100644
--- a/OpenSim/Data/SQLite/Resources/001_Avatar.sql
+++ b/OpenSim/Data/SQLite/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/SQLite/Resources/001_FriendsStore.sql b/OpenSim/Data/SQLite/Resources/FriendsStore.migrations
index f1b9ab9..3eb4352 100644
--- a/OpenSim/Data/SQLite/Resources/001_FriendsStore.sql
+++ b/OpenSim/Data/SQLite/Resources/FriendsStore.migrations
@@ -1,3 +1,5 @@
1:VERSION 1
2
1BEGIN TRANSACTION; 3BEGIN TRANSACTION;
2 4
3CREATE TABLE `Friends` ( 5CREATE TABLE `Friends` (
@@ -8,3 +10,11 @@ CREATE TABLE `Friends` (
8 PRIMARY KEY(`PrincipalID`, `Friend`)); 10 PRIMARY KEY(`PrincipalID`, `Friend`));
9 11
10COMMIT; 12COMMIT;
13
14:VERSION 2
15
16BEGIN TRANSACTION;
17
18INSERT INTO `Friends` SELECT `ownerID`, `friendID`, `friendPerms`, 0 FROM `userfriends`;
19
20COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/004_InventoryStore.sql b/OpenSim/Data/SQLite/Resources/InventoryStore.migrations
index e8f4d46..585ac49 100644
--- a/OpenSim/Data/SQLite/Resources/004_InventoryStore.sql
+++ b/OpenSim/Data/SQLite/Resources/InventoryStore.migrations
@@ -1,3 +1,59 @@
1:VERSION 1
2
3BEGIN TRANSACTION;
4
5CREATE TABLE inventoryfolders(
6 UUID varchar(255) primary key,
7 name varchar(255),
8 agentID varchar(255),
9 parentID varchar(255),
10 type integer,
11 version integer);
12
13CREATE TABLE inventoryitems(
14 UUID varchar(255) primary key,
15 assetID varchar(255),
16 assetType integer,
17 invType integer,
18 parentFolderID varchar(255),
19 avatarID varchar(255),
20 creatorsID varchar(255),
21 inventoryName varchar(255),
22 inventoryDescription varchar(255),
23 inventoryNextPermissions integer,
24 inventoryCurrentPermissions integer,
25 inventoryBasePermissions integer,
26 inventoryEveryOnePermissions integer,
27 salePrice integer default 99,
28 saleType integer default 0,
29 creationDate integer default 2000,
30 groupID varchar(255) default '00000000-0000-0000-0000-000000000000',
31 groupOwned integer default 0,
32 flags integer default 0);
33
34COMMIT;
35
36:VERSION 2
37
38BEGIN TRANSACTION;
39
40create index inventoryfolders_agentid on inventoryfolders(agentid);
41create index inventoryfolders_parentid on inventoryfolders(parentid);
42create index inventoryitems_parentfolderid on inventoryitems(parentfolderid);
43create index inventoryitems_avatarid on inventoryitems(avatarid);
44
45COMMIT;
46
47:VERSION 3
48
49BEGIN;
50
51alter table inventoryitems add column inventoryGroupPermissions integer unsigned not null default 0;
52
53COMMIT;
54
55:VERSION 4
56
1BEGIN; 57BEGIN;
2 58
3update inventoryitems 59update inventoryitems
diff --git a/OpenSim/Data/SQLite/Resources/RegionStore.migrations b/OpenSim/Data/SQLite/Resources/RegionStore.migrations
new file mode 100644
index 0000000..7b27378
--- /dev/null
+++ b/OpenSim/Data/SQLite/Resources/RegionStore.migrations
@@ -0,0 +1,526 @@
1:VERSION 1
2
3BEGIN TRANSACTION;
4
5CREATE TABLE prims(
6 UUID varchar(255) primary key,
7 RegionUUID varchar(255),
8 ParentID integer,
9 CreationDate integer,
10 Name varchar(255),
11 SceneGroupID varchar(255),
12 Text varchar(255),
13 Description varchar(255),
14 SitName varchar(255),
15 TouchName varchar(255),
16 CreatorID varchar(255),
17 OwnerID varchar(255),
18 GroupID varchar(255),
19 LastOwnerID varchar(255),
20 OwnerMask integer,
21 NextOwnerMask integer,
22 GroupMask integer,
23 EveryoneMask integer,
24 BaseMask integer,
25 PositionX float,
26 PositionY float,
27 PositionZ float,
28 GroupPositionX float,
29 GroupPositionY float,
30 GroupPositionZ float,
31 VelocityX float,
32 VelocityY float,
33 VelocityZ float,
34 AngularVelocityX float,
35 AngularVelocityY float,
36 AngularVelocityZ float,
37 AccelerationX float,
38 AccelerationY float,
39 AccelerationZ float,
40 RotationX float,
41 RotationY float,
42 RotationZ float,
43 RotationW float,
44 ObjectFlags integer,
45 SitTargetOffsetX float NOT NULL default 0,
46 SitTargetOffsetY float NOT NULL default 0,
47 SitTargetOffsetZ float NOT NULL default 0,
48 SitTargetOrientW float NOT NULL default 0,
49 SitTargetOrientX float NOT NULL default 0,
50 SitTargetOrientY float NOT NULL default 0,
51 SitTargetOrientZ float NOT NULL default 0);
52
53CREATE TABLE primshapes(
54 UUID varchar(255) primary key,
55 Shape integer,
56 ScaleX float,
57 ScaleY float,
58 ScaleZ float,
59 PCode integer,
60 PathBegin integer,
61 PathEnd integer,
62 PathScaleX integer,
63 PathScaleY integer,
64 PathShearX integer,
65 PathShearY integer,
66 PathSkew integer,
67 PathCurve integer,
68 PathRadiusOffset integer,
69 PathRevolutions integer,
70 PathTaperX integer,
71 PathTaperY integer,
72 PathTwist integer,
73 PathTwistBegin integer,
74 ProfileBegin integer,
75 ProfileEnd integer,
76 ProfileCurve integer,
77 ProfileHollow integer,
78 Texture blob,
79 ExtraParams blob,
80 State Integer NOT NULL default 0);
81
82CREATE TABLE primitems(
83 itemID varchar(255) primary key,
84 primID varchar(255),
85 assetID varchar(255),
86 parentFolderID varchar(255),
87 invType integer,
88 assetType integer,
89 name varchar(255),
90 description varchar(255),
91 creationDate integer,
92 creatorID varchar(255),
93 ownerID varchar(255),
94 lastOwnerID varchar(255),
95 groupID varchar(255),
96 nextPermissions string,
97 currentPermissions string,
98 basePermissions string,
99 everyonePermissions string,
100 groupPermissions string);
101
102CREATE TABLE terrain(
103 RegionUUID varchar(255),
104 Revision integer,
105 Heightfield blob);
106
107CREATE TABLE land(
108 UUID varchar(255) primary key,
109 RegionUUID varchar(255),
110 LocalLandID string,
111 Bitmap blob,
112 Name varchar(255),
113 Desc varchar(255),
114 OwnerUUID varchar(255),
115 IsGroupOwned string,
116 Area integer,
117 AuctionID integer,
118 Category integer,
119 ClaimDate integer,
120 ClaimPrice integer,
121 GroupUUID varchar(255),
122 SalePrice integer,
123 LandStatus integer,
124 LandFlags string,
125 LandingType string,
126 MediaAutoScale string,
127 MediaTextureUUID varchar(255),
128 MediaURL varchar(255),
129 MusicURL varchar(255),
130 PassHours float,
131 PassPrice string,
132 SnapshotUUID varchar(255),
133 UserLocationX float,
134 UserLocationY float,
135 UserLocationZ float,
136 UserLookAtX float,
137 UserLookAtY float,
138 UserLookAtZ float,
139 AuthbuyerID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000');
140
141CREATE TABLE landaccesslist(
142 LandUUID varchar(255),
143 AccessUUID varchar(255),
144 Flags string);
145
146COMMIT;
147
148:VERSION 2
149
150BEGIN TRANSACTION;
151
152CREATE TABLE regionban(
153 regionUUID varchar (255),
154 bannedUUID varchar (255),
155 bannedIp varchar (255),
156 bannedIpHostMask varchar (255)
157 );
158
159COMMIT;
160
161:VERSION 3
162
163BEGIN;
164
165ALTER TABLE primitems add flags integer not null default 0;
166
167COMMIT;
168
169:VERSION 4
170
171BEGIN;
172
173create table regionsettings (
174 regionUUID char(36) not null,
175 block_terraform integer not null,
176 block_fly integer not null,
177 allow_damage integer not null,
178 restrict_pushing integer not null,
179 allow_land_resell integer not null,
180 allow_land_join_divide integer not null,
181 block_show_in_search integer not null,
182 agent_limit integer not null,
183 object_bonus float not null,
184 maturity integer not null,
185 disable_scripts integer not null,
186 disable_collisions integer not null,
187 disable_physics integer not null,
188 terrain_texture_1 char(36) not null,
189 terrain_texture_2 char(36) not null,
190 terrain_texture_3 char(36) not null,
191 terrain_texture_4 char(36) not null,
192 elevation_1_nw float not null,
193 elevation_2_nw float not null,
194 elevation_1_ne float not null,
195 elevation_2_ne float not null,
196 elevation_1_se float not null,
197 elevation_2_se float not null,
198 elevation_1_sw float not null,
199 elevation_2_sw float not null,
200 water_height float not null,
201 terrain_raise_limit float not null,
202 terrain_lower_limit float not null,
203 use_estate_sun integer not null,
204 fixed_sun integer not null,
205 sun_position float not null,
206 covenant char(36));
207
208COMMIT;
209
210:VERSION 5
211
212BEGIN;
213
214delete from regionsettings;
215
216COMMIT;
217
218:VERSION 6
219
220BEGIN TRANSACTION;
221
222CREATE TABLE estate_groups (
223 EstateID int(10) NOT NULL,
224 uuid char(36) NOT NULL
225);
226
227CREATE TABLE estate_managers (
228 EstateID int(10) NOT NULL,
229 uuid char(36) NOT NULL
230);
231
232CREATE TABLE estate_map (
233 RegionID char(36) NOT NULL default '00000000-0000-0000-0000-000000000000',
234 EstateID int(11) NOT NULL
235);
236
237CREATE TABLE estate_settings (
238 EstateID INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
239 EstateName varchar(64) default NULL,
240 AbuseEmailToEstateOwner tinyint(4) NOT NULL,
241 DenyAnonymous tinyint(4) NOT NULL,
242 ResetHomeOnTeleport tinyint(4) NOT NULL,
243 FixedSun tinyint(4) NOT NULL,
244 DenyTransacted tinyint(4) NOT NULL,
245 BlockDwell tinyint(4) NOT NULL,
246 DenyIdentified tinyint(4) NOT NULL,
247 AllowVoice tinyint(4) NOT NULL,
248 UseGlobalTime tinyint(4) NOT NULL,
249 PricePerMeter int(11) NOT NULL,
250 TaxFree tinyint(4) NOT NULL,
251 AllowDirectTeleport tinyint(4) NOT NULL,
252 RedirectGridX int(11) NOT NULL,
253 RedirectGridY int(11) NOT NULL,
254 ParentEstateID int(10) NOT NULL,
255 SunPosition double NOT NULL,
256 EstateSkipScripts tinyint(4) NOT NULL,
257 BillableFactor float NOT NULL,
258 PublicAccess tinyint(4) NOT NULL
259);
260insert into estate_settings (EstateID,EstateName,AbuseEmailToEstateOwner,DenyAnonymous,ResetHomeOnTeleport,FixedSun,DenyTransacted,BlockDwell,DenyIdentified,AllowVoice,UseGlobalTime,PricePerMeter,TaxFree,AllowDirectTeleport,RedirectGridX,RedirectGridY,ParentEstateID,SunPosition,PublicAccess,EstateSkipScripts,BillableFactor) values ( 99, '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '');
261delete from estate_settings;
262CREATE TABLE estate_users (
263 EstateID int(10) NOT NULL,
264 uuid char(36) NOT NULL
265);
266
267CREATE TABLE estateban (
268 EstateID int(10) NOT NULL,
269 bannedUUID varchar(36) NOT NULL,
270 bannedIp varchar(16) NOT NULL,
271 bannedIpHostMask varchar(16) NOT NULL,
272 bannedNameMask varchar(64) default NULL
273);
274
275drop table regionsettings;
276CREATE TABLE regionsettings (
277 regionUUID char(36) NOT NULL,
278 block_terraform int(11) NOT NULL,
279 block_fly int(11) NOT NULL,
280 allow_damage int(11) NOT NULL,
281 restrict_pushing int(11) NOT NULL,
282 allow_land_resell int(11) NOT NULL,
283 allow_land_join_divide int(11) NOT NULL,
284 block_show_in_search int(11) NOT NULL,
285 agent_limit int(11) NOT NULL,
286 object_bonus float NOT NULL,
287 maturity int(11) NOT NULL,
288 disable_scripts int(11) NOT NULL,
289 disable_collisions int(11) NOT NULL,
290 disable_physics int(11) NOT NULL,
291 terrain_texture_1 char(36) NOT NULL,
292 terrain_texture_2 char(36) NOT NULL,
293 terrain_texture_3 char(36) NOT NULL,
294 terrain_texture_4 char(36) NOT NULL,
295 elevation_1_nw float NOT NULL,
296 elevation_2_nw float NOT NULL,
297 elevation_1_ne float NOT NULL,
298 elevation_2_ne float NOT NULL,
299 elevation_1_se float NOT NULL,
300 elevation_2_se float NOT NULL,
301 elevation_1_sw float NOT NULL,
302 elevation_2_sw float NOT NULL,
303 water_height float NOT NULL,
304 terrain_raise_limit float NOT NULL,
305 terrain_lower_limit float NOT NULL,
306 use_estate_sun int(11) NOT NULL,
307 fixed_sun int(11) NOT NULL,
308 sun_position float NOT NULL,
309 covenant char(36) default NULL,
310 Sandbox tinyint(4) NOT NULL,
311 PRIMARY KEY (regionUUID)
312);
313
314CREATE INDEX estate_ban_estate_id on estateban(EstateID);
315CREATE INDEX estate_groups_estate_id on estate_groups(EstateID);
316CREATE INDEX estate_managers_estate_id on estate_managers(EstateID);
317CREATE INDEX estate_map_estate_id on estate_map(EstateID);
318CREATE UNIQUE INDEX estate_map_region_id on estate_map(RegionID);
319CREATE INDEX estate_users_estate_id on estate_users(EstateID);
320
321COMMIT;
322
323:VERSION 7
324
325begin;
326
327alter table estate_settings add column AbuseEmail varchar(255) not null default '';
328
329alter table estate_settings add column EstateOwner varchar(36) not null default '';
330
331commit;
332
333:VERSION 8
334
335begin;
336
337alter table estate_settings add column DenyMinors tinyint not null default 0;
338
339commit;
340
341:VERSION 9
342
343BEGIN;
344
345ALTER TABLE prims ADD COLUMN ColorR integer not null default 0;
346ALTER TABLE prims ADD COLUMN ColorG integer not null default 0;
347ALTER TABLE prims ADD COLUMN ColorB integer not null default 0;
348ALTER TABLE prims ADD COLUMN ColorA integer not null default 0;
349
350COMMIT;
351
352:VERSION 10
353
354BEGIN;
355
356ALTER TABLE prims ADD COLUMN ClickAction INTEGER NOT NULL default 0;
357
358COMMIT;
359
360:VERSION 11
361
362BEGIN;
363
364ALTER TABLE prims ADD COLUMN PayPrice INTEGER NOT NULL default 0;
365ALTER TABLE prims ADD COLUMN PayButton1 INTEGER NOT NULL default 0;
366ALTER TABLE prims ADD COLUMN PayButton2 INTEGER NOT NULL default 0;
367ALTER TABLE prims ADD COLUMN PayButton3 INTEGER NOT NULL default 0;
368ALTER TABLE prims ADD COLUMN PayButton4 INTEGER NOT NULL default 0;
369ALTER TABLE prims ADD COLUMN LoopedSound varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000';
370ALTER TABLE prims ADD COLUMN LoopedSoundGain float NOT NULL default 0;
371ALTER TABLE prims ADD COLUMN TextureAnimation string;
372ALTER TABLE prims ADD COLUMN ParticleSystem string;
373ALTER TABLE prims ADD COLUMN OmegaX float NOT NULL default 0;
374ALTER TABLE prims ADD COLUMN OmegaY float NOT NULL default 0;
375ALTER TABLE prims ADD COLUMN OmegaZ float NOT NULL default 0;
376ALTER TABLE prims ADD COLUMN CameraEyeOffsetX float NOT NULL default 0;
377ALTER TABLE prims ADD COLUMN CameraEyeOffsetY float NOT NULL default 0;
378ALTER TABLE prims ADD COLUMN CameraEyeOffsetZ float NOT NULL default 0;
379ALTER TABLE prims ADD COLUMN CameraAtOffsetX float NOT NULL default 0;
380ALTER TABLE prims ADD COLUMN CameraAtOffsetY float NOT NULL default 0;
381ALTER TABLE prims ADD COLUMN CameraAtOffsetZ float NOT NULL default 0;
382ALTER TABLE prims ADD COLUMN ForceMouselook string NOT NULL default 0;
383ALTER TABLE prims ADD COLUMN ScriptAccessPin INTEGER NOT NULL default 0;
384ALTER TABLE prims ADD COLUMN AllowedDrop INTEGER NOT NULL default 0;
385ALTER TABLE prims ADD COLUMN DieAtEdge string NOT NULL default 0;
386ALTER TABLE prims ADD COLUMN SalePrice INTEGER NOT NULL default 0;
387ALTER TABLE prims ADD COLUMN SaleType string NOT NULL default 0;
388
389COMMIT;
390
391:VERSION 12
392
393BEGIN;
394
395ALTER TABLE prims ADD COLUMN Material INTEGER NOT NULL default 3;
396
397COMMIT;
398
399:VERSION 13
400
401BEGIN;
402
403ALTER TABLE land ADD COLUMN OtherCleanTime INTEGER NOT NULL default 0;
404ALTER TABLE land ADD COLUMN Dwell INTEGER NOT NULL default 0;
405
406COMMIT;
407
408:VERSION 14
409
410begin;
411
412ALTER TABLE regionsettings ADD COLUMN sunvectorx double NOT NULL default 0;
413ALTER TABLE regionsettings ADD COLUMN sunvectory double NOT NULL default 0;
414ALTER TABLE regionsettings ADD COLUMN sunvectorz double NOT NULL default 0;
415
416commit;
417
418:VERSION 15
419
420BEGIN;
421
422ALTER TABLE prims ADD COLUMN CollisionSound varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000';
423ALTER TABLE prims ADD COLUMN CollisionSoundVolume float NOT NULL default 0;
424
425COMMIT;
426
427:VERSION 16
428
429BEGIN;
430
431ALTER TABLE prims ADD COLUMN VolumeDetect INTEGER NOT NULL DEFAULT 0;
432
433COMMIT;
434
435:VERSION 17
436
437BEGIN;
438CREATE TEMPORARY TABLE prims_backup(UUID,RegionUUID,CreationDate,Name,SceneGroupID,Text,Description,SitName,TouchName,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,ObjectFlags,SitTargetOffsetX,SitTargetOffsetY,SitTargetOffsetZ,SitTargetOrientW,SitTargetOrientX,SitTargetOrientY,SitTargetOrientZ,ColorR,ColorG,ColorB,ColorA,ClickAction,PayPrice,PayButton1,PayButton2,PayButton3,PayButton4,LoopedSound,LoopedSoundGain,TextureAnimation,ParticleSystem,OmegaX,OmegaY,OmegaZ,CameraEyeOffsetX,CameraEyeOffsetY,CameraEyeOffsetZ,CameraAtOffsetX,CameraAtOffsetY,CameraAtOffsetZ,ForceMouselook,ScriptAccessPin,AllowedDrop,DieAtEdge,SalePrice,SaleType,Material,CollisionSound,CollisionSoundVolume,VolumeDetect);
439INSERT INTO prims_backup SELECT UUID,RegionUUID,CreationDate,Name,SceneGroupID,Text,Description,SitName,TouchName,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,ObjectFlags,SitTargetOffsetX,SitTargetOffsetY,SitTargetOffsetZ,SitTargetOrientW,SitTargetOrientX,SitTargetOrientY,SitTargetOrientZ,ColorR,ColorG,ColorB,ColorA,ClickAction,PayPrice,PayButton1,PayButton2,PayButton3,PayButton4,LoopedSound,LoopedSoundGain,TextureAnimation,ParticleSystem,OmegaX,OmegaY,OmegaZ,CameraEyeOffsetX,CameraEyeOffsetY,CameraEyeOffsetZ,CameraAtOffsetX,CameraAtOffsetY,CameraAtOffsetZ,ForceMouselook,ScriptAccessPin,AllowedDrop,DieAtEdge,SalePrice,SaleType,Material,CollisionSound,CollisionSoundVolume,VolumeDetect FROM prims;
440DROP TABLE prims;
441CREATE TABLE prims(UUID,RegionUUID,CreationDate,Name,SceneGroupID,Text,Description,SitName,TouchName,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,ObjectFlags,SitTargetOffsetX,SitTargetOffsetY,SitTargetOffsetZ,SitTargetOrientW,SitTargetOrientX,SitTargetOrientY,SitTargetOrientZ,ColorR,ColorG,ColorB,ColorA,ClickAction,PayPrice,PayButton1,PayButton2,PayButton3,PayButton4,LoopedSound,LoopedSoundGain,TextureAnimation,ParticleSystem,OmegaX,OmegaY,OmegaZ,CameraEyeOffsetX,CameraEyeOffsetY,CameraEyeOffsetZ,CameraAtOffsetX,CameraAtOffsetY,CameraAtOffsetZ,ForceMouselook,ScriptAccessPin,AllowedDrop,DieAtEdge,SalePrice,SaleType,Material,CollisionSound,CollisionSoundVolume,VolumeDetect);
442INSERT INTO prims SELECT UUID,RegionUUID,CreationDate,Name,SceneGroupID,Text,Description,SitName,TouchName,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,ObjectFlags,SitTargetOffsetX,SitTargetOffsetY,SitTargetOffsetZ,SitTargetOrientW,SitTargetOrientX,SitTargetOrientY,SitTargetOrientZ,ColorR,ColorG,ColorB,ColorA,ClickAction,PayPrice,PayButton1,PayButton2,PayButton3,PayButton4,LoopedSound,LoopedSoundGain,TextureAnimation,ParticleSystem,OmegaX,OmegaY,OmegaZ,CameraEyeOffsetX,CameraEyeOffsetY,CameraEyeOffsetZ,CameraAtOffsetX,CameraAtOffsetY,CameraAtOffsetZ,ForceMouselook,ScriptAccessPin,AllowedDrop,DieAtEdge,SalePrice,SaleType,Material,CollisionSound,CollisionSoundVolume,VolumeDetect FROM prims_backup;
443DROP TABLE prims_backup;
444COMMIT;
445
446:VERSION 18
447
448BEGIN;
449
450update terrain
451 set RegionUUID = substr(RegionUUID, 1, 8) || "-" || substr(RegionUUID, 9, 4) || "-" || substr(RegionUUID, 13, 4) || "-" || substr(RegionUUID, 17, 4) || "-" || substr(RegionUUID, 21, 12)
452 where RegionUUID not like '%-%';
453
454
455update landaccesslist
456 set LandUUID = substr(LandUUID, 1, 8) || "-" || substr(LandUUID, 9, 4) || "-" || substr(LandUUID, 13, 4) || "-" || substr(LandUUID, 17, 4) || "-" || substr(LandUUID, 21, 12)
457 where LandUUID not like '%-%';
458
459update landaccesslist
460 set AccessUUID = substr(AccessUUID, 1, 8) || "-" || substr(AccessUUID, 9, 4) || "-" || substr(AccessUUID, 13, 4) || "-" || substr(AccessUUID, 17, 4) || "-" || substr(AccessUUID, 21, 12)
461 where AccessUUID not like '%-%';
462
463
464update prims
465 set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12)
466 where UUID not like '%-%';
467
468update prims
469 set RegionUUID = substr(RegionUUID, 1, 8) || "-" || substr(RegionUUID, 9, 4) || "-" || substr(RegionUUID, 13, 4) || "-" || substr(RegionUUID, 17, 4) || "-" || substr(RegionUUID, 21, 12)
470 where RegionUUID not like '%-%';
471
472update prims
473 set SceneGroupID = substr(SceneGroupID, 1, 8) || "-" || substr(SceneGroupID, 9, 4) || "-" || substr(SceneGroupID, 13, 4) || "-" || substr(SceneGroupID, 17, 4) || "-" || substr(SceneGroupID, 21, 12)
474 where SceneGroupID not like '%-%';
475
476update prims
477 set CreatorID = substr(CreatorID, 1, 8) || "-" || substr(CreatorID, 9, 4) || "-" || substr(CreatorID, 13, 4) || "-" || substr(CreatorID, 17, 4) || "-" || substr(CreatorID, 21, 12)
478 where CreatorID not like '%-%';
479
480update prims
481 set OwnerID = substr(OwnerID, 1, 8) || "-" || substr(OwnerID, 9, 4) || "-" || substr(OwnerID, 13, 4) || "-" || substr(OwnerID, 17, 4) || "-" || substr(OwnerID, 21, 12)
482 where OwnerID not like '%-%';
483
484update prims
485 set GroupID = substr(GroupID, 1, 8) || "-" || substr(GroupID, 9, 4) || "-" || substr(GroupID, 13, 4) || "-" || substr(GroupID, 17, 4) || "-" || substr(GroupID, 21, 12)
486 where GroupID not like '%-%';
487
488update prims
489 set LastOwnerID = substr(LastOwnerID, 1, 8) || "-" || substr(LastOwnerID, 9, 4) || "-" || substr(LastOwnerID, 13, 4) || "-" || substr(LastOwnerID, 17, 4) || "-" || substr(LastOwnerID, 21, 12)
490 where LastOwnerID not like '%-%';
491
492
493update primshapes
494 set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12)
495 where UUID not like '%-%';
496
497
498update land
499 set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12)
500 where UUID not like '%-%';
501
502update land
503 set RegionUUID = substr(RegionUUID, 1, 8) || "-" || substr(RegionUUID, 9, 4) || "-" || substr(RegionUUID, 13, 4) || "-" || substr(RegionUUID, 17, 4) || "-" || substr(RegionUUID, 21, 12)
504 where RegionUUID not like '%-%';
505
506update land
507 set OwnerUUID = substr(OwnerUUID, 1, 8) || "-" || substr(OwnerUUID, 9, 4) || "-" || substr(OwnerUUID, 13, 4) || "-" || substr(OwnerUUID, 17, 4) || "-" || substr(OwnerUUID, 21, 12)
508 where OwnerUUID not like '%-%';
509
510update land
511 set GroupUUID = substr(GroupUUID, 1, 8) || "-" || substr(GroupUUID, 9, 4) || "-" || substr(GroupUUID, 13, 4) || "-" || substr(GroupUUID, 17, 4) || "-" || substr(GroupUUID, 21, 12)
512 where GroupUUID not like '%-%';
513
514update land
515 set MediaTextureUUID = substr(MediaTextureUUID, 1, 8) || "-" || substr(MediaTextureUUID, 9, 4) || "-" || substr(MediaTextureUUID, 13, 4) || "-" || substr(MediaTextureUUID, 17, 4) || "-" || substr(MediaTextureUUID, 21, 12)
516 where MediaTextureUUID not like '%-%';
517
518update land
519 set SnapshotUUID = substr(SnapshotUUID, 1, 8) || "-" || substr(SnapshotUUID, 9, 4) || "-" || substr(SnapshotUUID, 13, 4) || "-" || substr(SnapshotUUID, 17, 4) || "-" || substr(SnapshotUUID, 21, 12)
520 where SnapshotUUID not like '%-%';
521
522update land
523 set AuthbuyerID = substr(AuthbuyerID, 1, 8) || "-" || substr(AuthbuyerID, 9, 4) || "-" || substr(AuthbuyerID, 13, 4) || "-" || substr(AuthbuyerID, 17, 4) || "-" || substr(AuthbuyerID, 21, 12)
524 where AuthbuyerID not like '%-%';
525
526COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/001_UserAccount.sql b/OpenSim/Data/SQLite/Resources/UserAccount.migrations
index c38d9a7..854fe69 100644
--- a/OpenSim/Data/SQLite/Resources/001_UserAccount.sql
+++ b/OpenSim/Data/SQLite/Resources/UserAccount.migrations
@@ -1,4 +1,6 @@
1BEGIN TRANSACTION; 1:VERSION 1
2
3BEGIN TRANSACTION;
2 4
3-- useraccounts table 5-- useraccounts table
4CREATE TABLE UserAccounts ( 6CREATE TABLE UserAccounts (
@@ -14,4 +16,12 @@ CREATE TABLE UserAccounts (
14 UserTitle varchar(64) NOT NULL DEFAULT '' 16 UserTitle varchar(64) NOT NULL DEFAULT ''
15); 17);
16 18
17COMMIT; \ No newline at end of file 19COMMIT;
20
21:VERSION 2
22
23BEGIN TRANSACTION;
24
25INSERT INTO UserAccounts (PrincipalID, ScopeID, FirstName, LastName, Email, ServiceURLs, Created) SELECT `UUID` AS PrincipalID, '00000000-0000-0000-0000-000000000000' AS ScopeID, username AS FirstName, surname AS LastName, '' as Email, '' AS ServiceURLs, created as Created FROM users;
26
27COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/UserStore.migrations b/OpenSim/Data/SQLite/Resources/UserStore.migrations
new file mode 100644
index 0000000..73d35e8
--- /dev/null
+++ b/OpenSim/Data/SQLite/Resources/UserStore.migrations
@@ -0,0 +1,169 @@
1:VERSION 1
2
3BEGIN TRANSACTION;
4
5-- users table
6CREATE TABLE users(
7 UUID varchar(255) primary key,
8 username varchar(255),
9 surname varchar(255),
10 passwordHash varchar(255),
11 passwordSalt varchar(255),
12 homeRegionX integer,
13 homeRegionY integer,
14 homeLocationX float,
15 homeLocationY float,
16 homeLocationZ float,
17 homeLookAtX float,
18 homeLookAtY float,
19 homeLookAtZ float,
20 created integer,
21 lastLogin integer,
22 rootInventoryFolderID varchar(255),
23 userInventoryURI varchar(255),
24 userAssetURI varchar(255),
25 profileCanDoMask integer,
26 profileWantDoMask integer,
27 profileAboutText varchar(255),
28 profileFirstText varchar(255),
29 profileImage varchar(255),
30 profileFirstImage varchar(255),
31 webLoginKey text default '00000000-0000-0000-0000-000000000000');
32-- friends table
33CREATE TABLE userfriends(
34 ownerID varchar(255),
35 friendID varchar(255),
36 friendPerms integer,
37 ownerPerms integer,
38 datetimestamp integer);
39
40COMMIT;
41
42:VERSION 2
43
44BEGIN;
45
46ALTER TABLE users add homeRegionID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000';
47
48COMMIT;
49
50:VERSION 3
51
52BEGIN;
53
54ALTER TABLE users add userFlags integer NOT NULL default 0;
55ALTER TABLE users add godLevel integer NOT NULL default 0;
56
57COMMIT;
58
59:VERSION 4
60
61BEGIN;
62
63ALTER TABLE users add customType varchar(32) not null default '';
64ALTER TABLE users add partner char(36) not null default '00000000-0000-0000-0000-000000000000';
65
66COMMIT;
67
68:VERSION 5
69
70BEGIN;
71
72CREATE TABLE `avatarattachments` (`UUID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', `attachpoint` int(11) NOT NULL DEFAULT 0, `item` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', `asset` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000');
73
74COMMIT;
75
76:VERSION 6
77
78BEGIN TRANSACTION;
79
80-- usersagents table
81CREATE TABLE IF NOT EXISTS useragents(
82 UUID varchar(255) primary key,
83 agentIP varchar(255),
84 agentPort integer,
85 agentOnline boolean,
86 sessionID varchar(255),
87 secureSessionID varchar(255),
88 regionID varchar(255),
89 loginTime integer,
90 logoutTime integer,
91 currentRegion varchar(255),
92 currentHandle varchar(255),
93 currentPosX float,
94 currentPosY float,
95 currentPosZ float);
96
97COMMIT;
98
99:VERSION 7
100
101BEGIN TRANSACTION;
102
103ALTER TABLE useragents add currentLookAtX float not null default 128;
104ALTER TABLE useragents add currentLookAtY float not null default 128;
105ALTER TABLE useragents add currentLookAtZ float not null default 70;
106
107COMMIT;
108
109:VERSION 8
110
111BEGIN TRANSACTION;
112
113ALTER TABLE users add email varchar(250);
114
115COMMIT;
116
117:VERSION 9
118
119BEGIN;
120
121update users
122 set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12)
123 where UUID not like '%-%';
124
125update useragents
126 set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12)
127 where UUID not like '%-%';
128
129COMMIT;
130
131:VERSION 10
132
133BEGIN TRANSACTION;
134
135CREATE TABLE IF NOT EXISTS avatarappearance(
136 Owner varchar(36) NOT NULL primary key,
137 BodyItem varchar(36) DEFAULT NULL,
138 BodyAsset varchar(36) DEFAULT NULL,
139 SkinItem varchar(36) DEFAULT NULL,
140 SkinAsset varchar(36) DEFAULT NULL,
141 HairItem varchar(36) DEFAULT NULL,
142 HairAsset varchar(36) DEFAULT NULL,
143 EyesItem varchar(36) DEFAULT NULL,
144 EyesAsset varchar(36) DEFAULT NULL,
145 ShirtItem varchar(36) DEFAULT NULL,
146 ShirtAsset varchar(36) DEFAULT NULL,
147 PantsItem varchar(36) DEFAULT NULL,
148 PantsAsset varchar(36) DEFAULT NULL,
149 ShoesItem varchar(36) DEFAULT NULL,
150 ShoesAsset varchar(36) DEFAULT NULL,
151 SocksItem varchar(36) DEFAULT NULL,
152 SocksAsset varchar(36) DEFAULT NULL,
153 JacketItem varchar(36) DEFAULT NULL,
154 JacketAsset varchar(36) DEFAULT NULL,
155 GlovesItem varchar(36) DEFAULT NULL,
156 GlovesAsset varchar(36) DEFAULT NULL,
157 UnderShirtItem varchar(36) DEFAULT NULL,
158 UnderShirtAsset varchar(36) DEFAULT NULL,
159 UnderPantsItem varchar(36) DEFAULT NULL,
160 UnderPantsAsset varchar(36) DEFAULT NULL,
161 SkirtItem varchar(36) DEFAULT NULL,
162 SkirtAsset varchar(36) DEFAULT NULL,
163 Texture blob,
164 VisualParams blob,
165 Serial int DEFAULT NULL,
166 AvatarHeight float DEFAULT NULL
167);
168
169COMMIT;
diff --git a/bin/MySql.Data.dll b/bin/MySql.Data.dll
index a94dd3d..7aa95ec 100644
--- a/bin/MySql.Data.dll
+++ b/bin/MySql.Data.dll
Binary files differ