From 464c3c709102954e502a5d3868bac615c73c64b4 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Mon, 29 Sep 2008 20:26:34 +0000 Subject: [PATCH] * Add missing mssql migration files from http://opensimulator.org/mantis/view.php?id=2295 * Sorry about that --- OpenSim/Data/MSSQL/Resources/001_LogStore.sql | 17 +++++++ .../Data/MSSQL/Resources/002_GridStore.sql | 49 +++++++++++++++++++ .../Data/MSSQL/Resources/007_RegionStore.sql | 10 ++++ 3 files changed, 76 insertions(+) create mode 100644 OpenSim/Data/MSSQL/Resources/001_LogStore.sql create mode 100644 OpenSim/Data/MSSQL/Resources/002_GridStore.sql create mode 100644 OpenSim/Data/MSSQL/Resources/007_RegionStore.sql diff --git a/OpenSim/Data/MSSQL/Resources/001_LogStore.sql b/OpenSim/Data/MSSQL/Resources/001_LogStore.sql new file mode 100644 index 0000000000..9ece6274dd --- /dev/null +++ b/OpenSim/Data/MSSQL/Resources/001_LogStore.sql @@ -0,0 +1,17 @@ +BEGIN TRANSACTION + +CREATE TABLE [logs] ( + [logID] [int] NOT NULL, + [target] [varchar](36) default NULL, + [server] [varchar](64) default NULL, + [method] [varchar](64) default NULL, + [arguments] [varchar](255) default NULL, + [priority] [int] default NULL, + [message] [ntext], + PRIMARY KEY CLUSTERED +( + [logID] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + +COMMIT diff --git a/OpenSim/Data/MSSQL/Resources/002_GridStore.sql b/OpenSim/Data/MSSQL/Resources/002_GridStore.sql new file mode 100644 index 0000000000..f5901cb527 --- /dev/null +++ b/OpenSim/Data/MSSQL/Resources/002_GridStore.sql @@ -0,0 +1,49 @@ +BEGIN TRANSACTION + +CREATE TABLE Tmp_regions + ( + uuid varchar(36) COLLATE Latin1_General_CI_AS NOT NULL, + regionHandle bigint NULL, + regionName varchar(20) NULL, + regionRecvKey varchar(128) NULL, + regionSendKey varchar(128) NULL, + regionSecret varchar(128) NULL, + regionDataURI varchar(128) NULL, + serverIP varchar(64) NULL, + serverPort int NULL, + serverURI varchar(255) NULL, + locX int NULL, + locY int NULL, + locZ int NULL, + eastOverrideHandle bigint NULL, + westOverrideHandle bigint NULL, + southOverrideHandle bigint NULL, + northOverrideHandle bigint NULL, + regionAssetURI varchar(255) NULL, + regionAssetRecvKey varchar(128) NULL, + regionAssetSendKey varchar(128) NULL, + regionUserURI varchar(255) NULL, + regionUserRecvKey varchar(128) NULL, + regionUserSendKey varchar(128) NULL, + regionMapTexture varchar(36) NULL, + serverHttpPort int NULL, + serverRemotingPort int NULL, + owner_uuid varchar(36) NULL, + originUUID varchar(36) NOT NULL DEFAULT ('00000000-0000-0000-0000-000000000000') + ) ON [PRIMARY] + +IF EXISTS(SELECT * FROM regions) + EXEC('INSERT INTO Tmp_regions (uuid, regionHandle, regionName, regionRecvKey, regionSendKey, regionSecret, regionDataURI, serverIP, serverPort, serverURI, locX, locY, locZ, eastOverrideHandle, westOverrideHandle, southOverrideHandle, northOverrideHandle, regionAssetURI, regionAssetRecvKey, regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey, regionMapTexture, serverHttpPort, serverRemotingPort, owner_uuid) + SELECT CONVERT(varchar(36), uuid), CONVERT(bigint, regionHandle), CONVERT(varchar(20), regionName), CONVERT(varchar(128), regionRecvKey), CONVERT(varchar(128), regionSendKey), CONVERT(varchar(128), regionSecret), CONVERT(varchar(128), regionDataURI), CONVERT(varchar(64), serverIP), CONVERT(int, serverPort), serverURI, CONVERT(int, locX), CONVERT(int, locY), CONVERT(int, locZ), CONVERT(bigint, eastOverrideHandle), CONVERT(bigint, westOverrideHandle), CONVERT(bigint, southOverrideHandle), CONVERT(bigint, northOverrideHandle), regionAssetURI, CONVERT(varchar(128), regionAssetRecvKey), CONVERT(varchar(128), regionAssetSendKey), regionUserURI, CONVERT(varchar(128), regionUserRecvKey), CONVERT(varchar(128), regionUserSendKey), CONVERT(varchar(36), regionMapTexture), CONVERT(int, serverHttpPort), CONVERT(int, serverRemotingPort), owner_uuid FROM regions') + +DROP TABLE regions + +EXECUTE sp_rename N'Tmp_regions', N'regions', 'OBJECT' + +ALTER TABLE regions ADD CONSTRAINT + PK__regions__uuid PRIMARY KEY CLUSTERED + ( + uuid + ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + +COMMIT \ No newline at end of file diff --git a/OpenSim/Data/MSSQL/Resources/007_RegionStore.sql b/OpenSim/Data/MSSQL/Resources/007_RegionStore.sql new file mode 100644 index 0000000000..684f937334 --- /dev/null +++ b/OpenSim/Data/MSSQL/Resources/007_RegionStore.sql @@ -0,0 +1,10 @@ +BEGIN TRANSACTION + +ALTER TABLE prims ADD ColorR int not null default 0; +ALTER TABLE prims ADD ColorG int not null default 0; +ALTER TABLE prims ADD ColorB int not null default 0; +ALTER TABLE prims ADD ColorA int not null default 0; +ALTER TABLE prims ADD ParticleSystem IMAGE; +ALTER TABLE prims ADD ClickAction tinyint NOT NULL default 0; + +COMMIT