diff options
author | Chris Hart | 2011-09-13 16:55:30 -0400 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-09-16 19:09:46 +0100 |
commit | d4043c084a86da5f462356ec5c65eab2b861564d (patch) | |
tree | 115685d90fd7c12ce5d7191f0106008bd2f9a1c3 /OpenSim/Data/MSSQL/Resources/FriendsStore.migrations | |
parent | Reattaching a region was failing if the estate name had not changed (issue 50... (diff) | |
download | opensim-SC_OLD-d4043c084a86da5f462356ec5c65eab2b861564d.zip opensim-SC_OLD-d4043c084a86da5f462356ec5c65eab2b861564d.tar.gz opensim-SC_OLD-d4043c084a86da5f462356ec5c65eab2b861564d.tar.bz2 opensim-SC_OLD-d4043c084a86da5f462356ec5c65eab2b861564d.tar.xz |
MSSQL Bug fix in user account retrieval, plus migrations for FriendsStore and InventoryStore
Diffstat (limited to 'OpenSim/Data/MSSQL/Resources/FriendsStore.migrations')
-rw-r--r-- | OpenSim/Data/MSSQL/Resources/FriendsStore.migrations | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/OpenSim/Data/MSSQL/Resources/FriendsStore.migrations b/OpenSim/Data/MSSQL/Resources/FriendsStore.migrations index 4d8ab0f..cc94c4e 100644 --- a/OpenSim/Data/MSSQL/Resources/FriendsStore.migrations +++ b/OpenSim/Data/MSSQL/Resources/FriendsStore.migrations | |||
@@ -19,4 +19,32 @@ IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[userf | |||
19 | INSERT INTO Friends (PrincipalID, Friend, Flags, Offered) | 19 | INSERT INTO Friends (PrincipalID, Friend, Flags, Offered) |
20 | SELECT [ownerID], [friendID], [friendPerms], 0 FROM userfriends; | 20 | SELECT [ownerID], [friendID], [friendPerms], 0 FROM userfriends; |
21 | 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 | |||
22 | COMMIT \ No newline at end of file | 50 | COMMIT \ No newline at end of file |