diff options
Diffstat (limited to 'OpenSim/Data/MySQL/Resources/AuthStore.migrations')
-rw-r--r-- | OpenSim/Data/MySQL/Resources/AuthStore.migrations | 37 |
1 files changed, 11 insertions, 26 deletions
diff --git a/OpenSim/Data/MySQL/Resources/AuthStore.migrations b/OpenSim/Data/MySQL/Resources/AuthStore.migrations index 9450940..f00979f 100644 --- a/OpenSim/Data/MySQL/Resources/AuthStore.migrations +++ b/OpenSim/Data/MySQL/Resources/AuthStore.migrations | |||
@@ -1,16 +1,17 @@ | |||
1 | :VERSION 1 # ------------------------------- | 1 | :VERSION 4 # ------------------------------- |
2 | 2 | ||
3 | begin; | 3 | begin; |
4 | 4 | ||
5 | CREATE TABLE `auth` ( | 5 | CREATE TABLE IF NOT EXISTS `auth` ( |
6 | `UUID` char(36) NOT NULL, | 6 | `UUID` char(36) NOT NULL, |
7 | `passwordHash` char(32) NOT NULL default '', | 7 | `passwordHash` char(32) NOT NULL DEFAULT '', |
8 | `passwordSalt` char(32) NOT NULL default '', | 8 | `passwordSalt` char(32) NOT NULL DEFAULT '', |
9 | `webLoginKey` varchar(255) NOT NULL default '', | 9 | `webLoginKey` varchar(255) NOT NULL DEFAULT '', |
10 | PRIMARY KEY (`UUID`) | 10 | `accountType` varchar(32) NOT NULL DEFAULT 'UserAccount', |
11 | ) ENGINE=MyISAM; | 11 | PRIMARY KEY (`UUID`) |
12 | 12 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; | |
13 | CREATE TABLE `tokens` ( | 13 | |
14 | CREATE TABLE IF NOT EXISTS `tokens` ( | ||
14 | `UUID` char(36) NOT NULL, | 15 | `UUID` char(36) NOT NULL, |
15 | `token` varchar(255) NOT NULL, | 16 | `token` varchar(255) NOT NULL, |
16 | `validity` datetime NOT NULL, | 17 | `validity` datetime NOT NULL, |
@@ -18,22 +19,6 @@ CREATE TABLE `tokens` ( | |||
18 | KEY `UUID` (`UUID`), | 19 | KEY `UUID` (`UUID`), |
19 | KEY `token` (`token`), | 20 | KEY `token` (`token`), |
20 | KEY `validity` (`validity`) | 21 | KEY `validity` (`validity`) |
21 | ) ENGINE=MyISAM; | 22 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
22 | |||
23 | commit; | ||
24 | |||
25 | :VERSION 2 # ------------------------------- | ||
26 | |||
27 | BEGIN; | ||
28 | |||
29 | INSERT INTO auth (UUID, passwordHash, passwordSalt, webLoginKey) SELECT `UUID` AS UUID, `passwordHash` AS passwordHash, `passwordSalt` AS passwordSalt, `webLoginKey` AS webLoginKey FROM users; | ||
30 | |||
31 | COMMIT; | ||
32 | |||
33 | :VERSION 3 # ------------------------------- | ||
34 | |||
35 | BEGIN; | ||
36 | |||
37 | ALTER TABLE `auth` ADD COLUMN `accountType` VARCHAR(32) NOT NULL DEFAULT 'UserAccount'; | ||
38 | 23 | ||
39 | COMMIT; | 24 | COMMIT; |