Merged Trunk Revision 7203 to 0.6.0 stable branch , a MSSQL fix from Ruud Lathrop. Mantis #2591

0.6.0-stable
MW 2008-12-08 17:17:29 +00:00
parent 58f3fa71c2
commit 648de85737
2 changed files with 50 additions and 0 deletions

View File

@ -0,0 +1,25 @@
BEGIN TRANSACTION
ALTER TABLE dbo.estate_managers DROP CONSTRAINT PK_estate_managers
CREATE NONCLUSTERED INDEX IX_estate_managers ON dbo.estate_managers
(
EstateID
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
ALTER TABLE dbo.estate_groups DROP CONSTRAINT PK_estate_groups
CREATE NONCLUSTERED INDEX IX_estate_groups ON dbo.estate_groups
(
EstateID
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
ALTER TABLE dbo.estate_users DROP CONSTRAINT PK_estate_users
CREATE NONCLUSTERED INDEX IX_estate_users ON dbo.estate_users
(
EstateID
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
COMMIT

View File

@ -0,0 +1,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