Flatten migrations for MySQL.

Conflicts:
	OpenSim/Data/MySQL/Resources/RegionStore.migrations
	OpenSim/Data/MySQL/Resources/UserAccount.migrations
This commit is contained in:
Diva Canto
2016-02-20 19:08:02 -08:00
parent 367b7d7e5e
commit 134e94a7e9
13 changed files with 429 additions and 1511 deletions

View File

@@ -1,16 +1,17 @@
:VERSION 1 # -------------------------------
:VERSION 4 # -------------------------------
begin;
CREATE TABLE `auth` (
CREATE TABLE IF NOT EXISTS `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;
`passwordHash` char(32) NOT NULL DEFAULT '',
`passwordSalt` char(32) NOT NULL DEFAULT '',
`webLoginKey` varchar(255) NOT NULL DEFAULT '',
`accountType` varchar(32) NOT NULL DEFAULT 'UserAccount',
PRIMARY KEY (`UUID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `tokens` (
CREATE TABLE IF NOT EXISTS `tokens` (
`UUID` char(36) NOT NULL,
`token` varchar(255) NOT NULL,
`validity` datetime NOT NULL,
@@ -18,22 +19,6 @@ CREATE TABLE `tokens` (
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';
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
COMMIT;