aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MSSQL/Resources/FriendsStore.migrations
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/MSSQL/Resources/FriendsStore.migrations')
-rw-r--r--OpenSim/Data/MSSQL/Resources/FriendsStore.migrations50
1 files changed, 0 insertions, 50 deletions
diff --git a/OpenSim/Data/MSSQL/Resources/FriendsStore.migrations b/OpenSim/Data/MSSQL/Resources/FriendsStore.migrations
deleted file mode 100644
index cc94c4e..0000000
--- a/OpenSim/Data/MSSQL/Resources/FriendsStore.migrations
+++ /dev/null
@@ -1,50 +0,0 @@
1:VERSION 1
2
3BEGIN TRANSACTION
4
5CREATE TABLE [Friends] (
6[PrincipalID] uniqueidentifier NOT NULL,
7[Friend] varchar(255) NOT NULL,
8[Flags] char(16) NOT NULL DEFAULT '0',
9[Offered] varchar(32) NOT NULL DEFAULT 0)
10 ON [PRIMARY]
11
12COMMIT
13
14:VERSION 2
15
16BEGIN TRANSACTION
17
18IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[userfriends]') AND type in (N'U'))
19INSERT INTO Friends (PrincipalID, Friend, Flags, Offered)
20SELECT [ownerID], [friendID], [friendPerms], 0 FROM userfriends;
21
22COMMIT
23
24:VERSION 3
25
26BEGIN TRANSACTION
27
28CREATE TABLE [Tmp_Friends]
29 ([PrincipalID] varchar(255) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
30[Friend] varchar(255) NOT NULL,
31[Flags] char(16) NOT NULL DEFAULT '0',
32[Offered] varchar(32) NOT NULL DEFAULT 0)
33ON [PRIMARY]
34
35
36IF EXISTS(SELECT * FROM dbo.Friends)
37 EXEC('INSERT INTO dbo.Tmp_Friends (PrincipalID, Friend, Flags, Offered)
38 SELECT CONVERT(varchar(255),PrincipalID), Friend, Flags, Offered FROM dbo.Friends WITH (HOLDLOCK TABLOCKX)')
39
40DROP TABLE dbo.Friends
41
42EXECUTE sp_rename N'dbo.Tmp_Friends', N'Friends', 'OBJECT'
43
44ALTER TABLE dbo.Friends ADD
45 PRIMARY KEY CLUSTERED
46(
47 [PrincipalID] ASC, [Friend] ASC
48)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
49
50COMMIT \ No newline at end of file