blob: ca6bdf55a5aa5563a714e49f8187d2d561c189fb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
:VERSION 1
BEGIN TRANSACTION;
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 '',
accountType VARCHAR(32) NOT NULL DEFAULT 'UserAccount',
PRIMARY KEY (`UUID`)
);
CREATE TABLE tokens (
UUID char(36) NOT NULL,
token varchar(255) NOT NULL,
validity datetime NOT NULL
);
COMMIT;
:VERSION 2
BEGIN TRANSACTION;
INSERT INTO auth (UUID, passwordHash, passwordSalt, webLoginKey) SELECT `UUID` AS UUID, `passwordHash` AS passwordHash, `passwordSalt` AS passwordSalt, `webLoginKey` AS webLoginKey FROM users;
COMMIT;
|