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
|
:VERSION 1 # -----------------------------
BEGIN;
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for agents
-- ----------------------------
CREATE TABLE `agents` (
`UUID` varchar(36) NOT NULL,
`sessionID` varchar(36) NOT NULL,
`secureSessionID` varchar(36) NOT NULL,
`agentIP` varchar(16) NOT NULL,
`agentPort` int(11) NOT NULL,
`agentOnline` tinyint(4) NOT NULL,
`loginTime` int(11) NOT NULL,
`logoutTime` int(11) NOT NULL,
`currentRegion` varchar(36) NOT NULL,
`currentHandle` bigint(20) unsigned NOT NULL,
`currentPos` varchar(64) NOT NULL,
PRIMARY KEY (`UUID`),
UNIQUE KEY `session` (`sessionID`),
UNIQUE KEY `ssession` (`secureSessionID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Create schema avatar_appearance
--
CREATE TABLE `avatarappearance` (
Owner char(36) NOT NULL,
Serial int(10) unsigned NOT NULL,
Visual_Params blob NOT NULL,
Texture blob NOT NULL,
Avatar_Height float NOT NULL,
Body_Item char(36) NOT NULL,
Body_Asset char(36) NOT NULL,
Skin_Item char(36) NOT NULL,
Skin_Asset char(36) NOT NULL,
Hair_Item char(36) NOT NULL,
Hair_Asset char(36) NOT NULL,
Eyes_Item char(36) NOT NULL,
Eyes_Asset char(36) NOT NULL,
Shirt_Item char(36) NOT NULL,
Shirt_Asset char(36) NOT NULL,
Pants_Item char(36) NOT NULL,
Pants_Asset char(36) NOT NULL,
Shoes_Item char(36) NOT NULL,
Shoes_Asset char(36) NOT NULL,
Socks_Item char(36) NOT NULL,
Socks_Asset char(36) NOT NULL,
Jacket_Item char(36) NOT NULL,
Jacket_Asset char(36) NOT NULL,
Gloves_Item char(36) NOT NULL,
Gloves_Asset char(36) NOT NULL,
Undershirt_Item char(36) NOT NULL,
Undershirt_Asset char(36) NOT NULL,
Underpants_Item char(36) NOT NULL,
Underpants_Asset char(36) NOT NULL,
Skirt_Item char(36) NOT NULL,
Skirt_Asset char(36) NOT NULL,
PRIMARY KEY (`Owner`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for users
-- ----------------------------
CREATE TABLE `userfriends` (
`ownerID` VARCHAR(37) NOT NULL,
`friendID` VARCHAR(37) NOT NULL,
`friendPerms` INT NOT NULL,
`datetimestamp` INT NOT NULL,
UNIQUE KEY (`ownerID`, `friendID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for users
-- ----------------------------
CREATE TABLE `users` (
`UUID` varchar(36) NOT NULL default '',
`username` varchar(32) NOT NULL,
`lastname` varchar(32) NOT NULL,
`passwordHash` varchar(32) NOT NULL,
`passwordSalt` varchar(32) NOT NULL,
`homeRegion` bigint(20) unsigned default NULL,
`homeLocationX` float default NULL,
`homeLocationY` float default NULL,
`homeLocationZ` float default NULL,
`homeLookAtX` float default NULL,
`homeLookAtY` float default NULL,
`homeLookAtZ` float default NULL,
`created` int(11) NOT NULL,
`lastLogin` int(11) NOT NULL,
`userInventoryURI` varchar(255) default NULL,
`userAssetURI` varchar(255) default NULL,
`profileCanDoMask` int(10) unsigned default NULL,
`profileWantDoMask` int(10) unsigned default NULL,
`profileAboutText` text,
`profileFirstText` text,
`profileImage` varchar(36) default NULL,
`profileFirstImage` varchar(36) default NULL,
`webLoginKey` varchar(36) default NULL,
PRIMARY KEY (`UUID`),
UNIQUE KEY `usernames` (`username`,`lastname`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records
-- ----------------------------
COMMIT;
:VERSION 2 # -----------------------------
BEGIN;
ALTER TABLE users add homeRegionID char(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, `attachpoint` int(11) NOT NULL, `item` char(36) NOT NULL, `asset` char(36) NOT NULL) ENGINE=InnoDB;
COMMIT;
:VERSION 6 # -----------------------------
BEGIN;
ALTER TABLE agents add currentLookAt varchar(36) not null default '';
COMMIT;
:VERSION 7 # -----------------------------
BEGIN;
ALTER TABLE users add email varchar(250);
COMMIT;
:VERSION 8 # -----------------------------
BEGIN;
ALTER TABLE users add scopeID char(36) not null default '00000000-0000-0000-0000-000000000000';
COMMIT;
|