diff options
Diffstat (limited to 'OpenSim/Data/MSSQL/Resources/FriendsStore.migrations')
-rw-r--r-- | OpenSim/Data/MSSQL/Resources/FriendsStore.migrations | 50 |
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 | |||
3 | BEGIN TRANSACTION | ||
4 | |||
5 | CREATE 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 | |||
12 | COMMIT | ||
13 | |||
14 | :VERSION 2 | ||
15 | |||
16 | BEGIN TRANSACTION | ||
17 | |||
18 | IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[userfriends]') AND type in (N'U')) | ||
19 | INSERT INTO Friends (PrincipalID, Friend, Flags, Offered) | ||
20 | SELECT [ownerID], [friendID], [friendPerms], 0 FROM userfriends; | ||
21 | |||
22 | COMMIT | ||
23 | |||
24 | :VERSION 3 | ||
25 | |||
26 | BEGIN TRANSACTION | ||
27 | |||
28 | CREATE 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) | ||
33 | ON [PRIMARY] | ||
34 | |||
35 | |||
36 | IF 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 | |||
40 | DROP TABLE dbo.Friends | ||
41 | |||
42 | EXECUTE sp_rename N'dbo.Tmp_Friends', N'Friends', 'OBJECT' | ||
43 | |||
44 | ALTER 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 | |||
50 | COMMIT \ No newline at end of file | ||