aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MSSQL/Resources/003_EstateStore.sql
blob: 7dd0ec83fbb10d1f51a0d4476e5d68c984779b32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
BEGIN TRANSACTION

CREATE TABLE dbo.Tmp_estateban
	(
	EstateID int NOT NULL,
	bannedUUID varchar(36) NOT NULL,
	bannedIp varchar(16) NULL,
	bannedIpHostMask varchar(16) NULL,
	bannedNameMask varchar(64) NULL
	)  ON [PRIMARY]

IF EXISTS(SELECT * FROM dbo.estateban)
	 EXEC('INSERT INTO dbo.Tmp_estateban (EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask)
		SELECT EstateID, bannedUUID, bannedIp, bannedIpHostMask, bannedNameMask FROM dbo.estateban')

DROP TABLE dbo.estateban

EXECUTE sp_rename N'dbo.Tmp_estateban', N'estateban', 'OBJECT' 

CREATE NONCLUSTERED INDEX IX_estateban ON dbo.estateban
	(
	EstateID
	) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]

COMMIT