aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MSSQL/Resources/004_InventoryStore.sql
diff options
context:
space:
mode:
authorAlexRa2010-05-06 23:16:36 +0300
committerAlexRa2010-05-18 22:16:13 +0300
commit020f38774fbe8e0f53b0cb28ab49b378b9dcd325 (patch)
tree5d936d6450d580cf24e133047df7ff8d759de557 /OpenSim/Data/MSSQL/Resources/004_InventoryStore.sql
parentMigrations for SQLite converted to new format (diff)
downloadopensim-SC_OLD-020f38774fbe8e0f53b0cb28ab49b378b9dcd325.zip
opensim-SC_OLD-020f38774fbe8e0f53b0cb28ab49b378b9dcd325.tar.gz
opensim-SC_OLD-020f38774fbe8e0f53b0cb28ab49b378b9dcd325.tar.bz2
opensim-SC_OLD-020f38774fbe8e0f53b0cb28ab49b378b9dcd325.tar.xz
MS SQL migrations converted to the new format
Diffstat (limited to 'OpenSim/Data/MSSQL/Resources/004_InventoryStore.sql')
-rw-r--r--OpenSim/Data/MSSQL/Resources/004_InventoryStore.sql52
1 files changed, 0 insertions, 52 deletions
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