From e4419c34c30e1cf6529ced125f0c05aed24644a4 Mon Sep 17 00:00:00 2001 From: AlexRa Date: Sat, 1 May 2010 17:43:10 +0300 Subject: Converted MySQL migration history to the new format Replaced all NNN_StoreName.sql migration resources with a more readable, single-file-per-store --- OpenSim/Data/MySQL/Resources/AuthStore.migrations | 39 +++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 OpenSim/Data/MySQL/Resources/AuthStore.migrations (limited to 'OpenSim/Data/MySQL/Resources/AuthStore.migrations') diff --git a/OpenSim/Data/MySQL/Resources/AuthStore.migrations b/OpenSim/Data/MySQL/Resources/AuthStore.migrations new file mode 100644 index 0000000..023c786 --- /dev/null +++ b/OpenSim/Data/MySQL/Resources/AuthStore.migrations @@ -0,0 +1,39 @@ +:VERSION 1 # ------------------------------- + +begin; + +CREATE TABLE `auth` ( + `UUID` char(36) NOT NULL, + `passwordHash` char(32) NOT NULL default '', + `passwordSalt` char(32) NOT NULL default '', + `webLoginKey` varchar(255) NOT NULL default '', + PRIMARY KEY (`UUID`) +) ENGINE=InnoDB; + +CREATE TABLE `tokens` ( + `UUID` char(36) NOT NULL, + `token` varchar(255) NOT NULL, + `validity` datetime NOT NULL, + UNIQUE KEY `uuid_token` (`UUID`,`token`), + KEY `UUID` (`UUID`), + KEY `token` (`token`), + KEY `validity` (`validity`) +) ENGINE=InnoDB; + +commit; + +:VERSION 2 # ------------------------------- + +BEGIN; + +INSERT INTO auth (UUID, passwordHash, passwordSalt, webLoginKey) SELECT `UUID` AS UUID, `passwordHash` AS passwordHash, `passwordSalt` AS passwordSalt, `webLoginKey` AS webLoginKey FROM users; + +COMMIT; + +:VERSION 3 # ------------------------------- + +BEGIN; + +ALTER TABLE `auth` ADD COLUMN `accountType` VARCHAR(32) NOT NULL DEFAULT 'UserAccount'; + +COMMIT; -- cgit v1.1