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