[spoiler] DROP TABLE IF EXISTS `w_user`;
/*!40101 SET @
saved_cs_client = @@
character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `w_user` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`total_rating` bigint(20) NOT NULL,
`total_number_of_reviews` bigint(20) NOT NULL,
`one` bigint(20) NOT NULL,
`two` bigint(20) NOT NULL,
`three` bigint(20) NOT NULL,
`four` bigint(20) NOT NULL,
`five` bigint(20) NOT NULL,
`number_of_likes` bigint(20) NOT NULL,
`about_me` varchar(144) DEFAULT NULL,
`photo_number_of_likes` bigint(20) NOT NULL DEFAULT '0',
`average_rating` double NOT NULL DEFAULT '0',
`number_of_photos` bigint(20) NOT NULL DEFAULT '0',
`notify_followed` tinyint(1) NOT NULL DEFAULT '1',
`notify_review_like` tinyint(1) NOT NULL DEFAULT '1',
`notify_review_comment` tinyint(1) NOT NULL DEFAULT '1',
`notify_photo_like` tinyint(1) NOT NULL DEFAULT '1',
`notify_suggestion_approve` tinyint(1) NOT NULL DEFAULT '1',
`activity_score` bigint(20) NOT NULL DEFAULT '0',
`number_of_followings` bigint(20) NOT NULL DEFAULT '0',
`number_of_followers` bigint(20) NOT NULL DEFAULT '0',
`number_of_comments` bigint(20) NOT NULL DEFAULT '0',
`number_of_received_comments` bigint(20) NOT NULL DEFAULT '0',
`notify_badge_acquisition` tinyint(1) NOT NULL DEFAULT '1',
`photo_gallery_id` bigint(20) NOT NULL DEFAULT '0',
`last_profile_update_time` datetime DEFAULT NULL,
`number_of_android_reviews` bigint(20) NOT NULL DEFAULT '0',
`number_of_blackberry_reviews` bigint(20) NOT NULL DEFAULT '0',
`number_of_iphone_reviews` bigint(20) NOT NULL DEFAULT '0',
`number_of_android_photos` bigint(20) NOT NULL DEFAULT '0',
`number_of_blackberry_photos` bigint(20) NOT NULL DEFAULT '0',
`number_of_iphone_photos` bigint(20) NOT NULL DEFAULT '0',
`notify_photo_comment` tinyint(1) NOT NULL DEFAULT '1',
`number_of_photo_comments` bigint(20) NOT NULL DEFAULT '0',
`number_of_received_photo_comments` bigint(20) NOT NULL DEFAULT '0',
`number_of_unread_notifications` int(11) NOT NULL DEFAULT '0',
`number_of_notifications` int(11) NOT NULL DEFAULT '0',
`number_of_unread_activities` int(11) NOT NULL DEFAULT '0',
`number_of_added_restaurants` int(11) DEFAULT '0',
`total_number_of_editorial_reviews` bigint(20) NOT NULL DEFAULT '0',
`number_of_coupons` int(11) NOT NULL DEFAULT '0',
`used_coupon_score` int(11) NOT NULL DEFAULT '0',
`ip` varchar(15) DEFAULT NULL,
`mac` varchar(12) DEFAULT NULL,
`referral` varchar(10) DEFAULT NULL,
`user_agent` varchar(255) DEFAULT NULL,
`notify_p_followed` bit(1) NOT NULL DEFAULT b'1',
`notify_p_review_like` bit(1) NOT NULL DEFAULT b'1',
`notify_p_review_comment` bit(1) NOT NULL DEFAULT b'1',
`notify_p_photo_like` bit(1) NOT NULL DEFAULT b'1',
`notify_p_photo_comment` bit(1) NOT NULL DEFAULT b'1',
`notify_p_badge_acquisition` bit(1) NOT NULL DEFAULT b'1',
`notify_p_suggestion_approve` bit(1) NOT NULL DEFAULT b'1',
`number_of_checkins` int(11) NOT NULL DEFAULT '0',
`notify_activity_like` tinyint(1) NOT NULL DEFAULT '1',
`notify_activity_comment` tinyint(1) NOT NULL DEFAULT '1',
`notify_p_activity_like` tinyint(1) NOT NULL DEFAULT '1',
`notify_p_activity_comment` tinyint(1) NOT NULL DEFAULT '1',
`number_of_activity_comments` bigint(20) NOT NULL DEFAULT '0',
`number_of_received_activity_comments` bigint(20) NOT NULL DEFAULT '0',
`last_activity_time` datetime DEFAULT NULL,
`number_of_good_reviews` bigint(20) NOT NULL DEFAULT '0',
`rank` int(11) NOT NULL DEFAULT '1',
`number_of_bad_reviews` bigint(20) NOT NULL DEFAULT '0',
`number_of_topics` int(11) NOT NULL DEFAULT '0',
`number_of_topic_comments` int(11) NOT NULL DEFAULT '0',
`number_of_unread_messages` int(11) NOT NULL DEFAULT '0',
`notify_message` tinyint(1) NOT NULL DEFAULT '1',
`notify_p_message` tinyint(1) NOT NULL DEFAULT '1',
`notify_topic_comment` tinyint(1) NOT NULL DEFAULT '1',
`notify_p_topic_comment` tinyint(1) NOT NULL DEFAULT '1',
`conversation_privacy_type` int(11) NOT NULL DEFAULT '1',
`source_type` tinyint(4) DEFAULT '1',
`view_group_id` bigint(20) DEFAULT '9681',
`cover_picture_id` bigint(20) DEFAULT NULL,
`unique_checkins` int(11) NOT NULL DEFAULT '0',
`first_reviews` int(11) NOT NULL DEFAULT '0',
`number_of_awaiting_reviews` int(11) NOT NULL DEFAULT '0',
`notify_system_reminder` tinyint(1) NOT NULL DEFAULT '1',
`notify_p_system_reminder` tinyint(1) NOT NULL DEFAULT '1',
`number_of_approved` int(11) NOT NULL DEFAULT '0',
`number_of_suggestions` int(11) NOT NULL DEFAULT '0',
`all_time_score` bigint(20) NOT NULL DEFAULT '0',
`coupon_score` bigint(20) NOT NULL DEFAULT '0',
`number_of_favorite_bookmarks` int(11) NOT NULL DEFAULT '0',
`number_of_private_bookmarks` int(11) NOT NULL DEFAULT '0',
`number_of_bookmarks` int(11) NOT NULL DEFAULT '0',
`fb_uid` bigint(20) DEFAULT NULL,
`google_uid` varchar(100) DEFAULT NULL,
`tw_uid` bigint(20) DEFAULT NULL,
`profile_photo_id` bigint(20) DEFAULT NULL,
`ban_end_time` datetime DEFAULT NULL,
`magic_rank` int(11) NOT NULL DEFAULT '0',
`earned_score` int(11) NOT NULL DEFAULT '0',
`segment_id` bigint(20) DEFAULT NULL,
`eid` varchar(32) NOT NULL,
`email` varchar(50) NOT NULL,
`password` varchar(255) NOT NULL,
`name` varchar(50) CHARACTER SET utf8mb4 NOT NULL,
`join_time` datetime NOT NULL,
`last_log_in_time` datetime DEFAULT NULL,
`gender` tinyint(4) DEFAULT NULL,
`birth_date` datetime DEFAULT NULL,
`region_id` bigint(20) DEFAULT NULL,
`zipcode` varchar(5) DEFAULT NULL,
`phone` varchar(20) DEFAULT NULL,
`current_region_id` bigint(20) DEFAULT NULL,
`share_to_fb` bit(1) NOT NULL DEFAULT b'1',
`share_to_tw` bit(1) NOT NULL DEFAULT b'1',
`show_following_activities` bit(1) NOT NULL DEFAULT b'1',
`opt_lock` int(11) NOT NULL DEFAULT '0',
`email_status` tinyint(4) NOT NULL DEFAULT '1',
`verify_phone` bit(1) NOT NULL DEFAULT b'0',
`credit` double NOT NULL DEFAULT '0',
`number_of_editor_choice_reviews` bigint(20) NOT NULL DEFAULT '0',
`total_number_of_ratings` bigint(20) NOT NULL DEFAULT '0',
`number_of_been_here` int(11) NOT NULL DEFAULT '0',
`number_of_unread_challenge` int(11) NOT NULL DEFAULT '0',
`verified_time` datetime DEFAULT NULL,
`line_mid` varchar(100) DEFAULT NULL,
`line_user_id` varchar(100) DEFAULT NULL,
`last_imfriend_update_time` datetime(3) DEFAULT NULL,
`paid_credit` double NOT NULL DEFAULT '0',
`number_of_userschoice_review` int(11) NOT NULL DEFAULT '0',
`total_number_of_sponsored_reviews` bigint(20) NOT NULL DEFAULT '0',
`email_2` varchar(50) DEFAULT NULL COMMENT 'new email user nullable',
`no_rating` bigint(20) NOT NULL DEFAULT '0' COMMENT 'Total number of no-rating reviews',
`gid` varbinary(30) DEFAULT NULL COMMENT 'user global id',
`notify_contribution` bit(1) NOT NULL DEFAULT b'1' COMMENT 'Flag tell user enable email contribution notification',
`notify_p_contribution` bit(1) NOT NULL DEFAULT b'1' COMMENT 'Flag tell user enable push contribution notification',
`total_number_of_distinct_reviews` bigint(20) NOT NULL DEFAULT '0' COMMENT 'total number of distinct reviews',
`apple_uid` varchar(100) DEFAULT NULL,
`notify_following_rating` bit(1) NOT NULL DEFAULT b'0' COMMENT 'allow notification when following users rated',
`notify_p_following_rating` bit(1) NOT NULL DEFAULT b'1' COMMENT 'allow push notification when following users rated',
`notify_theme_card_items_added` bit(1) NOT NULL DEFAULT b'0' COMMENT 'allow email notification when following theme card was added with new items',
`notify_p_theme_card_items_added` bit(1) NOT NULL DEFAULT b'1' COMMENT 'allow push notification when following theme card was added with new items',
PRIMARY KEY (`id`),
UNIQUE KEY `w_user_unq_2` (`eid`),
UNIQUE KEY `w_user_unq_3` (`email`),
UNIQUE KEY `w_user_unq_4` (`email_2`),
UNIQUE KEY `w_user_unq_5` (`phone`),
UNIQUE KEY `w_user_unq_6` (`gid`),
KEY `fk_user_cover_picture` (`cover_picture_id`),
KEY `fk_user_view_group` (`view_group_id`),
KEY `w_user_idx_rep_1` (`source_type`,`view_group_id`),
KEY `w_user_idx_rep_2` (`last_activity_time`,`view_group_id`),
KEY `w_user_idx_2` (`rank`),
KEY `w_user_idx_3` (`source_type`),
KEY `w_user_idx_4` (`view_group_id`,`activity_score`),
KEY `fk_w_user_profile_photo` (`profile_photo_id`),
KEY `w_user_idx_5` (`fb_uid`),
KEY `w_user_idx_6` (`tw_uid`),
KEY `w_user_idx_7` (`google_uid`),
KEY `fk_w_user_current_region` (`current_region_id`),
KEY `fk_w_user_region` (`region_id`),
KEY `w_user_idx_rep_3` (`last_log_in_time`,`view_group_id`),
KEY `w_user_idx_9` (`phone`),
KEY `fk_w_user_segment` (`segment_id`),
KEY `w_user_idx_10` (`line_mid`),
KEY `w_user_idx_11` (`line_user_id`),
KEY `user_imfriend_update_idx` (`last_imfriend_update_time`),
KEY `w_user_idx_12` (`apple_uid`),
CONSTRAINT `fk_user_cover_picture` FOREIGN KEY (`cover_picture_id`) REFERENCES `w_photo` (`id`) ON DELETE SET NULL,
CONSTRAINT `fk_user_view_group` FOREIGN KEY (`view_group_id`) REFERENCES `w_region` (`id`) ON DELETE SET NULL,
CONSTRAINT `fk_w_user_current_region` FOREIGN KEY (`current_region_id`) REFERENCES `w_region` (`id`) ON DELETE SET NULL ON UPDATE NO ACTION,
CONSTRAINT `fk_w_user_profile_photo` FOREIGN KEY (`profile_photo_id`) REFERENCES `w_photo` (`id`) ON DELETE SET NULL,
CONSTRAINT `fk_w_user_region` FOREIGN KEY (`region_id`) REFERENCES `w_region` (`id`) ON DELETE SET NULL ON UPDATE NO ACTION,
CONSTRAINT `fk_w_user_segment` FOREIGN KEY (`segment_id`) REFERENCES `w_segment` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=4384392 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @
saved_cs_client */;
--
-- Dumping data for table `w_user`
--
LOCK TABLES `w_user` WRITE;
/*!40000 ALTER TABLE `w_user` DISABLE KEYS */;
INSERT INTO `w_user` VALUES (1,11,3,0,0,2,0,1,1355,'เพราะเรื่องกินเรื่องใหญ่ : D',1523,3.6666666666666665,2611,0,0,0,0,0,28,54,7143,44,93,0,8643,'2013-06-27 05:51:43',0,0,0,0,0,0,0,2,74,3457,11986,0,110,288,10,-420,NULL,NULL,NULL,NULL,'\0','\0','\0','\0','\0','\0','\0',0,0,0,0,0,0,0,'2016-11-09 00:00:01',1,0,1,5,200,79,1,0,0,0,1,1,9681,NULL,0,1,383,0,0,0,0,14964,15384,15,0,15,NULL,NULL,168750564,481,NULL,0,0,1,'kindaichi','
[email protected]','2fec329cb0ec0e7ca79c6cc813278313','Wongnai Editor','2010-06-19 12:45:23','2015-03-01 16:40:16',1,'2010-10-05 17:00:00',1,NULL,NULL,180,'','\0','',134,1,'\0',0,0,0,0,0,NULL,NULL,NULL,'2018-02-05 11:51:40.701',0,1,0,'
[email protected]',0,'09XiPECYChA1Nz3WmHwqRYvoHf6EXp','','',2,NULL,'\0','','\0',''),[/spoiler]