mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 17:55:48 +08:00
MS SQL migrations converted to the new format
This commit is contained in:
28
OpenSim/Data/MSSQL/Resources/AuthStore.migrations
Normal file
28
OpenSim/Data/MSSQL/Resources/AuthStore.migrations
Normal file
@@ -0,0 +1,28 @@
|
||||
:VERSION 1
|
||||
|
||||
BEGIN TRANSACTION
|
||||
|
||||
CREATE TABLE [auth] (
|
||||
[uuid] [uniqueidentifier] NOT NULL default '00000000-0000-0000-0000-000000000000',
|
||||
[passwordHash] [varchar](32) NOT NULL,
|
||||
[passwordSalt] [varchar](32) NOT NULL,
|
||||
[webLoginKey] [varchar](255) NOT NULL,
|
||||
[accountType] VARCHAR(32) NOT NULL DEFAULT 'UserAccount',
|
||||
) ON [PRIMARY]
|
||||
|
||||
CREATE TABLE [tokens] (
|
||||
[uuid] [uniqueidentifier] NOT NULL default '00000000-0000-0000-0000-000000000000',
|
||||
[token] [varchar](255) NOT NULL,
|
||||
[validity] [datetime] NOT NULL )
|
||||
ON [PRIMARY]
|
||||
|
||||
COMMIT
|
||||
|
||||
:VERSION 2
|
||||
|
||||
BEGIN TRANSACTION
|
||||
|
||||
INSERT INTO auth (UUID, passwordHash, passwordSalt, webLoginKey, accountType) SELECT [UUID] AS UUID, [passwordHash] AS passwordHash, [passwordSalt] AS passwordSalt, [webLoginKey] AS webLoginKey, 'UserAccount' as [accountType] FROM users;
|
||||
|
||||
|
||||
COMMIT
|
||||
Reference in New Issue
Block a user