the new ossean_production.sql

This commit is contained in:
zhanyun 2016-01-23 21:32:39 +08:00
parent 510572f019
commit 02bdd2005d
3 changed files with 247 additions and 581 deletions

View File

@ -1,48 +0,0 @@
/*
Navicat MySQL Data Transfer
Source Server : ossean
Source Server Version : 50535
Source Host : localhost:3306
Source Database : ossean_new
Target Server Type : MYSQL
Target Server Version : 50535
File Encoding : 65001
Date: 2016-01-23 21:23:27
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for open_source_projects
-- ----------------------------
DROP TABLE IF EXISTS `open_source_projects`;
CREATE TABLE `open_source_projects` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`tags` varchar(2000) DEFAULT '',
`url` text,
`url_md5` varchar(255) DEFAULT NULL,
`description` text,
`language` varchar(255) DEFAULT NULL,
`source` varchar(255) DEFAULT NULL,
`tags_for_search` varchar(2000) DEFAULT NULL,
`synonyms` varchar(255) DEFAULT NULL,
`license` text,
`view_num_ossean` int(11) DEFAULT '0',
`homepage` varchar(255) DEFAULT NULL,
`updated_time` datetime DEFAULT NULL,
`extracted_time` datetime DEFAULT NULL,
`category` varchar(255) DEFAULT NULL,
`composite_score` double DEFAULT '0',
`relative_memos_num` int(11) DEFAULT NULL,
`created_time` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `index_open_source_projects_on_ossean_score` (`composite_score`) USING BTREE,
KEY `index_open_source_projects_on_name` (`name`) USING BTREE,
KEY `index_open_source_projects_on_relative_memos_num` (`relative_memos_num`) USING BTREE,
KEY `index_open_source_projects_on_composite_score` (`composite_score`) USING BTREE,
KEY `index_open_source_projects_on_source` (`source`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

View File

@ -1,16 +1,16 @@
/*
Navicat MySQL Data Transfer
Source Server : ossean_production
Source Server : ossean
Source Server Version : 50535
Source Host : 192.168.80.130:3306
Source Database : ossean_production
Source Host : localhost:3306
Source Database : ossean_new
Target Server Type : MYSQL
Target Server Version : 50535
File Encoding : 65001
Date: 2016-01-23 10:25:05
Date: 2016-01-23 21:31:37
*/
SET FOREIGN_KEY_CHECKS=0;
@ -218,17 +218,6 @@ CREATE TABLE `changes` (
KEY `changesets_changeset_id` (`changeset_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for changeset_parents
-- ----------------------------
DROP TABLE IF EXISTS `changeset_parents`;
CREATE TABLE `changeset_parents` (
`changeset_id` int(11) NOT NULL,
`parent_id` int(11) NOT NULL,
KEY `changeset_parents_changeset_ids` (`changeset_id`) USING BTREE,
KEY `changeset_parents_parent_ids` (`parent_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for changesets
-- ----------------------------
@ -261,6 +250,17 @@ CREATE TABLE `changesets_issues` (
UNIQUE KEY `changesets_issues_ids` (`changeset_id`,`issue_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for changeset_parents
-- ----------------------------
DROP TABLE IF EXISTS `changeset_parents`;
CREATE TABLE `changeset_parents` (
`changeset_id` int(11) NOT NULL,
`parent_id` int(11) NOT NULL,
KEY `changeset_parents_changeset_ids` (`changeset_id`) USING BTREE,
KEY `changeset_parents_parent_ids` (`parent_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for comments
-- ----------------------------
@ -619,33 +619,45 @@ CREATE TABLE `hot_words` (
) ENGINE=InnoDB AUTO_INCREMENT=1549983 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for hot_words_tmp
-- Table structure for issues
-- ----------------------------
DROP TABLE IF EXISTS `hot_words_tmp`;
CREATE TABLE `hot_words_tmp` (
DROP TABLE IF EXISTS `issues`;
CREATE TABLE `issues` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`osp_id` int(11) DEFAULT '0',
`name` text,
`weight` float DEFAULT '0',
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
`tracker_id` int(11) NOT NULL,
`project_id` int(11) NOT NULL,
`subject` varchar(255) NOT NULL DEFAULT '',
`description` text,
`due_date` date DEFAULT NULL,
`category_id` int(11) DEFAULT NULL,
`status_id` int(11) NOT NULL,
`assigned_to_id` int(11) DEFAULT NULL,
`priority_id` int(11) NOT NULL,
`fixed_version_id` int(11) DEFAULT NULL,
`author_id` int(11) NOT NULL,
`lock_version` int(11) NOT NULL DEFAULT '0',
`created_on` datetime DEFAULT NULL,
`updated_on` datetime DEFAULT NULL,
`start_date` date DEFAULT NULL,
`done_ratio` int(11) NOT NULL DEFAULT '0',
`estimated_hours` float DEFAULT NULL,
`parent_id` int(11) DEFAULT NULL,
`root_id` int(11) DEFAULT NULL,
`lft` int(11) DEFAULT NULL,
`rgt` int(11) DEFAULT NULL,
`is_private` tinyint(1) NOT NULL DEFAULT '0',
`closed_on` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `index_hot_words_on_osp_id` (`osp_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for hot_words_tmp2
-- ----------------------------
DROP TABLE IF EXISTS `hot_words_tmp2`;
CREATE TABLE `hot_words_tmp2` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`osp_id` int(11) DEFAULT '0',
`name` text,
`weight` float DEFAULT '0',
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`id`),
KEY `index_hot_words_on_osp_id` (`osp_id`) USING BTREE
KEY `issues_project_id` (`project_id`) USING BTREE,
KEY `index_issues_on_status_id` (`status_id`) USING BTREE,
KEY `index_issues_on_category_id` (`category_id`) USING BTREE,
KEY `index_issues_on_assigned_to_id` (`assigned_to_id`) USING BTREE,
KEY `index_issues_on_fixed_version_id` (`fixed_version_id`) USING BTREE,
KEY `index_issues_on_tracker_id` (`tracker_id`) USING BTREE,
KEY `index_issues_on_priority_id` (`priority_id`) USING BTREE,
KEY `index_issues_on_author_id` (`author_id`) USING BTREE,
KEY `index_issues_on_created_on` (`created_on`) USING BTREE,
KEY `index_issues_on_root_id_and_lft_and_rgt` (`root_id`,`lft`,`rgt`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
@ -695,48 +707,6 @@ CREATE TABLE `issue_statuses` (
KEY `index_issue_statuses_on_is_default` (`is_default`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for issues
-- ----------------------------
DROP TABLE IF EXISTS `issues`;
CREATE TABLE `issues` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`tracker_id` int(11) NOT NULL,
`project_id` int(11) NOT NULL,
`subject` varchar(255) NOT NULL DEFAULT '',
`description` text,
`due_date` date DEFAULT NULL,
`category_id` int(11) DEFAULT NULL,
`status_id` int(11) NOT NULL,
`assigned_to_id` int(11) DEFAULT NULL,
`priority_id` int(11) NOT NULL,
`fixed_version_id` int(11) DEFAULT NULL,
`author_id` int(11) NOT NULL,
`lock_version` int(11) NOT NULL DEFAULT '0',
`created_on` datetime DEFAULT NULL,
`updated_on` datetime DEFAULT NULL,
`start_date` date DEFAULT NULL,
`done_ratio` int(11) NOT NULL DEFAULT '0',
`estimated_hours` float DEFAULT NULL,
`parent_id` int(11) DEFAULT NULL,
`root_id` int(11) DEFAULT NULL,
`lft` int(11) DEFAULT NULL,
`rgt` int(11) DEFAULT NULL,
`is_private` tinyint(1) NOT NULL DEFAULT '0',
`closed_on` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `issues_project_id` (`project_id`) USING BTREE,
KEY `index_issues_on_status_id` (`status_id`) USING BTREE,
KEY `index_issues_on_category_id` (`category_id`) USING BTREE,
KEY `index_issues_on_assigned_to_id` (`assigned_to_id`) USING BTREE,
KEY `index_issues_on_fixed_version_id` (`fixed_version_id`) USING BTREE,
KEY `index_issues_on_tracker_id` (`tracker_id`) USING BTREE,
KEY `index_issues_on_priority_id` (`priority_id`) USING BTREE,
KEY `index_issues_on_author_id` (`author_id`) USING BTREE,
KEY `index_issues_on_created_on` (`created_on`) USING BTREE,
KEY `index_issues_on_root_id_and_lft_and_rgt` (`root_id`,`lft`,`rgt`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for job_requirements
-- ----------------------------
@ -776,45 +746,6 @@ CREATE TABLE `job_requirements` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=693309 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for job_requirements_dup
-- ----------------------------
DROP TABLE IF EXISTS `job_requirements_dup`;
CREATE TABLE `job_requirements_dup` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`author` varchar(255) DEFAULT NULL,
`author_url` varchar(255) DEFAULT NULL,
`url` varchar(255) NOT NULL,
`deal_title` varchar(255) NOT NULL,
`tags` varchar(255) DEFAULT NULL,
`content` text,
`salary` varchar(255) DEFAULT NULL,
`experience` varchar(255) DEFAULT NULL,
`comp_name` varchar(255) DEFAULT NULL,
`comp_url` varchar(255) DEFAULT NULL,
`addr` varchar(300) DEFAULT NULL,
`comp_scale` varchar(255) DEFAULT NULL,
`comp_field` varchar(255) DEFAULT NULL,
`financing` varchar(255) DEFAULT NULL,
`comp_vision` tinytext,
`created_time` datetime DEFAULT NULL,
`extractTime` datetime NOT NULL,
`history` int(2) unsigned DEFAULT NULL,
`relative_osps` text,
`reply_num` int(11) DEFAULT NULL,
`view_num` int(11) DEFAULT NULL,
`vote_num` int(11) DEFAULT NULL,
`collection_num` int(11) DEFAULT NULL,
`abstract` varchar(255) DEFAULT NULL,
`type` varchar(255) DEFAULT NULL,
`crawled_time` datetime DEFAULT NULL,
`category` varchar(255) DEFAULT NULL,
`source` varchar(255) DEFAULT NULL,
`last_time` datetime DEFAULT NULL,
`url_md5` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=252558 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for join_in_competitions
-- ----------------------------
@ -841,34 +772,6 @@ CREATE TABLE `join_in_contests` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for journal_details
-- ----------------------------
DROP TABLE IF EXISTS `journal_details`;
CREATE TABLE `journal_details` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`journal_id` int(11) NOT NULL DEFAULT '0',
`property` varchar(30) NOT NULL DEFAULT '',
`prop_key` varchar(30) NOT NULL DEFAULT '',
`old_value` text,
`value` text,
PRIMARY KEY (`id`),
KEY `journal_details_journal_id` (`journal_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for journal_replies
-- ----------------------------
DROP TABLE IF EXISTS `journal_replies`;
CREATE TABLE `journal_replies` (
`journal_id` int(11) DEFAULT NULL,
`user_id` int(11) DEFAULT NULL,
`reply_id` int(11) DEFAULT NULL,
KEY `index_journal_replies_on_user_id` (`user_id`) USING BTREE,
KEY `index_journal_replies_on_journal_id` (`journal_id`) USING BTREE,
KEY `index_journal_replies_on_reply_id` (`reply_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for journals
-- ----------------------------
@ -909,6 +812,34 @@ CREATE TABLE `journals_for_messages` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for journal_details
-- ----------------------------
DROP TABLE IF EXISTS `journal_details`;
CREATE TABLE `journal_details` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`journal_id` int(11) NOT NULL DEFAULT '0',
`property` varchar(30) NOT NULL DEFAULT '',
`prop_key` varchar(30) NOT NULL DEFAULT '',
`old_value` text,
`value` text,
PRIMARY KEY (`id`),
KEY `journal_details_journal_id` (`journal_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for journal_replies
-- ----------------------------
DROP TABLE IF EXISTS `journal_replies`;
CREATE TABLE `journal_replies` (
`journal_id` int(11) DEFAULT NULL,
`user_id` int(11) DEFAULT NULL,
`reply_id` int(11) DEFAULT NULL,
KEY `index_journal_replies_on_user_id` (`user_id`) USING BTREE,
KEY `index_journal_replies_on_journal_id` (`journal_id`) USING BTREE,
KEY `index_journal_replies_on_reply_id` (`reply_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for match_result_3
-- ----------------------------
@ -929,20 +860,6 @@ CREATE TABLE `match_result_3` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=340000 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for member_roles
-- ----------------------------
DROP TABLE IF EXISTS `member_roles`;
CREATE TABLE `member_roles` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`member_id` int(11) NOT NULL,
`role_id` int(11) NOT NULL,
`inherited_from` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `index_member_roles_on_member_id` (`member_id`) USING BTREE,
KEY `index_member_roles_on_role_id` (`role_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for members
-- ----------------------------
@ -959,6 +876,20 @@ CREATE TABLE `members` (
KEY `index_members_on_project_id` (`project_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for member_roles
-- ----------------------------
DROP TABLE IF EXISTS `member_roles`;
CREATE TABLE `member_roles` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`member_id` int(11) NOT NULL,
`role_id` int(11) NOT NULL,
`inherited_from` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `index_member_roles_on_member_id` (`member_id`) USING BTREE,
KEY `index_member_roles_on_role_id` (`role_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for memos
-- ----------------------------
@ -1065,6 +996,38 @@ CREATE TABLE `open_id_authentication_nonces` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for open_source_projects
-- ----------------------------
DROP TABLE IF EXISTS `open_source_projects`;
CREATE TABLE `open_source_projects` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`tags` varchar(2000) DEFAULT '',
`url` text,
`url_md5` varchar(255) DEFAULT NULL,
`description` text,
`language` varchar(255) DEFAULT NULL,
`source` varchar(255) DEFAULT NULL,
`tags_for_search` varchar(2000) DEFAULT NULL,
`synonyms` varchar(255) DEFAULT NULL,
`license` text,
`view_num_ossean` int(11) DEFAULT '0',
`homepage` varchar(255) DEFAULT NULL,
`updated_time` datetime DEFAULT NULL,
`extracted_time` datetime DEFAULT NULL,
`category` varchar(255) DEFAULT NULL,
`composite_score` double DEFAULT '0',
`relative_memos_num` int(11) DEFAULT NULL,
`created_time` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `index_open_source_projects_on_ossean_score` (`composite_score`) USING BTREE,
KEY `index_open_source_projects_on_name` (`name`) USING BTREE,
KEY `index_open_source_projects_on_relative_memos_num` (`relative_memos_num`) USING BTREE,
KEY `index_open_source_projects_on_composite_score` (`composite_score`) USING BTREE,
KEY `index_open_source_projects_on_source` (`source`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for open_source_project_help
-- ----------------------------
@ -1124,102 +1087,6 @@ CREATE TABLE `open_source_project_popularities` (
KEY `osp_pop_index` (`osp_id`,`year_col`,`month_col`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=794542 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for open_source_project_popularities_copy
-- ----------------------------
DROP TABLE IF EXISTS `open_source_project_popularities_copy`;
CREATE TABLE `open_source_project_popularities_copy` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`osp_id` int(11) DEFAULT NULL,
`year_col` int(11) DEFAULT '0',
`month_col` int(11) DEFAULT '0',
`popularity` int(11) DEFAULT '0',
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`id`),
KEY `osp_pop_index` (`osp_id`,`year_col`,`month_col`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=252488 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for open_source_projects
-- ----------------------------
DROP TABLE IF EXISTS `open_source_projects`;
CREATE TABLE `open_source_projects` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`description` text,
`followers_num` int(11) DEFAULT '0',
`url` text,
`language` varchar(255) DEFAULT NULL,
`download_num` int(11) DEFAULT '0',
`view_num_crawled` int(11) DEFAULT '0',
`category` varchar(255) DEFAULT NULL,
`crawled_time` datetime DEFAULT NULL,
`source` varchar(255) DEFAULT NULL,
`view_num_local` int(11) DEFAULT '0',
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
`composite_score` float DEFAULT '0',
`relative_memos_num` int(11) DEFAULT NULL,
`created_time` datetime DEFAULT NULL,
`updated_time` datetime DEFAULT NULL,
`view_num` int(11) DEFAULT '0',
`activeness` int(11) DEFAULT '0',
`tags` varchar(2000) DEFAULT '',
`tags_for_search` varchar(2000) DEFAULT NULL,
`synonyms` text,
PRIMARY KEY (`id`),
KEY `index_open_source_projects_on_download_num` (`download_num`) USING BTREE,
KEY `index_open_source_projects_on_created_at` (`created_at`) USING BTREE,
KEY `index_open_source_projects_on_ossean_score` (`composite_score`) USING BTREE,
KEY `index_open_source_projects_on_name` (`name`) USING BTREE,
KEY `index_open_source_projects_on_relative_memos_num` (`relative_memos_num`) USING BTREE,
KEY `index_open_source_projects_on_view_num` (`view_num`) USING BTREE,
KEY `index_open_source_projects_on_activeness` (`activeness`) USING BTREE,
KEY `index_open_source_projects_on_composite_score` (`composite_score`) USING BTREE,
KEY `index_open_source_projects_on_source` (`source`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=358430 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for open_source_projects_copy
-- ----------------------------
DROP TABLE IF EXISTS `open_source_projects_copy`;
CREATE TABLE `open_source_projects_copy` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`description` longtext,
`followers_num` int(11) DEFAULT '0',
`url` text,
`language` varchar(1000) DEFAULT NULL,
`download_num` int(11) DEFAULT '0',
`view_num_crawled` int(11) DEFAULT '0',
`category` varchar(1000) DEFAULT NULL,
`crawled_time` datetime DEFAULT NULL,
`source` varchar(255) DEFAULT NULL,
`view_num_local` int(11) DEFAULT '0',
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
`composite_score` float DEFAULT '0',
`relative_memos_num` int(11) DEFAULT NULL,
`created_time` datetime DEFAULT NULL,
`updated_time` datetime DEFAULT NULL,
`view_num` int(11) DEFAULT '0',
`activeness` int(11) DEFAULT '0',
`tags` text,
`tags_for_search` varchar(2000) DEFAULT NULL,
`synonyms` text,
PRIMARY KEY (`id`),
KEY `index_open_source_projects_on_download_num` (`download_num`) USING BTREE,
KEY `index_open_source_projects_on_created_at` (`created_at`) USING BTREE,
KEY `index_open_source_projects_on_ossean_score` (`composite_score`) USING BTREE,
KEY `index_open_source_projects_on_name` (`name`) USING BTREE,
KEY `index_open_source_projects_on_relative_memos_num` (`relative_memos_num`) USING BTREE,
KEY `index_open_source_projects_on_view_num` (`view_num`) USING BTREE,
KEY `index_open_source_projects_on_activeness` (`activeness`) USING BTREE,
KEY `index_open_source_projects_on_composite_score` (`composite_score`) USING BTREE,
KEY `index_open_source_projects_on_source` (`source`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=664682 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for ossean_monitors
-- ----------------------------
@ -1260,21 +1127,6 @@ CREATE TABLE `pointers` (
PRIMARY KEY (`Id`)
) ENGINE=InnoDB AUTO_INCREMENT=52 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for praise_tread_caches
-- ----------------------------
DROP TABLE IF EXISTS `praise_tread_caches`;
CREATE TABLE `praise_tread_caches` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`object_id` int(11) NOT NULL,
`object_type` varchar(255) DEFAULT NULL,
`praise_num` int(11) DEFAULT NULL,
`tread_num` int(11) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for praise_treads
-- ----------------------------
@ -1291,34 +1143,20 @@ CREATE TABLE `praise_treads` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for project_infos
-- Table structure for praise_tread_caches
-- ----------------------------
DROP TABLE IF EXISTS `project_infos`;
CREATE TABLE `project_infos` (
DROP TABLE IF EXISTS `praise_tread_caches`;
CREATE TABLE `praise_tread_caches` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`project_id` int(11) DEFAULT NULL,
`user_id` int(11) DEFAULT NULL,
`object_id` int(11) NOT NULL,
`object_type` varchar(255) DEFAULT NULL,
`praise_num` int(11) DEFAULT NULL,
`tread_num` int(11) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for project_statuses
-- ----------------------------
DROP TABLE IF EXISTS `project_statuses`;
CREATE TABLE `project_statuses` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`changesets_count` int(11) DEFAULT NULL,
`watchers_count` int(11) DEFAULT NULL,
`project_id` int(11) DEFAULT NULL,
`project_type` int(11) DEFAULT NULL,
`grade` float DEFAULT '0',
`course_ac_para` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `index_project_statuses_on_grade` (`grade`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for projecting_softapplictions
-- ----------------------------
@ -1371,6 +1209,35 @@ CREATE TABLE `projects_trackers` (
KEY `projects_trackers_project_id` (`project_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for project_infos
-- ----------------------------
DROP TABLE IF EXISTS `project_infos`;
CREATE TABLE `project_infos` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`project_id` int(11) DEFAULT NULL,
`user_id` int(11) DEFAULT NULL,
`created_at` datetime NOT NULL,
`updated_at` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for project_statuses
-- ----------------------------
DROP TABLE IF EXISTS `project_statuses`;
CREATE TABLE `project_statuses` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`changesets_count` int(11) DEFAULT NULL,
`watchers_count` int(11) DEFAULT NULL,
`project_id` int(11) DEFAULT NULL,
`project_type` int(11) DEFAULT NULL,
`grade` float DEFAULT '0',
`course_ac_para` int(11) DEFAULT '0',
PRIMARY KEY (`id`),
KEY `index_project_statuses_on_grade` (`grade`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for queries
-- ----------------------------
@ -1431,6 +1298,34 @@ CREATE TABLE `relative_bugs` (
KEY `url` (`url`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for relative_memos
-- ----------------------------
DROP TABLE IF EXISTS `relative_memos`;
CREATE TABLE `relative_memos` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL DEFAULT '',
`content` longtext,
`created_time` datetime DEFAULT NULL,
`updated_time` datetime DEFAULT NULL,
`type` varchar(255) DEFAULT '',
`tags` varchar(2000) DEFAULT '',
`source` varchar(255) DEFAULT '',
`url` varchar(255) DEFAULT '',
`url_md5` varchar(36) DEFAULT NULL,
`author` varchar(255) DEFAULT NULL,
`author_url` varchar(255) DEFAULT NULL,
`view_num` int(11) DEFAULT '0',
`review_num` int(11) DEFAULT '0',
`view_num_ossean` int(11) DEFAULT '0',
`extracted_time` datetime NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `index_relative_memos_on_url_md5` (`url_md5`) USING BTREE,
KEY `search_memo_type` (`type`) USING BTREE,
KEY `index_relative_memos_on_url` (`url`) USING BTREE,
KEY `index_relative_memos_on_source` (`source`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for relative_memo_to_open_source_projects
-- ----------------------------
@ -3003,94 +2898,6 @@ CREATE TABLE `relative_memo_to_open_source_projects_9` (
KEY `has_synchronized_index_9` (`has_synchronized`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=17067850 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for relative_memo_to_open_source_projects_new
-- ----------------------------
DROP TABLE IF EXISTS `relative_memo_to_open_source_projects_new`;
CREATE TABLE `relative_memo_to_open_source_projects_new` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`osp_id` int(11) NOT NULL,
`relative_memo_id` int(11) NOT NULL,
`match_weight` float DEFAULT '0',
`created_time` datetime DEFAULT NULL,
`replies_num` int(11) DEFAULT NULL,
`updated_time` datetime DEFAULT NULL,
`view_num_crawled` int(11) DEFAULT NULL,
`vote_up_num` int(11) DEFAULT NULL,
`collection_num` int(11) DEFAULT NULL,
`memo_type` varchar(255) DEFAULT NULL,
`category` varchar(255) DEFAULT NULL,
`view_num_trustie` int(11) DEFAULT NULL,
`has_synchronized` tinyint(1) DEFAULT '0',
`match_time` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `composite_id_by_ospId_relativeMemoId` (`osp_id`,`relative_memo_id`) USING BTREE,
KEY `match_weight_sort` (`match_weight`) USING BTREE,
KEY `find_by_osp_id` (`osp_id`) USING BTREE,
KEY `osp_id_weight_query` (`osp_id`,`match_weight`) USING BTREE,
KEY `relative_memo_to_osp_osp_id_created` (`osp_id`,`created_time`) USING BTREE,
KEY `relative_memo_to_osp_osp_id_replies_num` (`osp_id`,`replies_num`) USING BTREE,
KEY `check_if_synchronized` (`has_synchronized`) USING BTREE,
KEY `relative_memo_id_index` (`relative_memo_id`) USING BTREE,
KEY `relative_memo_to_osp_osp_id_view_num_crawled` (`osp_id`,`view_num_crawled`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for relative_memos
-- ----------------------------
DROP TABLE IF EXISTS `relative_memos`;
CREATE TABLE `relative_memos` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`osp_id` int(11) DEFAULT '0',
`subject` varchar(255) NOT NULL DEFAULT '',
`content` longtext,
`author` varchar(255) DEFAULT '',
`replies_num` int(11) DEFAULT '0',
`lock` tinyint(1) DEFAULT '0',
`sticky` tinyint(1) DEFAULT '0',
`created_at` datetime DEFAULT NULL,
`updated_at` datetime DEFAULT NULL,
`url` varchar(255) DEFAULT '',
`view_num_crawled` int(11) DEFAULT '0',
`vote_up_num` int(11) DEFAULT '0',
`collection_num` int(11) DEFAULT '0',
`abstract` text,
`memo_type` varchar(255) DEFAULT '',
`source` varchar(255) DEFAULT '',
`category` varchar(255) DEFAULT '',
`view_num_trustie` int(11) DEFAULT '0',
`author_id` int(11) DEFAULT '0',
`last_reply_id` int(11) DEFAULT '0',
`is_quote` int(11) DEFAULT '0',
`username` varchar(255) DEFAULT '',
`userhomeurl` varchar(255) DEFAULT '',
`parent_id` int(11) DEFAULT '0',
`crawled_time` datetime NOT NULL,
`created_time` datetime DEFAULT NULL,
`updated_time` datetime DEFAULT NULL,
`url_md5` varchar(36) DEFAULT NULL,
`author_url` varchar(255) DEFAULT NULL,
`tags` varchar(2000) DEFAULT '',
PRIMARY KEY (`id`),
UNIQUE KEY `index_relative_memos_on_url_md5` (`url_md5`) USING BTREE,
KEY `sort_replied_count` (`replies_num`) USING BTREE,
KEY `search_parent_memo` (`parent_id`) USING BTREE,
KEY `search_memo_type` (`memo_type`) USING BTREE,
KEY `index_relative_memos_on_url` (`url`) USING BTREE,
KEY `index_relative_memos_on_source` (`source`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=5505336 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for relative_memos_song
-- ----------------------------
DROP TABLE IF EXISTS `relative_memos_song`;
CREATE TABLE `relative_memos_song` (
`id` int(11) NOT NULL DEFAULT '0',
`subject` varchar(255) NOT NULL DEFAULT '',
`author` varchar(255) DEFAULT '',
`tags` varchar(2000) DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for repositories
-- ----------------------------
@ -3224,18 +3031,6 @@ CREATE TABLE `simility_recommends` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1593545 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-- ----------------------------
-- Table structure for simility_recommends_copy
-- ----------------------------
DROP TABLE IF EXISTS `simility_recommends_copy`;
CREATE TABLE `simility_recommends_copy` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`osp_id` int(11) DEFAULT NULL,
`relative_osp_id` int(11) DEFAULT NULL,
`weight` float DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- ----------------------------
-- Table structure for softapplications
-- ----------------------------
@ -3309,31 +3104,6 @@ CREATE TABLE `taggings` (
KEY `get_osp_tags_to_show` (`taggable_id`,`taggable_type`,`disagree_num`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=53633788 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for taggings_copy
-- ----------------------------
DROP TABLE IF EXISTS `taggings_copy`;
CREATE TABLE `taggings_copy` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`tag_id` int(11) NOT NULL,
`taggable_id` int(11) NOT NULL,
`taggable_type` varchar(255) NOT NULL,
`tagger_id` int(11) DEFAULT NULL,
`tagger_type` varchar(255) DEFAULT NULL,
`context` varchar(128) DEFAULT NULL,
`created_at` datetime DEFAULT NULL,
`created_time` datetime DEFAULT NULL,
`disagree_num` int(11) DEFAULT '0',
`tag_source` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `index_taggings_on_tag_id_and_taggable_id_and_taggable_type` (`tag_id`,`taggable_id`,`taggable_type`) USING BTREE,
KEY `index_taggings_on_tag_id` (`tag_id`) USING BTREE,
KEY `index_taggings_on_taggable_id_and_taggable_type_and_context` (`taggable_id`,`taggable_type`,`context`) USING BTREE,
KEY `get_osp_tags_to_show` (`taggable_id`,`taggable_type`,`disagree_num`) USING BTREE,
CONSTRAINT `taggings_copy_ibfk_1` FOREIGN KEY (`taggable_id`) REFERENCES `open_source_projects_copy` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `taggings_copy_ibfk_2` FOREIGN KEY (`tag_id`) REFERENCES `tags_copy` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=1062871 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for tags
-- ----------------------------
@ -3346,18 +3116,6 @@ CREATE TABLE `tags` (
KEY `index_tags_on_name` (`name`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=63707956 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for tags_copy
-- ----------------------------
DROP TABLE IF EXISTS `tags_copy`;
CREATE TABLE `tags_copy` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `unique_name_index` (`name`) USING BTREE,
KEY `index_tags_on_name` (`name`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1058704 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for teachers
-- ----------------------------
@ -3439,6 +3197,34 @@ CREATE TABLE `trackers` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for users
-- ----------------------------
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`login` varchar(255) NOT NULL DEFAULT '',
`hashed_password` varchar(40) NOT NULL DEFAULT '',
`firstname` varchar(30) NOT NULL DEFAULT '',
`lastname` varchar(255) NOT NULL DEFAULT '',
`mail` varchar(60) NOT NULL DEFAULT '',
`admin` tinyint(1) NOT NULL DEFAULT '0',
`status` int(11) NOT NULL DEFAULT '1',
`last_login_on` datetime DEFAULT NULL,
`language` varchar(5) DEFAULT '',
`auth_source_id` int(11) DEFAULT NULL,
`created_on` datetime DEFAULT NULL,
`updated_on` datetime DEFAULT NULL,
`type` varchar(255) DEFAULT NULL,
`identity_url` varchar(255) DEFAULT NULL,
`mail_notification` varchar(255) NOT NULL DEFAULT '',
`salt` varchar(64) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `index_users_on_id_and_type` (`id`,`type`) USING BTREE,
KEY `index_users_on_auth_source_id` (`auth_source_id`) USING BTREE,
KEY `index_users_on_type` (`type`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=160 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for user_extensions
-- ----------------------------
@ -3553,34 +3339,6 @@ CREATE TABLE `user_statuses` (
KEY `index_user_statuses_on_grade` (`grade`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=158 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for users
-- ----------------------------
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`login` varchar(255) NOT NULL DEFAULT '',
`hashed_password` varchar(40) NOT NULL DEFAULT '',
`firstname` varchar(30) NOT NULL DEFAULT '',
`lastname` varchar(255) NOT NULL DEFAULT '',
`mail` varchar(60) NOT NULL DEFAULT '',
`admin` tinyint(1) NOT NULL DEFAULT '0',
`status` int(11) NOT NULL DEFAULT '1',
`last_login_on` datetime DEFAULT NULL,
`language` varchar(5) DEFAULT '',
`auth_source_id` int(11) DEFAULT NULL,
`created_on` datetime DEFAULT NULL,
`updated_on` datetime DEFAULT NULL,
`type` varchar(255) DEFAULT NULL,
`identity_url` varchar(255) DEFAULT NULL,
`mail_notification` varchar(255) NOT NULL DEFAULT '',
`salt` varchar(64) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `index_users_on_id_and_type` (`id`,`type`) USING BTREE,
KEY `index_users_on_auth_source_id` (`auth_source_id`) USING BTREE,
KEY `index_users_on_type` (`type`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=160 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for versions
-- ----------------------------
@ -3617,22 +3375,16 @@ CREATE TABLE `watchers` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for wiki_content_versions
-- Table structure for wikis
-- ----------------------------
DROP TABLE IF EXISTS `wiki_content_versions`;
CREATE TABLE `wiki_content_versions` (
DROP TABLE IF EXISTS `wikis`;
CREATE TABLE `wikis` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`wiki_content_id` int(11) NOT NULL,
`page_id` int(11) NOT NULL,
`author_id` int(11) DEFAULT NULL,
`data` longblob,
`compression` varchar(6) DEFAULT '',
`comments` varchar(255) DEFAULT '',
`updated_on` datetime NOT NULL,
`version` int(11) NOT NULL,
`project_id` int(11) NOT NULL,
`start_page` varchar(255) NOT NULL,
`status` int(11) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
KEY `wiki_content_versions_wcid` (`wiki_content_id`) USING BTREE,
KEY `index_wiki_content_versions_on_updated_on` (`updated_on`) USING BTREE
KEY `wikis_project_id` (`project_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
@ -3652,6 +3404,25 @@ CREATE TABLE `wiki_contents` (
KEY `index_wiki_contents_on_author_id` (`author_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for wiki_content_versions
-- ----------------------------
DROP TABLE IF EXISTS `wiki_content_versions`;
CREATE TABLE `wiki_content_versions` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`wiki_content_id` int(11) NOT NULL,
`page_id` int(11) NOT NULL,
`author_id` int(11) DEFAULT NULL,
`data` longblob,
`compression` varchar(6) DEFAULT '',
`comments` varchar(255) DEFAULT '',
`updated_on` datetime NOT NULL,
`version` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `wiki_content_versions_wcid` (`wiki_content_id`) USING BTREE,
KEY `index_wiki_content_versions_on_updated_on` (`updated_on`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for wiki_pages
-- ----------------------------
@ -3684,19 +3455,6 @@ CREATE TABLE `wiki_redirects` (
KEY `index_wiki_redirects_on_wiki_id` (`wiki_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for wikis
-- ----------------------------
DROP TABLE IF EXISTS `wikis`;
CREATE TABLE `wikis` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`project_id` int(11) NOT NULL,
`start_page` varchar(255) NOT NULL,
`status` int(11) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
KEY `wikis_project_id` (`project_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for workflows
-- ----------------------------
@ -3723,19 +3481,19 @@ CREATE TABLE `workflows` (
-- View structure for match_result_new
-- ----------------------------
DROP VIEW IF EXISTS `match_result_new`;
CREATE ALGORITHM=UNDEFINED DEFINER=`trustie`@`%` SQL SECURITY DEFINER VIEW `match_result_new` AS select `ro`.`relative_memo_id` AS `post_id`,`ro`.`osp_id` AS `project_id`,`r`.`author` AS `post_author`,`r`.`subject` AS `post_title`,`r`.`created_time` AS `post_time`,`o`.`created_time` AS `project_time`,`o`.`name` AS `project_name`,`ro`.`match_weight` AS `match_weight` from ((`relative_memos` `r` join `open_source_projects` `o`) join `relative_memo_to_open_source_projects` `ro`) where ((`ro`.`osp_id` = `o`.`id`) and (`ro`.`relative_memo_id` = `r`.`id`) and (`r`.`source` = 'StackOverFlow') and (`o`.`source` like '%OSChina%')) ;
CREATE ALGORITHM=UNDEFINED DEFINER=`trustie`@`%` SQL SECURITY DEFINER VIEW `match_result_new` AS select `ro`.`relative_memo_id` AS `post_id`,`ro`.`osp_id` AS `project_id`,`r`.`author` AS `post_author`,`r`.`subject` AS `post_title`,`r`.`created_time` AS `post_time`,`o`.`created_time` AS `project_time`,`o`.`name` AS `project_name`,`ro`.`match_weight` AS `match_weight` from ((`relative_memos` `r` join `open_source_projects` `o`) join `relative_memo_to_open_source_projects` `ro`) where ((`ro`.`osp_id` = `o`.`id`) and (`ro`.`relative_memo_id` = `r`.`id`) and (`r`.`source` = 'StackOverFlow') and (`o`.`source` like '%OSChina%')) ; ;
-- ----------------------------
-- View structure for match_result_view
-- ----------------------------
DROP VIEW IF EXISTS `match_result_view`;
CREATE ALGORITHM=UNDEFINED DEFINER=`trustie`@`%` SQL SECURITY DEFINER VIEW `match_result_view` AS select `t`.`id` AS `id`,`o`.`id` AS `osp_id`,`o`.`name` AS `name`,`o`.`tags` AS `osp_tags`,`r`.`subject` AS `subject`,`r`.`tags` AS `memo_tags`,`t`.`match_weight` AS `match_weight`,`r`.`id` AS `relative_memo_id`,`o`.`source` AS `prj_source`,`r`.`source` AS `relative_memo_source`,`r`.`author` AS `author` from ((`open_source_projects` `o` join `relative_memo_to_open_source_projects_new` `t` on((`o`.`id` = `t`.`osp_id`))) join `relative_memos` `r` on((`r`.`id` = `t`.`relative_memo_id`))) ;
CREATE ALGORITHM=UNDEFINED DEFINER=`trustie`@`%` SQL SECURITY DEFINER VIEW `match_result_view` AS select `t`.`id` AS `id`,`o`.`id` AS `osp_id`,`o`.`name` AS `name`,`o`.`tags` AS `osp_tags`,`r`.`subject` AS `subject`,`r`.`tags` AS `memo_tags`,`t`.`match_weight` AS `match_weight`,`r`.`id` AS `relative_memo_id`,`o`.`source` AS `prj_source`,`r`.`source` AS `relative_memo_source`,`r`.`author` AS `author` from ((`open_source_projects` `o` join `relative_memo_to_open_source_projects_new` `t` on((`o`.`id` = `t`.`osp_id`))) join `relative_memos` `r` on((`r`.`id` = `t`.`relative_memo_id`))) ; ;
-- ----------------------------
-- View structure for match_result_view_for_wuming
-- ----------------------------
DROP VIEW IF EXISTS `match_result_view_for_wuming`;
CREATE ALGORITHM=UNDEFINED DEFINER=`trustie`@`%` SQL SECURITY DEFINER VIEW `match_result_view_for_wuming` AS select `t`.`id` AS `id`,`o`.`id` AS `osp_id`,`o`.`name` AS `name`,`o`.`tags` AS `osp_tags`,`r`.`subject` AS `subject`,`r`.`tags` AS `memo_tags`,`t`.`match_weight` AS `match_weight`,`r`.`id` AS `relative_memo_id`,`o`.`source` AS `prj_source`,`r`.`source` AS `relative_memo_source`,`r`.`author` AS `author`,`o`.`created_time` AS `prj_created_time`,`r`.`created_time` AS `relative_memo_created_time` from ((`open_source_projects` `o` join `relative_memo_to_open_source_projects_new` `t` on((`o`.`id` = `t`.`osp_id`))) join `relative_memos` `r` on((`r`.`id` = `t`.`relative_memo_id`))) where ((`o`.`source` like '%OSChina%') and (`r`.`source` = 'StackOverFlow')) ;
CREATE ALGORITHM=UNDEFINED DEFINER=`trustie`@`%` SQL SECURITY DEFINER VIEW `match_result_view_for_wuming` AS select `t`.`id` AS `id`,`o`.`id` AS `osp_id`,`o`.`name` AS `name`,`o`.`tags` AS `osp_tags`,`r`.`subject` AS `subject`,`r`.`tags` AS `memo_tags`,`t`.`match_weight` AS `match_weight`,`r`.`id` AS `relative_memo_id`,`o`.`source` AS `prj_source`,`r`.`source` AS `relative_memo_source`,`r`.`author` AS `author`,`o`.`created_time` AS `prj_created_time`,`r`.`created_time` AS `relative_memo_created_time` from ((`open_source_projects` `o` join `relative_memo_to_open_source_projects_new` `t` on((`o`.`id` = `t`.`osp_id`))) join `relative_memos` `r` on((`r`.`id` = `t`.`relative_memo_id`))) where ((`o`.`source` like '%OSChina%') and (`r`.`source` = 'StackOverFlow')) ; ;
-- ----------------------------
-- View structure for stackoverflow_sql_view

View File

@ -1,44 +0,0 @@
/*
Navicat MySQL Data Transfer
Source Server : ossean
Source Server Version : 50535
Source Host : localhost:3306
Source Database : ossean_new
Target Server Type : MYSQL
Target Server Version : 50535
File Encoding : 65001
Date: 2016-01-23 21:23:33
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for relative_memos
-- ----------------------------
DROP TABLE IF EXISTS `relative_memos`;
CREATE TABLE `relative_memos` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL DEFAULT '',
`content` longtext,
`created_time` datetime DEFAULT NULL,
`updated_time` datetime DEFAULT NULL,
`type` varchar(255) DEFAULT '',
`tags` varchar(2000) DEFAULT '',
`source` varchar(255) DEFAULT '',
`url` varchar(255) DEFAULT '',
`url_md5` varchar(36) DEFAULT NULL,
`author` varchar(255) DEFAULT NULL,
`author_url` varchar(255) DEFAULT NULL,
`view_num` int(11) DEFAULT '0',
`review_num` int(11) DEFAULT '0',
`view_num_ossean` int(11) DEFAULT '0',
`extracted_time` datetime NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `index_relative_memos_on_url_md5` (`url_md5`) USING BTREE,
KEY `search_memo_type` (`type`) USING BTREE,
KEY `index_relative_memos_on_url` (`url`) USING BTREE,
KEY `index_relative_memos_on_source` (`source`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;