From 213e372253eb8a59f0afb627e11b0a5b6f6b088f Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 20 May 2010 20:24:50 -0700 Subject: Cleaned up MySql migrations a bit more, got rid of all old-form migration files. Restored Presence table to its taboo-breaking form. --- OpenSim/Data/MySQL/Resources/001_GridUserStore.sql | 17 --------------- OpenSim/Data/MySQL/Resources/007_AssetStore.sql | 5 ----- OpenSim/Data/MySQL/Resources/033_RegionStore.sql | 3 --- .../Data/MySQL/Resources/GridUserStore.migrations | 19 ++++++++++++++++ OpenSim/Data/MySQL/Resources/Presence.migrations | 25 ++-------------------- .../Data/MySQL/Resources/RegionStore.migrations | 5 ++++- 6 files changed, 25 insertions(+), 49 deletions(-) delete mode 100644 OpenSim/Data/MySQL/Resources/001_GridUserStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/007_AssetStore.sql delete mode 100644 OpenSim/Data/MySQL/Resources/033_RegionStore.sql create mode 100644 OpenSim/Data/MySQL/Resources/GridUserStore.migrations (limited to 'OpenSim') diff --git a/OpenSim/Data/MySQL/Resources/001_GridUserStore.sql b/OpenSim/Data/MySQL/Resources/001_GridUserStore.sql deleted file mode 100644 index ce4ab96..0000000 --- a/OpenSim/Data/MySQL/Resources/001_GridUserStore.sql +++ /dev/null @@ -1,17 +0,0 @@ -BEGIN; - -CREATE TABLE `GridUser` ( - `UserID` VARCHAR(255) NOT NULL, - `HomeRegionID` CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', - `HomePosition` CHAR(64) NOT NULL DEFAULT '<0,0,0>', - `HomeLookAt` CHAR(64) NOT NULL DEFAULT '<0,0,0>', - `LastRegionID` CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', - `LastPosition` CHAR(64) NOT NULL DEFAULT '<0,0,0>', - `LastLookAt` CHAR(64) NOT NULL DEFAULT '<0,0,0>', - `Online` CHAR(5) NOT NULL DEFAULT 'false', - `Login` CHAR(16) NOT NULL DEFAULT '0', - `Logout` CHAR(16) NOT NULL DEFAULT '0', - PRIMARY KEY (`UserID`) -) ENGINE=InnoDB; - -COMMIT; diff --git a/OpenSim/Data/MySQL/Resources/007_AssetStore.sql b/OpenSim/Data/MySQL/Resources/007_AssetStore.sql deleted file mode 100644 index f06121a..0000000 --- a/OpenSim/Data/MySQL/Resources/007_AssetStore.sql +++ /dev/null @@ -1,5 +0,0 @@ -BEGIN; - -ALTER TABLE assets ADD COLUMN asset_flags INTEGER NOT NULL DEFAULT 0; - -COMMIT; diff --git a/OpenSim/Data/MySQL/Resources/033_RegionStore.sql b/OpenSim/Data/MySQL/Resources/033_RegionStore.sql deleted file mode 100644 index 2832b41..0000000 --- a/OpenSim/Data/MySQL/Resources/033_RegionStore.sql +++ /dev/null @@ -1,3 +0,0 @@ -BEGIN; -ALTER TABLE regionsettings ADD map_tile_ID CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000'; -COMMIT; diff --git a/OpenSim/Data/MySQL/Resources/GridUserStore.migrations b/OpenSim/Data/MySQL/Resources/GridUserStore.migrations new file mode 100644 index 0000000..32b85ee --- /dev/null +++ b/OpenSim/Data/MySQL/Resources/GridUserStore.migrations @@ -0,0 +1,19 @@ +:VERSION 1 # -------------------------- + +BEGIN; + +CREATE TABLE `GridUser` ( + `UserID` VARCHAR(255) NOT NULL, + `HomeRegionID` CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', + `HomePosition` CHAR(64) NOT NULL DEFAULT '<0,0,0>', + `HomeLookAt` CHAR(64) NOT NULL DEFAULT '<0,0,0>', + `LastRegionID` CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', + `LastPosition` CHAR(64) NOT NULL DEFAULT '<0,0,0>', + `LastLookAt` CHAR(64) NOT NULL DEFAULT '<0,0,0>', + `Online` CHAR(5) NOT NULL DEFAULT 'false', + `Login` CHAR(16) NOT NULL DEFAULT '0', + `Logout` CHAR(16) NOT NULL DEFAULT '0', + PRIMARY KEY (`UserID`) +) ENGINE=InnoDB; + +COMMIT; diff --git a/OpenSim/Data/MySQL/Resources/Presence.migrations b/OpenSim/Data/MySQL/Resources/Presence.migrations index d513024..91f7de5 100644 --- a/OpenSim/Data/MySQL/Resources/Presence.migrations +++ b/OpenSim/Data/MySQL/Resources/Presence.migrations @@ -4,32 +4,11 @@ BEGIN; CREATE TABLE `Presence` ( `UserID` VARCHAR(255) NOT NULL, - `RegionID` CHAR(36) NOT NULL, + `RegionID` CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', `SessionID` CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', - `SecureSessionID` CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', - `Online` CHAR(5) NOT NULL DEFAULT 'false', - `Login` CHAR(16) NOT NULL DEFAULT '0', - `Logout` CHAR(16) NOT NULL DEFAULT '0', - `Position` CHAR(64) NOT NULL DEFAULT '<0,0,0>', - `LookAt` CHAR(64) NOT NULL DEFAULT '<0,0,0>' + `SecureSessionID` CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000' ) ENGINE=InnoDB; -COMMIT; - -:VERSION 2 # -------------------------- - -BEGIN; - -ALTER TABLE Presence ADD COLUMN `HomeRegionID` CHAR(36) NOT NULL; -ALTER TABLE Presence ADD COLUMN `HomePosition` CHAR(64) NOT NULL DEFAULT '<0,0,0>'; -ALTER TABLE Presence ADD COLUMN `HomeLookAt` CHAR(64) NOT NULL DEFAULT '<0,0,0>'; - -COMMIT; - -:VERSION 3 # -------------------------- - -BEGIN; - CREATE UNIQUE INDEX SessionID ON Presence(SessionID); CREATE INDEX UserID ON Presence(UserID); diff --git a/OpenSim/Data/MySQL/Resources/RegionStore.migrations b/OpenSim/Data/MySQL/Resources/RegionStore.migrations index 3dab67e..baeeedd 100644 --- a/OpenSim/Data/MySQL/Resources/RegionStore.migrations +++ b/OpenSim/Data/MySQL/Resources/RegionStore.migrations @@ -801,6 +801,9 @@ BEGIN; ALTER TABLE estate_settings AUTO_INCREMENT = 100; COMMIT; +:VERSION 33 #--------------------- - +BEGIN; +ALTER TABLE regionsettings ADD map_tile_ID CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000'; +COMMIT; -- cgit v1.1