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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
|
:VERSION 1
BEGIN TRANSACTION;
-- users table
CREATE TABLE users(
UUID varchar(255) primary key,
username varchar(255),
surname varchar(255),
passwordHash varchar(255),
passwordSalt varchar(255),
homeRegionX integer,
homeRegionY integer,
homeLocationX float,
homeLocationY float,
homeLocationZ float,
homeLookAtX float,
homeLookAtY float,
homeLookAtZ float,
created integer,
lastLogin integer,
rootInventoryFolderID varchar(255),
userInventoryURI varchar(255),
userAssetURI varchar(255),
profileCanDoMask integer,
profileWantDoMask integer,
profileAboutText varchar(255),
profileFirstText varchar(255),
profileImage varchar(255),
profileFirstImage varchar(255),
webLoginKey text default '00000000-0000-0000-0000-000000000000');
-- friends table
CREATE TABLE userfriends(
ownerID varchar(255),
friendID varchar(255),
friendPerms integer,
ownerPerms integer,
datetimestamp integer);
COMMIT;
:VERSION 2
BEGIN;
ALTER TABLE users add homeRegionID varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000';
COMMIT;
:VERSION 3
BEGIN;
ALTER TABLE users add userFlags integer NOT NULL default 0;
ALTER TABLE users add godLevel integer NOT NULL default 0;
COMMIT;
:VERSION 4
BEGIN;
ALTER TABLE users add customType varchar(32) not null default '';
ALTER TABLE users add partner char(36) not null default '00000000-0000-0000-0000-000000000000';
COMMIT;
:VERSION 5
BEGIN;
CREATE TABLE `avatarattachments` (`UUID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', `attachpoint` int(11) NOT NULL DEFAULT 0, `item` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', `asset` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000');
COMMIT;
:VERSION 6
BEGIN TRANSACTION;
-- usersagents table
CREATE TABLE IF NOT EXISTS useragents(
UUID varchar(255) primary key,
agentIP varchar(255),
agentPort integer,
agentOnline boolean,
sessionID varchar(255),
secureSessionID varchar(255),
regionID varchar(255),
loginTime integer,
logoutTime integer,
currentRegion varchar(255),
currentHandle varchar(255),
currentPosX float,
currentPosY float,
currentPosZ float);
COMMIT;
:VERSION 7
BEGIN TRANSACTION;
ALTER TABLE useragents add currentLookAtX float not null default 128;
ALTER TABLE useragents add currentLookAtY float not null default 128;
ALTER TABLE useragents add currentLookAtZ float not null default 70;
COMMIT;
:VERSION 8
BEGIN TRANSACTION;
ALTER TABLE users add email varchar(250);
COMMIT;
:VERSION 9
BEGIN;
update users
set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12)
where UUID not like '%-%';
update useragents
set UUID = substr(UUID, 1, 8) || "-" || substr(UUID, 9, 4) || "-" || substr(UUID, 13, 4) || "-" || substr(UUID, 17, 4) || "-" || substr(UUID, 21, 12)
where UUID not like '%-%';
COMMIT;
:VERSION 10
BEGIN TRANSACTION;
CREATE TABLE IF NOT EXISTS avatarappearance(
Owner varchar(36) NOT NULL primary key,
BodyItem varchar(36) DEFAULT NULL,
BodyAsset varchar(36) DEFAULT NULL,
SkinItem varchar(36) DEFAULT NULL,
SkinAsset varchar(36) DEFAULT NULL,
HairItem varchar(36) DEFAULT NULL,
HairAsset varchar(36) DEFAULT NULL,
EyesItem varchar(36) DEFAULT NULL,
EyesAsset varchar(36) DEFAULT NULL,
ShirtItem varchar(36) DEFAULT NULL,
ShirtAsset varchar(36) DEFAULT NULL,
PantsItem varchar(36) DEFAULT NULL,
PantsAsset varchar(36) DEFAULT NULL,
ShoesItem varchar(36) DEFAULT NULL,
ShoesAsset varchar(36) DEFAULT NULL,
SocksItem varchar(36) DEFAULT NULL,
SocksAsset varchar(36) DEFAULT NULL,
JacketItem varchar(36) DEFAULT NULL,
JacketAsset varchar(36) DEFAULT NULL,
GlovesItem varchar(36) DEFAULT NULL,
GlovesAsset varchar(36) DEFAULT NULL,
UnderShirtItem varchar(36) DEFAULT NULL,
UnderShirtAsset varchar(36) DEFAULT NULL,
UnderPantsItem varchar(36) DEFAULT NULL,
UnderPantsAsset varchar(36) DEFAULT NULL,
SkirtItem varchar(36) DEFAULT NULL,
SkirtAsset varchar(36) DEFAULT NULL,
Texture blob,
VisualParams blob,
Serial int DEFAULT NULL,
AvatarHeight float DEFAULT NULL
);
COMMIT;
|