Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 332 |
|
0.00% |
0 / 3 |
CRAP | |
0.00% |
0 / 1 |
default_data_type_ids | |
0.00% |
0 / 332 |
|
0.00% |
0 / 3 |
12 | |
0.00% |
0 / 1 |
depends_on | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
2 | |||
update_schema | |
0.00% |
0 / 164 |
|
0.00% |
0 / 1 |
2 | |||
revert_schema | |
0.00% |
0 / 164 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | /** |
3 | * |
4 | * This file is part of the phpBB Forum Software package. |
5 | * |
6 | * @copyright (c) phpBB Limited <https://www.phpbb.com> |
7 | * @license GNU General Public License, version 2 (GPL-2.0) |
8 | * |
9 | * For full copyright and license information, please see |
10 | * the docs/CREDITS.txt file. |
11 | * |
12 | */ |
13 | |
14 | namespace phpbb\db\migration\data\v320; |
15 | |
16 | class default_data_type_ids extends \phpbb\db\migration\migration |
17 | { |
18 | public static function depends_on() |
19 | { |
20 | return array( |
21 | '\phpbb\db\migration\data\v320\v320a2', |
22 | '\phpbb\db\migration\data\v320\oauth_states', |
23 | ); |
24 | } |
25 | |
26 | public function update_schema() |
27 | { |
28 | return array( |
29 | 'change_columns' => array( |
30 | $this->table_prefix . 'acl_users' => array( |
31 | 'user_id' => array('ULINT', 0), |
32 | ), |
33 | $this->table_prefix . 'attachments' => array( |
34 | 'attach_id' => array('ULINT', null, 'auto_increment'), |
35 | 'post_msg_id' => array('ULINT', 0), |
36 | 'poster_id' => array('ULINT', 0), |
37 | 'topic_id' => array('ULINT', 0), |
38 | ), |
39 | $this->table_prefix . 'banlist' => array( |
40 | 'ban_id' => array('ULINT', null, 'auto_increment'), |
41 | 'ban_userid' => array('ULINT', 0), |
42 | ), |
43 | $this->table_prefix . 'bookmarks' => array( |
44 | 'topic_id' => array('ULINT', 0), |
45 | 'user_id' => array('ULINT', 0), |
46 | ), |
47 | $this->table_prefix . 'bots' => array( |
48 | 'bot_id' => array('ULINT', null, 'auto_increment'), |
49 | 'user_id' => array('ULINT', 0), |
50 | ), |
51 | $this->table_prefix . 'drafts' => array( |
52 | 'draft_id' => array('ULINT', null, 'auto_increment'), |
53 | 'user_id' => array('ULINT', 0), |
54 | 'topic_id' => array('ULINT', 0), |
55 | ), |
56 | $this->table_prefix . 'forums' => array( |
57 | 'forum_last_post_id' => array('ULINT', 0), |
58 | 'forum_last_poster_id' => array('ULINT', 0), |
59 | ), |
60 | $this->table_prefix . 'forums_access' => array( |
61 | 'user_id' => array('ULINT', 0), |
62 | ), |
63 | $this->table_prefix . 'forums_track' => array( |
64 | 'user_id' => array('ULINT', 0), |
65 | ), |
66 | $this->table_prefix . 'forums_watch' => array( |
67 | 'user_id' => array('ULINT', 0), |
68 | ), |
69 | $this->table_prefix . 'log' => array( |
70 | 'log_id' => array('ULINT', null, 'auto_increment'), |
71 | 'post_id' => array('ULINT', 0), |
72 | 'reportee_id' => array('ULINT', 0), |
73 | 'user_id' => array('ULINT', 0), |
74 | 'topic_id' => array('ULINT', 0), |
75 | ), |
76 | $this->table_prefix . 'login_attempts' => array( |
77 | 'user_id' => array('ULINT', 0), |
78 | ), |
79 | $this->table_prefix . 'moderator_cache' => array( |
80 | 'user_id' => array('ULINT', 0), |
81 | ), |
82 | $this->table_prefix . 'notifications' => array( |
83 | 'user_id' => array('ULINT', 0), |
84 | ), |
85 | $this->table_prefix . 'oauth_accounts' => array( |
86 | 'user_id' => array('ULINT', 0), |
87 | ), |
88 | $this->table_prefix . 'oauth_states' => array( |
89 | 'user_id' => array('ULINT', 0), |
90 | ), |
91 | $this->table_prefix . 'oauth_tokens' => array( |
92 | 'user_id' => array('ULINT', 0), |
93 | ), |
94 | $this->table_prefix . 'poll_options' => array( |
95 | 'topic_id' => array('ULINT', 0), |
96 | ), |
97 | $this->table_prefix . 'poll_votes' => array( |
98 | 'topic_id' => array('ULINT', 0), |
99 | 'vote_user_id' => array('ULINT', 0), |
100 | ), |
101 | $this->table_prefix . 'posts' => array( |
102 | 'post_id' => array('ULINT', null, 'auto_increment'), |
103 | 'poster_id' => array('ULINT', 0), |
104 | 'post_delete_user' => array('ULINT', 0), |
105 | 'post_edit_user' => array('ULINT', 0), |
106 | 'topic_id' => array('ULINT', 0), |
107 | ), |
108 | $this->table_prefix . 'privmsgs' => array( |
109 | 'author_id' => array('ULINT', 0), |
110 | 'message_edit_user' => array('ULINT', 0), |
111 | 'msg_id' => array('ULINT', null, 'auto_increment'), |
112 | ), |
113 | $this->table_prefix . 'privmsgs_folder' => array( |
114 | 'user_id' => array('ULINT', 0), |
115 | ), |
116 | $this->table_prefix . 'privmsgs_rules' => array( |
117 | 'rule_user_id' => array('ULINT', 0), |
118 | 'user_id' => array('ULINT', 0), |
119 | ), |
120 | $this->table_prefix . 'privmsgs_to' => array( |
121 | 'author_id' => array('ULINT', 0), |
122 | 'msg_id' => array('ULINT', 0), |
123 | 'user_id' => array('ULINT', 0), |
124 | ), |
125 | $this->table_prefix . 'profile_fields_data' => array( |
126 | 'user_id' => array('ULINT', 0), |
127 | ), |
128 | $this->table_prefix . 'reports' => array( |
129 | 'report_id' => array('ULINT', 0), |
130 | 'pm_id' => array('ULINT', 0), |
131 | 'post_id' => array('ULINT', 0), |
132 | 'user_id' => array('ULINT', 0), |
133 | ), |
134 | $this->table_prefix . 'search_wordlist' => array( |
135 | 'word_id' => array('ULINT', null, 'auto_increment'), |
136 | ), |
137 | $this->table_prefix . 'search_wordmatch' => array( |
138 | 'post_id' => array('ULINT', 0), |
139 | 'word_id' => array('ULINT', 0), |
140 | ), |
141 | $this->table_prefix . 'sessions' => array( |
142 | 'session_user_id' => array('ULINT', 0), |
143 | ), |
144 | $this->table_prefix . 'sessions_keys' => array( |
145 | 'user_id' => array('ULINT', 0), |
146 | ), |
147 | $this->table_prefix . 'topics' => array( |
148 | 'topic_id' => array('ULINT', null, 'auto_increment'), |
149 | 'topic_poster' => array('ULINT', 0), |
150 | 'topic_first_post_id' => array('ULINT', 0), |
151 | 'topic_last_post_id' => array('ULINT', 0), |
152 | 'topic_last_poster_id' => array('ULINT', 0), |
153 | 'topic_moved_id' => array('ULINT', 0), |
154 | 'topic_delete_user' => array('ULINT', 0), |
155 | ), |
156 | $this->table_prefix . 'topics_track' => array( |
157 | 'user_id' => array('ULINT', 0), |
158 | 'topic_id' => array('ULINT', 0), |
159 | ), |
160 | $this->table_prefix . 'topics_posted' => array( |
161 | 'user_id' => array('ULINT', 0), |
162 | 'topic_id' => array('ULINT', 0), |
163 | ), |
164 | $this->table_prefix . 'topics_watch' => array( |
165 | 'user_id' => array('ULINT', 0), |
166 | 'topic_id' => array('ULINT', 0), |
167 | ), |
168 | $this->table_prefix . 'user_notifications' => array( |
169 | 'item_id' => array('ULINT', 0), |
170 | 'user_id' => array('ULINT', 0), |
171 | ), |
172 | $this->table_prefix . 'user_group' => array( |
173 | 'user_id' => array('ULINT', 0), |
174 | ), |
175 | $this->table_prefix . 'users' => array( |
176 | 'user_id' => array('ULINT', null, 'auto_increment'), |
177 | ), |
178 | $this->table_prefix . 'warnings' => array( |
179 | 'log_id' => array('ULINT', 0), |
180 | 'user_id' => array('ULINT', 0), |
181 | 'post_id' => array('ULINT', 0), |
182 | ), |
183 | $this->table_prefix . 'words' => array( |
184 | 'word_id' => array('ULINT', null, 'auto_increment'), |
185 | ), |
186 | $this->table_prefix . 'zebra' => array( |
187 | 'user_id' => array('ULINT', 0), |
188 | 'zebra_id' => array('ULINT', 0), |
189 | ), |
190 | ), |
191 | ); |
192 | } |
193 | |
194 | public function revert_schema() |
195 | { |
196 | return array( |
197 | 'change_columns' => array( |
198 | $this->table_prefix . 'acl_users' => array( |
199 | 'user_id' => array('UINT', 0), |
200 | ), |
201 | $this->table_prefix . 'attachments' => array( |
202 | 'attach_id' => array('UINT', null, 'auto_increment'), |
203 | 'post_msg_id' => array('UINT', 0), |
204 | 'poster_id' => array('UINT', 0), |
205 | 'topic_id' => array('UINT', 0), |
206 | ), |
207 | $this->table_prefix . 'banlist' => array( |
208 | 'ban_id' => array('UINT', null, 'auto_increment'), |
209 | 'ban_userid' => array('UINT', 0), |
210 | ), |
211 | $this->table_prefix . 'bookmarks' => array( |
212 | 'topic_id' => array('UINT', 0), |
213 | 'user_id' => array('UINT', 0), |
214 | ), |
215 | $this->table_prefix . 'bots' => array( |
216 | 'bot_id' => array('UINT', null, 'auto_increment'), |
217 | 'user_id' => array('UINT', 0), |
218 | ), |
219 | $this->table_prefix . 'drafts' => array( |
220 | 'draft_id' => array('UINT', null, 'auto_increment'), |
221 | 'user_id' => array('UINT', 0), |
222 | 'topic_id' => array('UINT', 0), |
223 | ), |
224 | $this->table_prefix . 'forums' => array( |
225 | 'forum_last_post_id' => array('UINT', 0), |
226 | 'forum_last_poster_id' => array('UINT', 0), |
227 | ), |
228 | $this->table_prefix . 'forums_access' => array( |
229 | 'user_id' => array('UINT', 0), |
230 | ), |
231 | $this->table_prefix . 'forums_track' => array( |
232 | 'user_id' => array('UINT', 0), |
233 | ), |
234 | $this->table_prefix . 'forums_watch' => array( |
235 | 'user_id' => array('UINT', 0), |
236 | ), |
237 | $this->table_prefix . 'log' => array( |
238 | 'log_id' => array('UINT', null, 'auto_increment'), |
239 | 'post_id' => array('UINT', 0), |
240 | 'reportee_id' => array('UINT', 0), |
241 | 'user_id' => array('UINT', 0), |
242 | 'topic_id' => array('UINT', 0), |
243 | ), |
244 | $this->table_prefix . 'login_attempts' => array( |
245 | 'user_id' => array('UINT', 0), |
246 | ), |
247 | $this->table_prefix . 'moderator_cache' => array( |
248 | 'user_id' => array('UINT', 0), |
249 | ), |
250 | $this->table_prefix . 'notifications' => array( |
251 | 'user_id' => array('UINT', 0), |
252 | ), |
253 | $this->table_prefix . 'oauth_accounts' => array( |
254 | 'user_id' => array('UINT', 0), |
255 | ), |
256 | $this->table_prefix . 'oauth_states' => array( |
257 | 'user_id' => array('UINT', 0), |
258 | ), |
259 | $this->table_prefix . 'oauth_tokens' => array( |
260 | 'user_id' => array('UINT', 0), |
261 | ), |
262 | $this->table_prefix . 'poll_options' => array( |
263 | 'topic_id' => array('UINT', 0), |
264 | ), |
265 | $this->table_prefix . 'poll_votes' => array( |
266 | 'topic_id' => array('UINT', 0), |
267 | 'vote_user_id' => array('UINT', 0), |
268 | ), |
269 | $this->table_prefix . 'posts' => array( |
270 | 'post_id' => array('UINT', null, 'auto_increment'), |
271 | 'poster_id' => array('UINT', 0), |
272 | 'post_delete_user' => array('UINT', 0), |
273 | 'post_edit_user' => array('UINT', 0), |
274 | 'topic_id' => array('UINT', 0), |
275 | ), |
276 | $this->table_prefix . 'privmsgs' => array( |
277 | 'author_id' => array('UINT', 0), |
278 | 'message_edit_user' => array('UINT', 0), |
279 | 'msg_id' => array('UINT', null, 'auto_increment'), |
280 | ), |
281 | $this->table_prefix . 'privmsgs_folder' => array( |
282 | 'user_id' => array('UINT', 0), |
283 | ), |
284 | $this->table_prefix . 'privmsgs_rules' => array( |
285 | 'rule_user_id' => array('UINT', 0), |
286 | 'user_id' => array('UINT', 0), |
287 | ), |
288 | $this->table_prefix . 'privmsgs_to' => array( |
289 | 'author_id' => array('UINT', 0), |
290 | 'msg_id' => array('UINT', 0), |
291 | 'user_id' => array('UINT', 0), |
292 | ), |
293 | $this->table_prefix . 'profile_fields_data' => array( |
294 | 'user_id' => array('UINT', 0), |
295 | ), |
296 | $this->table_prefix . 'reports' => array( |
297 | 'report_id' => array('UINT', 0), |
298 | 'pm_id' => array('UINT', 0), |
299 | 'post_id' => array('UINT', 0), |
300 | 'user_id' => array('UINT', 0), |
301 | ), |
302 | $this->table_prefix . 'search_wordlist' => array( |
303 | 'word_id' => array('UINT', null, 'auto_increment'), |
304 | ), |
305 | $this->table_prefix . 'search_wordmatch' => array( |
306 | 'post_id' => array('UINT', 0), |
307 | 'word_id' => array('UINT', 0), |
308 | ), |
309 | $this->table_prefix . 'sessions' => array( |
310 | 'session_user_id' => array('UINT', 0), |
311 | ), |
312 | $this->table_prefix . 'sessions_keys' => array( |
313 | 'user_id' => array('UINT', 0), |
314 | ), |
315 | $this->table_prefix . 'topics' => array( |
316 | 'topic_id' => array('UINT', null, 'auto_increment'), |
317 | 'topic_poster' => array('UINT', 0), |
318 | 'topic_first_post_id' => array('UINT', 0), |
319 | 'topic_last_post_id' => array('UINT', 0), |
320 | 'topic_last_poster_id' => array('UINT', 0), |
321 | 'topic_moved_id' => array('UINT', 0), |
322 | 'topic_delete_user' => array('UINT', 0), |
323 | ), |
324 | $this->table_prefix . 'topics_track' => array( |
325 | 'user_id' => array('UINT', 0), |
326 | 'topic_id' => array('UINT', 0), |
327 | ), |
328 | $this->table_prefix . 'topics_posted' => array( |
329 | 'user_id' => array('UINT', 0), |
330 | 'topic_id' => array('UINT', 0), |
331 | ), |
332 | $this->table_prefix . 'topics_watch' => array( |
333 | 'user_id' => array('UINT', 0), |
334 | 'topic_id' => array('UINT', 0), |
335 | ), |
336 | $this->table_prefix . 'user_notifications' => array( |
337 | 'item_id' => array('UINT', 0), |
338 | 'user_id' => array('UINT', 0), |
339 | ), |
340 | $this->table_prefix . 'user_group' => array( |
341 | 'user_id' => array('UINT', 0), |
342 | ), |
343 | $this->table_prefix . 'users' => array( |
344 | 'user_id' => array('UINT', null, 'auto_increment'), |
345 | ), |
346 | $this->table_prefix . 'warnings' => array( |
347 | 'log_id' => array('UINT', 0), |
348 | 'user_id' => array('UINT', 0), |
349 | 'post_id' => array('UINT', 0), |
350 | ), |
351 | $this->table_prefix . 'words' => array( |
352 | 'word_id' => array('UINT', null, 'auto_increment'), |
353 | ), |
354 | $this->table_prefix . 'zebra' => array( |
355 | 'user_id' => array('UINT', 0), |
356 | 'zebra_id' => array('UINT', 0), |
357 | ), |
358 | ), |
359 | ); |
360 | } |
361 | } |