· 8 years ago · Feb 17, 2018, 11:16 PM
1CREATE TABLE IF NOT EXISTS `chv_albums` (
2 `album_id` mediumint(8) NOT NULL AUTO_INCREMENT,
3 `album_name` varchar(100) NOT NULL,
4 `album_user_id` bigint(32) NOT NULL,
5 `album_date` datetime NOT NULL,
6 `album_date_gmt` datetime NOT NULL,
7 `album_privacy` enum('public','password','private','private_but_link','custom') DEFAULT 'public',
8 `album_privacy_extra` text,
9 `album_image_count` bigint(32) NOT NULL DEFAULT '0',
10 `album_description` text,
11 `album_creation_ip` varchar(255) NOT NULL,
12 `album_likes` bigint(32) NOT NULL DEFAULT '0',
13 PRIMARY KEY (`album_id`),
14 UNIQUE KEY `unique` (`album_id`) USING BTREE,
15 FULLTEXT KEY `searchindex` (`album_name`,`album_description`)
16) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1347 ;
17
18-- --------------------------------------------------------
19
20--
21-- Table structure for table `chv_categories`
22--
23
24CREATE TABLE IF NOT EXISTS `chv_categories` (
25 `category_id` bigint(32) NOT NULL AUTO_INCREMENT,
26 `category_name` varchar(32) NOT NULL,
27 `category_url_key` varchar(32) NOT NULL,
28 `category_description` text,
29 PRIMARY KEY (`category_id`),
30 UNIQUE KEY `id` (`category_id`) USING BTREE,
31 UNIQUE KEY `url_key` (`category_url_key`) USING BTREE,
32 KEY `category_id` (`category_id`)
33) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;
34
35-- --------------------------------------------------------
36
37--
38-- Table structure for table `chv_confirmations`
39--
40
41CREATE TABLE IF NOT EXISTS `chv_confirmations` (
42 `confirmation_id` bigint(32) NOT NULL AUTO_INCREMENT,
43 `confirmation_user_id` bigint(32) NOT NULL,
44 `confirmation_type` enum('account-activate','account-change-email','account-password-forgot') NOT NULL,
45 `confirmation_date` datetime NOT NULL,
46 `confirmation_date_gmt` datetime NOT NULL,
47 `confirmation_token_hash` varchar(255) NOT NULL,
48 `confirmation_status` enum('active','valid','invalid') NOT NULL,
49 `confirmation_extra` text,
50 PRIMARY KEY (`confirmation_id`),
51 UNIQUE KEY `unique` (`confirmation_id`) USING BTREE
52) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=63 ;
53
54-- --------------------------------------------------------
55
56--
57-- Table structure for table `chv_convert_image`
58--
59
60CREATE TABLE IF NOT EXISTS `chv_convert_image` (
61 `id` bigint(32) NOT NULL AUTO_INCREMENT,
62 `image_id` bigint(32) DEFAULT NULL,
63 `convert_to` varchar(255) DEFAULT NULL,
64 `status` tinyint(1) DEFAULT '0',
65 `path_stereo_cube` varchar(255) DEFAULT NULL,
66 `path_stereo_cube_tiles` varchar(255) DEFAULT NULL,
67 `tile_size` int(11) DEFAULT NULL,
68 `filename` varchar(255) DEFAULT NULL,
69 `extension` varchar(255) DEFAULT NULL,
70 `width` int(11) DEFAULT NULL,
71 `height` int(11) DEFAULT NULL,
72 PRIMARY KEY (`id`)
73) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=185605 ;
74
75-- --------------------------------------------------------
76
77--
78-- Table structure for table `chv_deletions`
79--
80
81CREATE TABLE IF NOT EXISTS `chv_deletions` (
82 `deleted_id` bigint(32) NOT NULL AUTO_INCREMENT,
83 `deleted_date_gmt` datetime NOT NULL,
84 `deleted_content_id` bigint(32) NOT NULL,
85 `deleted_content_date_gmt` datetime NOT NULL,
86 `deleted_content_user_id` bigint(32) DEFAULT NULL,
87 `deleted_content_ip` varchar(255) NOT NULL,
88 `deleted_content_md5` varchar(32) DEFAULT NULL,
89 `deleted_content_original_filename` varchar(255) DEFAULT NULL,
90 `deleted_content_views` bigint(32) NOT NULL DEFAULT '0',
91 `deleted_content_likes` bigint(32) NOT NULL DEFAULT '0',
92 PRIMARY KEY (`deleted_id`)
93) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1898 ;
94
95-- --------------------------------------------------------
96
97--
98-- Table structure for table `chv_directories`
99--
100
101CREATE TABLE IF NOT EXISTS `chv_directories` (
102 `directory_id` bigint(32) NOT NULL AUTO_INCREMENT,
103 `directory_project_id` bigint(32) DEFAULT NULL,
104 `directory_image_id` bigint(32) DEFAULT NULL,
105 `directory_title` varchar(255) NOT NULL,
106 `directory_url` varchar(255) NOT NULL,
107 `directory_image_main` varchar(255) NOT NULL,
108 `directory_market` varchar(255) NOT NULL,
109 `directory_is_streaming` tinyint(1) DEFAULT '0',
110 `directory_position` int(11) DEFAULT '0',
111 `directory_is_published` tinyint(1) DEFAULT '1',
112 PRIMARY KEY (`directory_id`)
113) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=107 ;
114
115-- --------------------------------------------------------
116
117--
118-- Table structure for table `chv_follows`
119--
120
121CREATE TABLE IF NOT EXISTS `chv_follows` (
122 `follow_id` bigint(32) NOT NULL AUTO_INCREMENT,
123 `follow_date` datetime NOT NULL,
124 `follow_date_gmt` datetime NOT NULL,
125 `follow_user_id` bigint(32) NOT NULL,
126 `follow_followed_user_id` bigint(32) NOT NULL,
127 `follow_ip` varchar(255) NOT NULL,
128 PRIMARY KEY (`follow_id`)
129) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=117 ;
130
131-- --------------------------------------------------------
132
133--
134-- Table structure for table `chv_follows_projects`
135--
136
137CREATE TABLE IF NOT EXISTS `chv_follows_projects` (
138 `follows_project_id` bigint(32) NOT NULL AUTO_INCREMENT,
139 `follows_project_date` datetime NOT NULL,
140 `follows_project_date_gmt` datetime NOT NULL,
141 `follows_project_project_id` bigint(32) NOT NULL,
142 `follows_project_user_id` bigint(32) NOT NULL,
143 PRIMARY KEY (`follows_project_id`)
144) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=40 ;
145
146-- --------------------------------------------------------
147
148--
149-- Table structure for table `chv_id_reservations`
150--
151
152CREATE TABLE IF NOT EXISTS `chv_id_reservations` (
153 `id_reservation_id` bigint(32) NOT NULL AUTO_INCREMENT,
154 `id_reservation_date_gmt` datetime NOT NULL,
155 `id_reservation_reserved_id` bigint(32) NOT NULL,
156 `id_reservation_next_id` bigint(32) NOT NULL,
157 PRIMARY KEY (`id_reservation_id`)
158) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
159
160-- --------------------------------------------------------
161
162--
163-- Table structure for table `chv_images`
164--
165
166CREATE TABLE IF NOT EXISTS `chv_images` (
167 `image_id` mediumint(8) NOT NULL AUTO_INCREMENT,
168 `image_name` varchar(255) NOT NULL,
169 `image_extension` varchar(255) NOT NULL,
170 `image_size` int(11) NOT NULL,
171 `image_width` int(11) NOT NULL,
172 `image_height` int(11) NOT NULL,
173 `image_date` datetime NOT NULL,
174 `image_date_gmt` datetime NOT NULL,
175 `image_title` varchar(100) DEFAULT NULL,
176 `image_description` text,
177 `image_nsfw` tinyint(1) NOT NULL DEFAULT '0',
178 `image_user_id` bigint(32) DEFAULT NULL,
179 `image_album_id` bigint(32) DEFAULT NULL,
180 `image_uploader_ip` varchar(255) NOT NULL,
181 `image_storage_mode` enum('datefolder','direct','old') NOT NULL DEFAULT 'datefolder',
182 `image_storage_id` bigint(32) DEFAULT NULL,
183 `image_md5` varchar(32) NOT NULL,
184 `image_original_filename` text NOT NULL,
185 `image_original_exifdata` longtext,
186 `image_views` bigint(32) NOT NULL DEFAULT '0',
187 `image_category_id` bigint(32) DEFAULT NULL,
188 `image_chain` tinyint(128) NOT NULL,
189 `image_thumb_size` int(11) NOT NULL,
190 `image_medium_size` int(11) NOT NULL DEFAULT '0',
191 `image_format` varchar(255) DEFAULT NULL,
192 `image_expiration_date_gmt` datetime DEFAULT NULL,
193 `image_likes` bigint(32) NOT NULL DEFAULT '0',
194 `image_source` varchar(255) DEFAULT NULL,
195 `image_center` varchar(45) DEFAULT '0',
196 `image_project_id` bigint(32) DEFAULT NULL,
197 `image_zscore` double(20,10) DEFAULT '0.0000000000',
198 `image_enabled_zscore` tinyint(1) DEFAULT '0',
199 `image_update_cache` bigint(32) DEFAULT '1',
200 PRIMARY KEY (`image_id`),
201 UNIQUE KEY `unique` (`image_id`) USING BTREE,
202 FULLTEXT KEY `searchindex` (`image_name`,`image_title`,`image_description`,`image_original_filename`)
203) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=189980 ;
204
205-- --------------------------------------------------------
206
207--
208-- Table structure for table `chv_images_views`
209--
210
211CREATE TABLE IF NOT EXISTS `chv_images_views` (
212 `images_view_id` bigint(32) NOT NULL AUTO_INCREMENT,
213 `images_view_image_id` bigint(32) NOT NULL,
214 `images_view_date` date DEFAULT NULL,
215 `images_view_count` bigint(32) DEFAULT '0',
216 PRIMARY KEY (`images_view_id`)
217) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=808213 ;
218
219-- --------------------------------------------------------
220
221--
222-- Table structure for table `chv_ip_bans`
223--
224
225CREATE TABLE IF NOT EXISTS `chv_ip_bans` (
226 `ip_ban_id` bigint(20) NOT NULL AUTO_INCREMENT,
227 `ip_ban_date` datetime NOT NULL,
228 `ip_ban_date_gmt` datetime NOT NULL,
229 `ip_ban_expires` datetime DEFAULT NULL,
230 `ip_ban_expires_gmt` datetime DEFAULT NULL,
231 `ip_ban_ip` varchar(255) NOT NULL,
232 `ip_ban_message` longtext,
233 PRIMARY KEY (`ip_ban_id`,`ip_ban_ip`)
234) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
235
236-- --------------------------------------------------------
237
238--
239-- Table structure for table `chv_likes`
240--
241
242CREATE TABLE IF NOT EXISTS `chv_likes` (
243 `like_id` bigint(32) NOT NULL AUTO_INCREMENT,
244 `like_date` datetime NOT NULL,
245 `like_date_gmt` datetime NOT NULL,
246 `like_user_id` bigint(32) DEFAULT NULL,
247 `like_content_type` enum('image') DEFAULT NULL,
248 `like_content_id` bigint(32) NOT NULL,
249 `like_content_user_id` bigint(32) DEFAULT NULL,
250 `like_ip` varchar(255) NOT NULL,
251 PRIMARY KEY (`like_id`),
252 KEY `like_content_id` (`like_content_id`,`like_content_type`,`like_user_id`)
253) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1177 ;
254
255-- --------------------------------------------------------
256
257--
258-- Table structure for table `chv_logins`
259--
260
261CREATE TABLE IF NOT EXISTS `chv_logins` (
262 `login_id` bigint(32) NOT NULL AUTO_INCREMENT,
263 `login_user_id` bigint(32) NOT NULL,
264 `login_type` enum('password','session','cookie','facebook','twitter','google','vk') NOT NULL,
265 `login_ip` varchar(255) DEFAULT NULL,
266 `login_hostname` text,
267 `login_date` datetime NOT NULL,
268 `login_date_gmt` datetime NOT NULL,
269 `login_resource_id` varchar(255) DEFAULT NULL,
270 `login_resource_name` text,
271 `login_resource_avatar` text,
272 `login_resource_url` text,
273 `login_secret` text COMMENT 'The secret part',
274 `login_token_hash` text COMMENT 'Hashed complement to secret if needed',
275 PRIMARY KEY (`login_id`),
276 UNIQUE KEY `unique` (`login_id`) USING BTREE
277) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2296 ;
278
279-- --------------------------------------------------------
280
281--
282-- Table structure for table `chv_meta`
283--
284
285CREATE TABLE IF NOT EXISTS `chv_meta` (
286 `id` mediumint(8) NOT NULL AUTO_INCREMENT,
287 `image_id` bigint(32) NOT NULL,
288 `game` varchar(255) DEFAULT NULL,
289 `platform` varchar(255) DEFAULT NULL,
290 `engine` varchar(255) DEFAULT NULL,
291 `developerUrl` varchar(255) DEFAULT NULL,
292 `lookDirection` varchar(255) DEFAULT NULL,
293 `roomTitle` varchar(255) DEFAULT NULL,
294 `gameDescription` text,
295 `tags` text,
296 `people` text,
297 `eyeDistance` varchar(255) DEFAULT NULL,
298 PRIMARY KEY (`id`),
299 KEY `fk_chv_meta_1_idx` (`image_id`)
300) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=182266 ;
301
302-- --------------------------------------------------------
303
304--
305-- Table structure for table `chv_notifications`
306--
307
308CREATE TABLE IF NOT EXISTS `chv_notifications` (
309 `notification_id` bigint(32) NOT NULL AUTO_INCREMENT,
310 `notification_date_gmt` datetime NOT NULL,
311 `notification_user_id` bigint(32) NOT NULL,
312 `notification_trigger_user_id` bigint(32) DEFAULT NULL,
313 `notification_type` enum('follow','like','new_picture') NOT NULL,
314 `notification_content_type` enum('user','image') NOT NULL,
315 `notification_type_id` bigint(32) NOT NULL,
316 `notification_is_read` tinyint(1) NOT NULL DEFAULT '0',
317 PRIMARY KEY (`notification_id`)
318) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2030 ;
319
320-- --------------------------------------------------------
321
322--
323-- Table structure for table `chv_pages`
324--
325
326CREATE TABLE IF NOT EXISTS `chv_pages` (
327 `page_id` bigint(32) NOT NULL AUTO_INCREMENT,
328 `page_url_key` varchar(32) DEFAULT NULL,
329 `page_type` enum('internal','link') NOT NULL DEFAULT 'internal',
330 `page_file_path` varchar(255) DEFAULT NULL,
331 `page_link_url` text,
332 `page_icon` varchar(255) DEFAULT NULL,
333 `page_title` varchar(255) NOT NULL,
334 `page_description` text,
335 `page_keywords` text,
336 `page_is_active` tinyint(1) NOT NULL DEFAULT '1',
337 `page_is_link_visible` tinyint(1) NOT NULL DEFAULT '1',
338 `page_attr_target` enum('_self','_blank') DEFAULT '_self',
339 `page_attr_rel` varchar(255) DEFAULT NULL,
340 `page_sort_display` int(11) DEFAULT NULL,
341 PRIMARY KEY (`page_id`)
342) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=7 ;
343
344-- --------------------------------------------------------
345
346--
347-- Table structure for table `chv_painters`
348--
349
350CREATE TABLE IF NOT EXISTS `chv_painters` (
351 `painter_id` bigint(32) NOT NULL AUTO_INCREMENT,
352 `painter_user_id` bigint(32) NOT NULL,
353 `painter_file_model` varchar(255) NOT NULL,
354 `painter_create_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
355 PRIMARY KEY (`painter_id`),
356 UNIQUE KEY `painter_id_UNIQUE` (`painter_id`)
357) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=20 ;
358
359-- --------------------------------------------------------
360
361--
362-- Table structure for table `chv_projects`
363--
364
365CREATE TABLE IF NOT EXISTS `chv_projects` (
366 `project_id` bigint(32) NOT NULL AUTO_INCREMENT,
367 `project_user_id` bigint(32) NOT NULL,
368 `project_name` varchar(255) DEFAULT NULL,
369 `project_uri` varchar(255) DEFAULT NULL,
370 `project_api_key` varchar(255) DEFAULT NULL,
371 `project_market` enum('games','apps','experiences','videos','art','other','ed','med') DEFAULT 'apps',
372 `project_general_tags` varchar(255) DEFAULT NULL,
373 `project_email` varchar(255) DEFAULT NULL,
374 `project_website` varchar(255) DEFAULT NULL,
375 `project_background_filename` varchar(255) DEFAULT NULL,
376 `project_icon_filename` varchar(255) DEFAULT NULL,
377 `project_is_public_upload` tinyint(1) DEFAULT '0',
378 `project_privacy` enum('public','private','private_but_link') DEFAULT 'public',
379 `project_platform` varchar(255) DEFAULT NULL,
380 `project_engine` varchar(255) DEFAULT NULL,
381 `project_categories_id` bigint(32) DEFAULT NULL,
382 `project_font_color` varchar(45) DEFAULT NULL,
383 `project_youtube_url` varchar(255) DEFAULT NULL,
384 `project_how_to_capture` varchar(255) DEFAULT NULL,
385 `project_post_in_realtime` tinyint(1) DEFAULT '0',
386 `project_show_in_directory` tinyint(1) DEFAULT '0',
387 `project_url_directory` varchar(255) DEFAULT NULL,
388 `project_steam_url` varchar(255) DEFAULT NULL,
389 `project_oculus_home_url` varchar(255) DEFAULT NULL,
390 PRIMARY KEY (`project_id`)
391) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=40 ;
392
393-- --------------------------------------------------------
394
395--
396-- Table structure for table `chv_queues`
397--
398
399CREATE TABLE IF NOT EXISTS `chv_queues` (
400 `queue_id` bigint(32) NOT NULL AUTO_INCREMENT,
401 `queue_type` enum('storage-delete') NOT NULL,
402 `queue_date_gmt` datetime NOT NULL,
403 `queue_args` longtext NOT NULL,
404 `queue_join` bigint(32) NOT NULL,
405 `queue_attempts` varchar(255) DEFAULT '0',
406 `queue_status` enum('pending','failed') NOT NULL DEFAULT 'pending',
407 PRIMARY KEY (`queue_id`),
408 UNIQUE KEY `unique` (`queue_id`) USING BTREE
409) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
410
411-- --------------------------------------------------------
412
413--
414-- Table structure for table `chv_requests`
415--
416
417CREATE TABLE IF NOT EXISTS `chv_requests` (
418 `request_id` bigint(32) NOT NULL AUTO_INCREMENT,
419 `request_type` enum('upload','signup','account-edit','account-password-forgot','account-password-reset','account-resend-activation','account-email-needed','account-change-email','account-activate','login') NOT NULL,
420 `request_user_id` bigint(32) DEFAULT NULL,
421 `request_ip` varchar(255) NOT NULL,
422 `request_date` datetime NOT NULL,
423 `request_date_gmt` datetime NOT NULL,
424 `request_result` enum('success','fail') NOT NULL,
425 PRIMARY KEY (`request_id`),
426 UNIQUE KEY `unique` (`request_id`) USING BTREE
427) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=4850 ;
428
429-- --------------------------------------------------------
430
431--
432-- Table structure for table `chv_settings`
433--
434
435CREATE TABLE IF NOT EXISTS `chv_settings` (
436 `setting_id` int(11) NOT NULL AUTO_INCREMENT,
437 `setting_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
438 `setting_value` text,
439 `setting_default` text,
440 `setting_typeset` enum('string','bool') DEFAULT 'string',
441 PRIMARY KEY (`setting_id`),
442 KEY `setting_name` (`setting_name`)
443) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=179 ;
444
445-- --------------------------------------------------------
446
447--
448-- Table structure for table `chv_stats`
449--
450
451CREATE TABLE IF NOT EXISTS `chv_stats` (
452 `stat_id` bigint(32) NOT NULL AUTO_INCREMENT,
453 `stat_type` enum('total','date') NOT NULL,
454 `stat_date_gmt` date DEFAULT NULL,
455 `stat_users` bigint(32) NOT NULL DEFAULT '0',
456 `stat_images` bigint(32) NOT NULL DEFAULT '0',
457 `stat_albums` bigint(32) NOT NULL DEFAULT '0',
458 `stat_image_views` bigint(32) NOT NULL DEFAULT '0',
459 `stat_likes` bigint(32) NOT NULL DEFAULT '0',
460 `stat_disk_used` bigint(32) NOT NULL DEFAULT '0',
461 PRIMARY KEY (`stat_id`),
462 UNIQUE KEY `stat_date_gmt_UNIQUE` (`stat_date_gmt`)
463) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1476605 ;
464
465-- --------------------------------------------------------
466
467--
468-- Table structure for table `chv_storages`
469--
470
471CREATE TABLE IF NOT EXISTS `chv_storages` (
472 `storage_id` bigint(32) NOT NULL AUTO_INCREMENT,
473 `storage_api_id` bigint(32) NOT NULL,
474 `storage_name` varchar(255) NOT NULL,
475 `storage_url` varchar(255) NOT NULL,
476 `storage_bucket` varchar(255) DEFAULT NULL,
477 `storage_region` varchar(255) DEFAULT NULL,
478 `storage_server` varchar(255) DEFAULT NULL,
479 `storage_key` text,
480 `storage_secret` text,
481 `storage_is_https` tinyint(1) NOT NULL DEFAULT '0',
482 `storage_is_active` tinyint(1) NOT NULL DEFAULT '0',
483 `storage_capacity` bigint(32) DEFAULT NULL,
484 `storage_space_used` bigint(32) DEFAULT '0',
485 `storage_account_id` varchar(255) DEFAULT NULL,
486 `storage_account_name` varchar(255) DEFAULT NULL,
487 UNIQUE KEY `unique` (`storage_id`) USING BTREE,
488 KEY `storage_id` (`storage_id`)
489) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;
490
491-- --------------------------------------------------------
492
493--
494-- Table structure for table `chv_storage_apis`
495--
496
497CREATE TABLE IF NOT EXISTS `chv_storage_apis` (
498 `storage_api_id` bigint(32) NOT NULL AUTO_INCREMENT,
499 `storage_api_name` varchar(255) NOT NULL,
500 `storage_api_type` varchar(255) NOT NULL,
501 PRIMARY KEY (`storage_api_id`)
502) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=7 ;
503
504-- --------------------------------------------------------
505
506--
507-- Table structure for table `chv_trophy`
508--
509
510CREATE TABLE IF NOT EXISTS `chv_trophy` (
511 `id` bigint(32) NOT NULL AUTO_INCREMENT,
512 `image_id` bigint(32) NOT NULL,
513 `create_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
514 PRIMARY KEY (`id`)
515) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=93 ;
516
517-- --------------------------------------------------------
518
519--
520-- Table structure for table `chv_twitter_images`
521--
522
523CREATE TABLE IF NOT EXISTS `chv_twitter_images` (
524 `twitter_image_id` bigint(32) NOT NULL AUTO_INCREMENT,
525 `twitter_image_image_id` bigint(32) NOT NULL,
526 `twitter_image_create_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
527 PRIMARY KEY (`twitter_image_id`),
528 UNIQUE KEY `twitter_image_image_id_UNIQUE` (`twitter_image_image_id`)
529) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1427 ;
530
531-- --------------------------------------------------------
532
533--
534-- Table structure for table `chv_users`
535--
536
537CREATE TABLE IF NOT EXISTS `chv_users` (
538 `user_id` bigint(32) NOT NULL AUTO_INCREMENT,
539 `user_name` varchar(255) DEFAULT NULL,
540 `user_username` varchar(255) NOT NULL,
541 `user_date` datetime NOT NULL,
542 `user_date_gmt` datetime NOT NULL,
543 `user_email` varchar(255) DEFAULT NULL,
544 `user_avatar_filename` varchar(255) DEFAULT NULL,
545 `user_facebook_username` varchar(255) DEFAULT NULL,
546 `user_twitter_username` varchar(255) DEFAULT NULL,
547 `user_website` varchar(255) DEFAULT NULL,
548 `user_background_filename` varchar(255) DEFAULT NULL,
549 `user_timezone` varchar(255) NOT NULL,
550 `user_language` varchar(255) DEFAULT NULL,
551 `user_status` enum('valid','awaiting-confirmation','awaiting-email','banned') NOT NULL,
552 `user_is_admin` tinyint(1) NOT NULL DEFAULT '0',
553 `user_image_count` bigint(32) NOT NULL DEFAULT '0',
554 `user_album_count` bigint(32) NOT NULL DEFAULT '0',
555 `user_api_key` varchar(255) DEFAULT NULL,
556 `user_api_token` varchar(255) DEFAULT NULL,
557 `user_newsletter_subscribe` tinyint(1) NOT NULL DEFAULT '1',
558 `user_show_nsfw_listings` tinyint(1) NOT NULL DEFAULT '0',
559 `user_bio` varchar(255) DEFAULT NULL,
560 `user_image_keep_exif` tinyint(1) NOT NULL DEFAULT '1',
561 `user_image_expiration` varchar(255) DEFAULT NULL,
562 `user_registration_ip` varchar(255) NOT NULL,
563 `user_likes` bigint(32) NOT NULL DEFAULT '0',
564 `user_liked` bigint(32) NOT NULL DEFAULT '0',
565 `user_following` bigint(32) NOT NULL DEFAULT '0',
566 `user_followers` bigint(32) NOT NULL DEFAULT '0',
567 `user_content_views` bigint(32) NOT NULL DEFAULT '0',
568 `user_notifications_unread` bigint(32) NOT NULL DEFAULT '0',
569 `user_trophy` bigint(32) NOT NULL DEFAULT '0',
570 `user_token` varchar(255) DEFAULT NULL,
571 `user_developer` tinyint(1) DEFAULT '0',
572 `user_fov` int(11) DEFAULT '75',
573 `user_lr` tinyint(1) DEFAULT '0',
574 `user_open_in_carmel` tinyint(1) DEFAULT '0',
575 `user_enabled_8k` tinyint(1) DEFAULT '0',
576 PRIMARY KEY (`user_id`),
577 UNIQUE KEY `username` (`user_username`) USING BTREE,
578 UNIQUE KEY `email` (`user_email`) USING BTREE,
579 FULLTEXT KEY `searchindex` (`user_name`,`user_username`)
580) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=112344360961 ;