mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 09:45:47 +08:00
Migrations for SQLite converted to new format
This commit is contained in:
29
OpenSim/Data/SQLite/Resources/AuthStore.migrations
Normal file
29
OpenSim/Data/SQLite/Resources/AuthStore.migrations
Normal file
@@ -0,0 +1,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;
|
||||
|
||||
Reference in New Issue
Block a user