aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MSSQL/Resources/FriendsStore.migrations
blob: 4d8ab0f622578e6623622524a8bc9890be69dce6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
:VERSION 1

BEGIN TRANSACTION

CREATE TABLE [Friends] (
[PrincipalID] uniqueidentifier NOT NULL, 
[Friend] varchar(255) NOT NULL, 
[Flags] char(16) NOT NULL DEFAULT '0',
[Offered] varchar(32) NOT NULL DEFAULT 0)
 ON [PRIMARY]

COMMIT

:VERSION 2

BEGIN TRANSACTION

IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[userfriends]') AND type in (N'U'))
INSERT INTO Friends (PrincipalID, Friend, Flags, Offered) 
SELECT [ownerID], [friendID], [friendPerms], 0 FROM userfriends;

COMMIT