sonar echarts
This commit is contained in:
parent
18c8d99a9e
commit
3d57752d9f
5
Gemfile
5
Gemfile
|
@ -4,9 +4,9 @@ unless RUBY_PLATFORM =~ /w32/
|
||||||
# unix-like only
|
# unix-like only
|
||||||
gem 'iconv'
|
gem 'iconv'
|
||||||
if RUBY_PLATFORM =~ /darwin/
|
if RUBY_PLATFORM =~ /darwin/
|
||||||
gem "rmagick", "= 2.15.4" ## osx must be this version
|
# gem "rmagick", "= 2.15.4" ## osx must be this version
|
||||||
elsif RUBY_PLATFORM =~ /linux/
|
elsif RUBY_PLATFORM =~ /linux/
|
||||||
gem "rmagick", "~> 2.13.1" ## centos yum install ImageMagick-devel
|
# gem "rmagick", "~> 2.13.1" ## centos yum install ImageMagick-devel
|
||||||
end
|
end
|
||||||
gem 'certified'
|
gem 'certified'
|
||||||
gem 'net-ssh', '2.9.1'
|
gem 'net-ssh', '2.9.1'
|
||||||
|
@ -54,6 +54,7 @@ gem 'elasticsearch-rails'
|
||||||
|
|
||||||
### profile
|
### profile
|
||||||
# gem 'oneapm_rpm'
|
# gem 'oneapm_rpm'
|
||||||
|
gem 'therubyracer'
|
||||||
|
|
||||||
group :development do
|
group :development do
|
||||||
gem 'grape-swagger'
|
gem 'grape-swagger'
|
||||||
|
|
|
@ -1,28 +1,82 @@
|
||||||
<%= javascript_include_tag 'highcharts','highcharts-more' %>
|
<%= javascript_include_tag 'highcharts','highcharts-more' %>
|
||||||
<%= javascript_include_tag 'echarts.min' %>
|
<%= javascript_include_tag 'echarts.min','echarts' %>
|
||||||
<div id="main" style="width: 600px;height:400px;"></div>
|
<div id="main" style="width: 1000px;height:500px;"></div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
// 基于准备好的dom,初始化echarts实例
|
// 基于准备好的dom,初始化echarts实例
|
||||||
var myChart = echarts.init(document.getElementById('main'));
|
var myChart = echarts.init(document.getElementById('main'));
|
||||||
|
|
||||||
// 指定图表的配置项和数据
|
// 指定图表的配置项和数据
|
||||||
|
|
||||||
|
var data = [
|
||||||
|
[[28604,77,17096869,'Australia',1990],[31163,77.4,27662440,'Canada',1990],[1516,68,1154605773,'China',1990],[13670,74.7,10582082,'Cuba',1990],[28599,75,4986705,'Finland',1990],[29476,77.1,56943299,'France',1990],[31476,75.4,78958237,'Germany',1990],[28666,78.1,254830,'Iceland',1990],[1777,57.7,870601776,'India',1990],[29550,79.1,122249285,'Japan',1990],[2076,67.9,20194354,'North Korea',1990],[12087,72,42972254,'South Korea',1990],[24021,75.4,3397534,'New Zealand',1990],[43296,76.8,4240375,'Norway',1990],[10088,70.8,38195258,'Poland',1990],[19349,69.6,147568552,'Russia',1990],[10670,67.3,53994605,'Turkey',1990],[26424,75.7,57110117,'United Kingdom',1990],[37062,75.4,252847810,'United States',1990]],
|
||||||
|
];
|
||||||
|
|
||||||
var option = {
|
var option = {
|
||||||
|
backgroundColor: new echarts.graphic.RadialGradient(0.3, 0.3, 0.8, [{
|
||||||
|
offset: 0,
|
||||||
|
color: '#fff'
|
||||||
|
}, {
|
||||||
|
offset: 1,
|
||||||
|
color: '#fff'
|
||||||
|
}]),
|
||||||
title: {
|
title: {
|
||||||
text: 'ECharts 入门示例'
|
text: '1990 与 2015 年各国家人均寿命与 GDP'
|
||||||
},
|
},
|
||||||
tooltip: {},
|
|
||||||
legend: {
|
legend: {
|
||||||
data:['销量']
|
right: 10,
|
||||||
|
data: ['1990']
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
data: ["衬衫","羊毛衫","雪纺衫","裤子","高跟鞋","袜子"]
|
name: 'Complex',
|
||||||
|
splitLine: {
|
||||||
|
lineStyle: {
|
||||||
|
type: 'dashed'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
yAxis:{
|
||||||
|
name: 'Issue',
|
||||||
|
splitLine: {
|
||||||
|
lineStyle: {
|
||||||
|
type: 'dashed'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
scale: true
|
||||||
},
|
},
|
||||||
yAxis: {},
|
|
||||||
series: [{
|
series: [{
|
||||||
name: '销量',
|
name: '1990',
|
||||||
type: 'bar',
|
data: data[0],
|
||||||
data: [5, 20, 36, 10, 10, 20]
|
type: 'scatter',
|
||||||
}]
|
symbolSize: function (data) {
|
||||||
|
return Math.sqrt(data[2]) / 5e2;
|
||||||
|
},
|
||||||
|
label: {
|
||||||
|
emphasis: {
|
||||||
|
show: true,
|
||||||
|
formatter: function (param) {
|
||||||
|
return param.data[3];
|
||||||
|
},
|
||||||
|
position: 'top'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
itemStyle: {
|
||||||
|
normal: {
|
||||||
|
shadowBlur: 10,
|
||||||
|
shadowColor: 'rgba(120, 36, 50, 0.5)',
|
||||||
|
shadowOffsetY: 5,
|
||||||
|
color: new echarts.graphic.RadialGradient(0.4, 0.3, 1, [{
|
||||||
|
offset: 0,
|
||||||
|
color: 'rgb(129, 227, 238)'
|
||||||
|
// color: 'rgb(251, 118, 123)'
|
||||||
|
}, {
|
||||||
|
offset: 1,
|
||||||
|
color: 'rgb(25, 183, 207)'
|
||||||
|
// color: 'rgb(204, 46, 72)'
|
||||||
|
}])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
// 使用刚指定的配置项和数据显示图表。
|
// 使用刚指定的配置项和数据显示图表。
|
||||||
|
|
439
db/schema.rb
439
db/schema.rb
|
@ -11,7 +11,8 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended to check this file into your version control system.
|
# It's strongly recommended to check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(:version => 20161223083022) do
|
ActiveRecord::Schema.define(:version => 20170106024520) do
|
||||||
|
|
||||||
create_table "activities", :force => true do |t|
|
create_table "activities", :force => true do |t|
|
||||||
t.integer "act_id", :null => false
|
t.integer "act_id", :null => false
|
||||||
t.string "act_type", :null => false
|
t.string "act_type", :null => false
|
||||||
|
@ -51,6 +52,28 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
|
||||||
add_index "api_keys", ["access_token"], :name => "index_api_keys_on_access_token"
|
add_index "api_keys", ["access_token"], :name => "index_api_keys_on_access_token"
|
||||||
add_index "api_keys", ["user_id"], :name => "index_api_keys_on_user_id"
|
add_index "api_keys", ["user_id"], :name => "index_api_keys_on_user_id"
|
||||||
|
|
||||||
|
create_table "application_settings", :force => true do |t|
|
||||||
|
t.integer "default_projects_limit"
|
||||||
|
t.boolean "signup_enabled"
|
||||||
|
t.boolean "signin_enabled"
|
||||||
|
t.boolean "gravatar_enabled"
|
||||||
|
t.text "sign_in_text"
|
||||||
|
t.datetime "created_at"
|
||||||
|
t.datetime "updated_at"
|
||||||
|
t.string "home_page_url"
|
||||||
|
t.integer "default_branch_protection", :default => 2
|
||||||
|
t.boolean "twitter_sharing_enabled", :default => true
|
||||||
|
t.text "restricted_visibility_levels"
|
||||||
|
t.boolean "version_check_enabled", :default => true
|
||||||
|
t.integer "max_attachment_size", :default => 10, :null => false
|
||||||
|
t.integer "default_project_visibility"
|
||||||
|
t.integer "default_snippet_visibility"
|
||||||
|
t.text "restricted_signup_domains"
|
||||||
|
t.boolean "user_oauth_applications", :default => true
|
||||||
|
t.string "after_sign_out_path"
|
||||||
|
t.integer "session_expire_delay", :default => 10080, :null => false
|
||||||
|
end
|
||||||
|
|
||||||
create_table "applied_contests", :force => true do |t|
|
create_table "applied_contests", :force => true do |t|
|
||||||
t.integer "contest_id"
|
t.integer "contest_id"
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
|
@ -207,6 +230,20 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
|
||||||
t.string "typeName", :limit => 50
|
t.string "typeName", :limit => 50
|
||||||
end
|
end
|
||||||
|
|
||||||
|
create_table "audit_events", :force => true do |t|
|
||||||
|
t.integer "author_id", :null => false
|
||||||
|
t.string "type", :null => false
|
||||||
|
t.integer "entity_id", :null => false
|
||||||
|
t.string "entity_type", :null => false
|
||||||
|
t.text "details"
|
||||||
|
t.datetime "created_at"
|
||||||
|
t.datetime "updated_at"
|
||||||
|
end
|
||||||
|
|
||||||
|
add_index "audit_events", ["author_id"], :name => "index_audit_events_on_author_id"
|
||||||
|
add_index "audit_events", ["entity_id", "entity_type"], :name => "index_audit_events_on_entity_id_and_entity_type"
|
||||||
|
add_index "audit_events", ["type"], :name => "index_audit_events_on_type"
|
||||||
|
|
||||||
create_table "auth_sources", :force => true do |t|
|
create_table "auth_sources", :force => true do |t|
|
||||||
t.string "type", :limit => 30, :default => "", :null => false
|
t.string "type", :limit => 30, :default => "", :null => false
|
||||||
t.string "name", :limit => 60, :default => "", :null => false
|
t.string "name", :limit => 60, :default => "", :null => false
|
||||||
|
@ -308,6 +345,17 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
|
||||||
add_index "boards", ["last_message_id"], :name => "index_boards_on_last_message_id"
|
add_index "boards", ["last_message_id"], :name => "index_boards_on_last_message_id"
|
||||||
add_index "boards", ["project_id"], :name => "boards_project_id"
|
add_index "boards", ["project_id"], :name => "boards_project_id"
|
||||||
|
|
||||||
|
create_table "broadcast_messages", :force => true do |t|
|
||||||
|
t.text "message", :null => false
|
||||||
|
t.datetime "starts_at"
|
||||||
|
t.datetime "ends_at"
|
||||||
|
t.integer "alert_type"
|
||||||
|
t.datetime "created_at"
|
||||||
|
t.datetime "updated_at"
|
||||||
|
t.string "color"
|
||||||
|
t.string "font"
|
||||||
|
end
|
||||||
|
|
||||||
create_table "bug_to_osps", :force => true do |t|
|
create_table "bug_to_osps", :force => true do |t|
|
||||||
t.integer "osp_id"
|
t.integer "osp_id"
|
||||||
t.integer "relative_memo_id"
|
t.integer "relative_memo_id"
|
||||||
|
@ -566,6 +614,7 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
|
||||||
t.boolean "is_delete", :default => false
|
t.boolean "is_delete", :default => false
|
||||||
t.datetime "created_at", :null => false
|
t.datetime "created_at", :null => false
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
|
t.integer "judge_score"
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "contestant_works", ["project_id"], :name => "index_contestant_works_on_project_id"
|
add_index "contestant_works", ["project_id"], :name => "index_contestant_works_on_project_id"
|
||||||
|
@ -614,20 +663,6 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
|
||||||
t.integer "container_id", :default => 0
|
t.integer "container_id", :default => 0
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "course_class_post", :id => false, :force => true do |t|
|
|
||||||
t.integer "班级id", :default => 0, :null => false
|
|
||||||
t.string "班级名"
|
|
||||||
t.integer "帖子id", :default => 0, :null => false
|
|
||||||
t.integer "主贴id"
|
|
||||||
t.string "帖子标题", :default => "", :null => false
|
|
||||||
t.text "帖子内容"
|
|
||||||
t.integer "帖子用户id"
|
|
||||||
t.integer "帖子回复数", :default => 0, :null => false
|
|
||||||
t.integer "最后回帖id"
|
|
||||||
t.datetime "发帖时间", :null => false
|
|
||||||
t.datetime "帖子更新时间", :null => false
|
|
||||||
end
|
|
||||||
|
|
||||||
create_table "course_contributor_scores", :force => true do |t|
|
create_table "course_contributor_scores", :force => true do |t|
|
||||||
t.integer "course_id"
|
t.integer "course_id"
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
|
@ -802,6 +837,15 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
|
||||||
|
|
||||||
add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority"
|
add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority"
|
||||||
|
|
||||||
|
create_table "deploy_keys_projects", :force => true do |t|
|
||||||
|
t.integer "deploy_key_id", :null => false
|
||||||
|
t.integer "project_id", :null => false
|
||||||
|
t.datetime "created_at"
|
||||||
|
t.datetime "updated_at"
|
||||||
|
end
|
||||||
|
|
||||||
|
add_index "deploy_keys_projects", ["project_id"], :name => "index_deploy_keys_projects_on_project_id"
|
||||||
|
|
||||||
create_table "discuss_demos", :force => true do |t|
|
create_table "discuss_demos", :force => true do |t|
|
||||||
t.string "title"
|
t.string "title"
|
||||||
t.text "body"
|
t.text "body"
|
||||||
|
@ -851,6 +895,16 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
|
||||||
t.datetime "created_at"
|
t.datetime "created_at"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
create_table "emails", :force => true do |t|
|
||||||
|
t.integer "user_id", :null => false
|
||||||
|
t.string "email", :null => false
|
||||||
|
t.datetime "created_at"
|
||||||
|
t.datetime "updated_at"
|
||||||
|
end
|
||||||
|
|
||||||
|
add_index "emails", ["email"], :name => "index_emails_on_email", :unique => true
|
||||||
|
add_index "emails", ["user_id"], :name => "index_emails_on_user_id"
|
||||||
|
|
||||||
create_table "enabled_modules", :force => true do |t|
|
create_table "enabled_modules", :force => true do |t|
|
||||||
t.integer "project_id"
|
t.integer "project_id"
|
||||||
t.string "name", :null => false
|
t.string "name", :null => false
|
||||||
|
@ -873,6 +927,25 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
|
||||||
add_index "enumerations", ["id", "type"], :name => "index_enumerations_on_id_and_type"
|
add_index "enumerations", ["id", "type"], :name => "index_enumerations_on_id_and_type"
|
||||||
add_index "enumerations", ["project_id"], :name => "index_enumerations_on_project_id"
|
add_index "enumerations", ["project_id"], :name => "index_enumerations_on_project_id"
|
||||||
|
|
||||||
|
create_table "events", :force => true do |t|
|
||||||
|
t.string "target_type"
|
||||||
|
t.integer "target_id"
|
||||||
|
t.string "title"
|
||||||
|
t.text "data"
|
||||||
|
t.integer "project_id"
|
||||||
|
t.datetime "created_at"
|
||||||
|
t.datetime "updated_at"
|
||||||
|
t.integer "action"
|
||||||
|
t.integer "author_id"
|
||||||
|
end
|
||||||
|
|
||||||
|
add_index "events", ["action"], :name => "index_events_on_action"
|
||||||
|
add_index "events", ["author_id"], :name => "index_events_on_author_id"
|
||||||
|
add_index "events", ["created_at"], :name => "index_events_on_created_at"
|
||||||
|
add_index "events", ["project_id"], :name => "index_events_on_project_id"
|
||||||
|
add_index "events", ["target_id"], :name => "index_events_on_target_id"
|
||||||
|
add_index "events", ["target_type"], :name => "index_events_on_target_type"
|
||||||
|
|
||||||
create_table "exercise_answers", :force => true do |t|
|
create_table "exercise_answers", :force => true do |t|
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
t.integer "exercise_question_id"
|
t.integer "exercise_question_id"
|
||||||
|
@ -927,13 +1000,11 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
|
||||||
t.integer "exercise_status"
|
t.integer "exercise_status"
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
t.integer "time"
|
t.integer "time"
|
||||||
t.datetime "created_at", :null => false
|
t.datetime "created_at", :null => false
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
t.datetime "publish_time"
|
t.datetime "publish_time"
|
||||||
t.datetime "end_time"
|
t.datetime "end_time"
|
||||||
t.integer "show_result"
|
t.integer "show_result"
|
||||||
t.integer "question_random", :default => 0
|
|
||||||
t.integer "choice_random", :default => 0
|
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "first_pages", :force => true do |t|
|
create_table "first_pages", :force => true do |t|
|
||||||
|
@ -979,6 +1050,15 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
|
||||||
add_index "forge_messages", ["forge_message_id", "forge_message_type"], :name => "index_forge_messages_on_forge_message_id_and_forge_message_type"
|
add_index "forge_messages", ["forge_message_id", "forge_message_type"], :name => "index_forge_messages_on_forge_message_id_and_forge_message_type"
|
||||||
add_index "forge_messages", ["user_id", "project_id", "created_at"], :name => "index_forge_messages_on_user_id_and_project_id_and_created_at"
|
add_index "forge_messages", ["user_id", "project_id", "created_at"], :name => "index_forge_messages_on_user_id_and_project_id_and_created_at"
|
||||||
|
|
||||||
|
create_table "forked_project_links", :force => true do |t|
|
||||||
|
t.integer "forked_to_project_id", :null => false
|
||||||
|
t.integer "forked_from_project_id", :null => false
|
||||||
|
t.datetime "created_at"
|
||||||
|
t.datetime "updated_at"
|
||||||
|
end
|
||||||
|
|
||||||
|
add_index "forked_project_links", ["forked_to_project_id"], :name => "index_forked_project_links_on_forked_to_project_id", :unique => true
|
||||||
|
|
||||||
create_table "forums", :force => true do |t|
|
create_table "forums", :force => true do |t|
|
||||||
t.string "name", :null => false
|
t.string "name", :null => false
|
||||||
t.text "description"
|
t.text "description"
|
||||||
|
@ -1078,6 +1158,7 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
t.integer "no_anon_penalty", :default => 1
|
t.integer "no_anon_penalty", :default => 1
|
||||||
t.integer "appeal_penalty", :default => 0
|
t.integer "appeal_penalty", :default => 0
|
||||||
|
t.integer "ta_mode", :default => 1
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "homework_detail_programings", :force => true do |t|
|
create_table "homework_detail_programings", :force => true do |t|
|
||||||
|
@ -1122,6 +1203,17 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
create_table "identities", :force => true do |t|
|
||||||
|
t.string "extern_uid"
|
||||||
|
t.string "provider"
|
||||||
|
t.integer "user_id"
|
||||||
|
t.datetime "created_at"
|
||||||
|
t.datetime "updated_at"
|
||||||
|
end
|
||||||
|
|
||||||
|
add_index "identities", ["created_at", "id"], :name => "index_identities_on_created_at_and_id"
|
||||||
|
add_index "identities", ["user_id"], :name => "index_identities_on_user_id"
|
||||||
|
|
||||||
create_table "invite_lists", :force => true do |t|
|
create_table "invite_lists", :force => true do |t|
|
||||||
t.integer "project_id"
|
t.integer "project_id"
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
|
@ -1271,6 +1363,20 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
|
||||||
|
|
||||||
add_index "journals_for_messages", ["root_id"], :name => "index_journals_for_messages_on_root_id"
|
add_index "journals_for_messages", ["root_id"], :name => "index_journals_for_messages_on_root_id"
|
||||||
|
|
||||||
|
create_table "keys", :force => true do |t|
|
||||||
|
t.integer "user_id"
|
||||||
|
t.datetime "created_at"
|
||||||
|
t.datetime "updated_at"
|
||||||
|
t.text "key"
|
||||||
|
t.string "title"
|
||||||
|
t.string "type"
|
||||||
|
t.string "fingerprint"
|
||||||
|
t.boolean "public", :default => false, :null => false
|
||||||
|
end
|
||||||
|
|
||||||
|
add_index "keys", ["created_at", "id"], :name => "index_keys_on_created_at_and_id"
|
||||||
|
add_index "keys", ["user_id"], :name => "index_keys_on_user_id"
|
||||||
|
|
||||||
create_table "kindeditor_assets", :force => true do |t|
|
create_table "kindeditor_assets", :force => true do |t|
|
||||||
t.string "asset"
|
t.string "asset"
|
||||||
t.integer "file_size"
|
t.integer "file_size"
|
||||||
|
@ -1282,6 +1388,27 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
|
||||||
t.integer "owner_type", :default => 0
|
t.integer "owner_type", :default => 0
|
||||||
end
|
end
|
||||||
|
|
||||||
|
create_table "label_links", :force => true do |t|
|
||||||
|
t.integer "label_id"
|
||||||
|
t.integer "target_id"
|
||||||
|
t.string "target_type"
|
||||||
|
t.datetime "created_at"
|
||||||
|
t.datetime "updated_at"
|
||||||
|
end
|
||||||
|
|
||||||
|
add_index "label_links", ["label_id"], :name => "index_label_links_on_label_id"
|
||||||
|
add_index "label_links", ["target_id", "target_type"], :name => "index_label_links_on_target_id_and_target_type"
|
||||||
|
|
||||||
|
create_table "labels", :force => true do |t|
|
||||||
|
t.string "title"
|
||||||
|
t.string "color"
|
||||||
|
t.integer "project_id"
|
||||||
|
t.datetime "created_at"
|
||||||
|
t.datetime "updated_at"
|
||||||
|
end
|
||||||
|
|
||||||
|
add_index "labels", ["project_id"], :name => "index_labels_on_project_id"
|
||||||
|
|
||||||
create_table "member_roles", :force => true do |t|
|
create_table "member_roles", :force => true do |t|
|
||||||
t.integer "member_id", :null => false
|
t.integer "member_id", :null => false
|
||||||
t.integer "role_id", :null => false
|
t.integer "role_id", :null => false
|
||||||
|
@ -1338,6 +1465,47 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
|
||||||
|
|
||||||
add_index "memos", ["root_id"], :name => "index_memos_on_root_id"
|
add_index "memos", ["root_id"], :name => "index_memos_on_root_id"
|
||||||
|
|
||||||
|
create_table "merge_request_diffs", :force => true do |t|
|
||||||
|
t.string "state"
|
||||||
|
t.text "st_commits", :limit => 2147483647
|
||||||
|
t.text "st_diffs", :limit => 2147483647
|
||||||
|
t.integer "merge_request_id", :null => false
|
||||||
|
t.datetime "created_at"
|
||||||
|
t.datetime "updated_at"
|
||||||
|
end
|
||||||
|
|
||||||
|
add_index "merge_request_diffs", ["merge_request_id"], :name => "index_merge_request_diffs_on_merge_request_id", :unique => true
|
||||||
|
|
||||||
|
create_table "merge_requests", :force => true do |t|
|
||||||
|
t.string "target_branch", :null => false
|
||||||
|
t.string "source_branch", :null => false
|
||||||
|
t.integer "source_project_id", :null => false
|
||||||
|
t.integer "author_id"
|
||||||
|
t.integer "assignee_id"
|
||||||
|
t.string "title"
|
||||||
|
t.datetime "created_at"
|
||||||
|
t.datetime "updated_at"
|
||||||
|
t.integer "milestone_id"
|
||||||
|
t.string "state"
|
||||||
|
t.string "merge_status"
|
||||||
|
t.integer "target_project_id", :null => false
|
||||||
|
t.integer "iid"
|
||||||
|
t.text "description"
|
||||||
|
t.integer "position", :default => 0
|
||||||
|
t.datetime "locked_at"
|
||||||
|
end
|
||||||
|
|
||||||
|
add_index "merge_requests", ["assignee_id"], :name => "index_merge_requests_on_assignee_id"
|
||||||
|
add_index "merge_requests", ["author_id"], :name => "index_merge_requests_on_author_id"
|
||||||
|
add_index "merge_requests", ["created_at", "id"], :name => "index_merge_requests_on_created_at_and_id"
|
||||||
|
add_index "merge_requests", ["created_at"], :name => "index_merge_requests_on_created_at"
|
||||||
|
add_index "merge_requests", ["milestone_id"], :name => "index_merge_requests_on_milestone_id"
|
||||||
|
add_index "merge_requests", ["source_branch"], :name => "index_merge_requests_on_source_branch"
|
||||||
|
add_index "merge_requests", ["source_project_id"], :name => "index_merge_requests_on_source_project_id"
|
||||||
|
add_index "merge_requests", ["target_branch"], :name => "index_merge_requests_on_target_branch"
|
||||||
|
add_index "merge_requests", ["target_project_id", "iid"], :name => "index_merge_requests_on_target_project_id_and_iid", :unique => true
|
||||||
|
add_index "merge_requests", ["title"], :name => "index_merge_requests_on_title"
|
||||||
|
|
||||||
create_table "message_alls", :force => true do |t|
|
create_table "message_alls", :force => true do |t|
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
t.integer "message_id"
|
t.integer "message_id"
|
||||||
|
@ -1374,6 +1542,39 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
|
||||||
add_index "messages", ["parent_id"], :name => "messages_parent_id"
|
add_index "messages", ["parent_id"], :name => "messages_parent_id"
|
||||||
add_index "messages", ["root_id"], :name => "index_messages_on_root_id"
|
add_index "messages", ["root_id"], :name => "index_messages_on_root_id"
|
||||||
|
|
||||||
|
create_table "milestones", :force => true do |t|
|
||||||
|
t.string "title", :null => false
|
||||||
|
t.integer "project_id", :null => false
|
||||||
|
t.text "description"
|
||||||
|
t.date "due_date"
|
||||||
|
t.datetime "created_at"
|
||||||
|
t.datetime "updated_at"
|
||||||
|
t.string "state"
|
||||||
|
t.integer "iid"
|
||||||
|
end
|
||||||
|
|
||||||
|
add_index "milestones", ["created_at", "id"], :name => "index_milestones_on_created_at_and_id"
|
||||||
|
add_index "milestones", ["due_date"], :name => "index_milestones_on_due_date"
|
||||||
|
add_index "milestones", ["project_id", "iid"], :name => "index_milestones_on_project_id_and_iid", :unique => true
|
||||||
|
add_index "milestones", ["project_id"], :name => "index_milestones_on_project_id"
|
||||||
|
|
||||||
|
create_table "namespaces", :force => true do |t|
|
||||||
|
t.string "name", :null => false
|
||||||
|
t.string "path", :null => false
|
||||||
|
t.integer "owner_id"
|
||||||
|
t.datetime "created_at"
|
||||||
|
t.datetime "updated_at"
|
||||||
|
t.string "type"
|
||||||
|
t.string "description", :default => "", :null => false
|
||||||
|
t.string "avatar"
|
||||||
|
end
|
||||||
|
|
||||||
|
add_index "namespaces", ["created_at", "id"], :name => "index_namespaces_on_created_at_and_id"
|
||||||
|
add_index "namespaces", ["name"], :name => "index_namespaces_on_name", :unique => true
|
||||||
|
add_index "namespaces", ["owner_id"], :name => "index_namespaces_on_owner_id"
|
||||||
|
add_index "namespaces", ["path"], :name => "index_namespaces_on_path", :unique => true
|
||||||
|
add_index "namespaces", ["type"], :name => "index_namespaces_on_type"
|
||||||
|
|
||||||
create_table "news", :force => true do |t|
|
create_table "news", :force => true do |t|
|
||||||
t.integer "project_id"
|
t.integer "project_id"
|
||||||
t.string "title", :limit => 60, :default => "", :null => false
|
t.string "title", :limit => 60, :default => "", :null => false
|
||||||
|
@ -1400,6 +1601,31 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
create_table "notes", :force => true do |t|
|
||||||
|
t.text "note"
|
||||||
|
t.string "noteable_type"
|
||||||
|
t.integer "author_id"
|
||||||
|
t.datetime "created_at"
|
||||||
|
t.datetime "updated_at"
|
||||||
|
t.integer "project_id"
|
||||||
|
t.string "attachment"
|
||||||
|
t.string "line_code"
|
||||||
|
t.string "commit_id"
|
||||||
|
t.integer "noteable_id"
|
||||||
|
t.boolean "system", :default => false, :null => false
|
||||||
|
t.text "st_diff", :limit => 2147483647
|
||||||
|
end
|
||||||
|
|
||||||
|
add_index "notes", ["author_id"], :name => "index_notes_on_author_id"
|
||||||
|
add_index "notes", ["commit_id"], :name => "index_notes_on_commit_id"
|
||||||
|
add_index "notes", ["created_at", "id"], :name => "index_notes_on_created_at_and_id"
|
||||||
|
add_index "notes", ["created_at"], :name => "index_notes_on_created_at"
|
||||||
|
add_index "notes", ["noteable_id", "noteable_type"], :name => "index_notes_on_noteable_id_and_noteable_type"
|
||||||
|
add_index "notes", ["noteable_type"], :name => "index_notes_on_noteable_type"
|
||||||
|
add_index "notes", ["project_id", "noteable_type"], :name => "index_notes_on_project_id_and_noteable_type"
|
||||||
|
add_index "notes", ["project_id"], :name => "index_notes_on_project_id"
|
||||||
|
add_index "notes", ["updated_at"], :name => "index_notes_on_updated_at"
|
||||||
|
|
||||||
create_table "notificationcomments", :force => true do |t|
|
create_table "notificationcomments", :force => true do |t|
|
||||||
t.string "notificationcommented_type"
|
t.string "notificationcommented_type"
|
||||||
t.integer "notificationcommented_id"
|
t.integer "notificationcommented_id"
|
||||||
|
@ -1409,6 +1635,49 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
create_table "oauth_access_grants", :force => true do |t|
|
||||||
|
t.integer "resource_owner_id", :null => false
|
||||||
|
t.integer "application_id", :null => false
|
||||||
|
t.string "token", :null => false
|
||||||
|
t.integer "expires_in", :null => false
|
||||||
|
t.text "redirect_uri", :null => false
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "revoked_at"
|
||||||
|
t.string "scopes"
|
||||||
|
end
|
||||||
|
|
||||||
|
add_index "oauth_access_grants", ["token"], :name => "index_oauth_access_grants_on_token", :unique => true
|
||||||
|
|
||||||
|
create_table "oauth_access_tokens", :force => true do |t|
|
||||||
|
t.integer "resource_owner_id"
|
||||||
|
t.integer "application_id"
|
||||||
|
t.string "token", :null => false
|
||||||
|
t.string "refresh_token"
|
||||||
|
t.integer "expires_in"
|
||||||
|
t.datetime "revoked_at"
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.string "scopes"
|
||||||
|
end
|
||||||
|
|
||||||
|
add_index "oauth_access_tokens", ["refresh_token"], :name => "index_oauth_access_tokens_on_refresh_token", :unique => true
|
||||||
|
add_index "oauth_access_tokens", ["resource_owner_id"], :name => "index_oauth_access_tokens_on_resource_owner_id"
|
||||||
|
add_index "oauth_access_tokens", ["token"], :name => "index_oauth_access_tokens_on_token", :unique => true
|
||||||
|
|
||||||
|
create_table "oauth_applications", :force => true do |t|
|
||||||
|
t.string "name", :null => false
|
||||||
|
t.string "uid", :null => false
|
||||||
|
t.string "secret", :null => false
|
||||||
|
t.text "redirect_uri", :null => false
|
||||||
|
t.string "scopes", :default => "", :null => false
|
||||||
|
t.datetime "created_at"
|
||||||
|
t.datetime "updated_at"
|
||||||
|
t.integer "owner_id"
|
||||||
|
t.string "owner_type"
|
||||||
|
end
|
||||||
|
|
||||||
|
add_index "oauth_applications", ["owner_id", "owner_type"], :name => "index_oauth_applications_on_owner_id_and_owner_type"
|
||||||
|
add_index "oauth_applications", ["uid"], :name => "index_oauth_applications_on_uid", :unique => true
|
||||||
|
|
||||||
create_table "onclick_times", :force => true do |t|
|
create_table "onclick_times", :force => true do |t|
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
t.datetime "onclick_time"
|
t.datetime "onclick_time"
|
||||||
|
@ -1569,6 +1838,23 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
|
||||||
t.integer "allow_teacher", :default => 0
|
t.integer "allow_teacher", :default => 0
|
||||||
end
|
end
|
||||||
|
|
||||||
|
create_table "permissions", :force => true do |t|
|
||||||
|
t.string "controller", :limit => 30, :default => "", :null => false
|
||||||
|
t.string "action", :limit => 30, :default => "", :null => false
|
||||||
|
t.string "description", :limit => 60, :default => "", :null => false
|
||||||
|
t.boolean "is_public", :default => false, :null => false
|
||||||
|
t.integer "sort", :default => 0, :null => false
|
||||||
|
t.boolean "mail_option", :default => false, :null => false
|
||||||
|
t.boolean "mail_enabled", :default => false, :null => false
|
||||||
|
end
|
||||||
|
|
||||||
|
create_table "permissions_roles", :id => false, :force => true do |t|
|
||||||
|
t.integer "permission_id", :default => 0, :null => false
|
||||||
|
t.integer "role_id", :default => 0, :null => false
|
||||||
|
end
|
||||||
|
|
||||||
|
add_index "permissions_roles", ["role_id"], :name => "permissions_roles_role_id"
|
||||||
|
|
||||||
create_table "phone_app_versions", :force => true do |t|
|
create_table "phone_app_versions", :force => true do |t|
|
||||||
t.string "version"
|
t.string "version"
|
||||||
t.text "description"
|
t.text "description"
|
||||||
|
@ -1659,6 +1945,11 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
create_table "project_import_data", :force => true do |t|
|
||||||
|
t.integer "project_id"
|
||||||
|
t.text "data"
|
||||||
|
end
|
||||||
|
|
||||||
create_table "project_infos", :force => true do |t|
|
create_table "project_infos", :force => true do |t|
|
||||||
t.integer "project_id"
|
t.integer "project_id"
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
|
@ -1745,13 +2036,22 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
|
||||||
add_index "projects_trackers", ["project_id", "tracker_id"], :name => "projects_trackers_unique", :unique => true
|
add_index "projects_trackers", ["project_id", "tracker_id"], :name => "projects_trackers_unique", :unique => true
|
||||||
add_index "projects_trackers", ["project_id"], :name => "projects_trackers_project_id"
|
add_index "projects_trackers", ["project_id"], :name => "projects_trackers_project_id"
|
||||||
|
|
||||||
|
create_table "protected_branches", :force => true do |t|
|
||||||
|
t.integer "project_id", :null => false
|
||||||
|
t.string "name", :null => false
|
||||||
|
t.datetime "created_at"
|
||||||
|
t.datetime "updated_at"
|
||||||
|
t.boolean "developers_can_push", :default => false, :null => false
|
||||||
|
end
|
||||||
|
|
||||||
|
add_index "protected_branches", ["project_id"], :name => "index_protected_branches_on_project_id"
|
||||||
|
|
||||||
create_table "pull_requests", :force => true do |t|
|
create_table "pull_requests", :force => true do |t|
|
||||||
t.integer "pull_request_id"
|
t.integer "pull_request_id"
|
||||||
t.integer "gpid"
|
t.integer "gpid"
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
t.datetime "created_at", :null => false
|
t.datetime "created_at", :null => false
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
t.integer "status", :default => 0
|
|
||||||
t.integer "project_id"
|
t.integer "project_id"
|
||||||
t.string "title"
|
t.string "title"
|
||||||
end
|
end
|
||||||
|
@ -1760,9 +2060,10 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
|
||||||
t.integer "project_id"
|
t.integer "project_id"
|
||||||
t.string "author_login"
|
t.string "author_login"
|
||||||
t.string "rep_identifier"
|
t.string "rep_identifier"
|
||||||
t.datetime "created_at", :null => false
|
t.datetime "created_at", :null => false
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
t.integer "sonar_version", :default => 0
|
t.float "version", :default => 0.0
|
||||||
|
t.integer "sonar_version", :default => 1
|
||||||
t.string "path"
|
t.string "path"
|
||||||
t.string "branch"
|
t.string "branch"
|
||||||
t.string "language"
|
t.string "language"
|
||||||
|
@ -1904,6 +2205,25 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
|
||||||
t.integer "is_teacher_score", :default => 0
|
t.integer "is_teacher_score", :default => 0
|
||||||
end
|
end
|
||||||
|
|
||||||
|
create_table "services", :force => true do |t|
|
||||||
|
t.string "type"
|
||||||
|
t.string "title"
|
||||||
|
t.integer "project_id"
|
||||||
|
t.datetime "created_at"
|
||||||
|
t.datetime "updated_at"
|
||||||
|
t.boolean "active", :default => false, :null => false
|
||||||
|
t.text "properties"
|
||||||
|
t.boolean "template", :default => false
|
||||||
|
t.boolean "push_events", :default => true
|
||||||
|
t.boolean "issues_events", :default => true
|
||||||
|
t.boolean "merge_requests_events", :default => true
|
||||||
|
t.boolean "tag_push_events", :default => true
|
||||||
|
t.boolean "note_events", :default => true, :null => false
|
||||||
|
end
|
||||||
|
|
||||||
|
add_index "services", ["created_at", "id"], :name => "index_services_on_created_at_and_id"
|
||||||
|
add_index "services", ["project_id"], :name => "index_services_on_project_id"
|
||||||
|
|
||||||
create_table "settings", :force => true do |t|
|
create_table "settings", :force => true do |t|
|
||||||
t.string "name", :default => "", :null => false
|
t.string "name", :default => "", :null => false
|
||||||
t.text "value"
|
t.text "value"
|
||||||
|
@ -1942,6 +2262,26 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
create_table "snippets", :force => true do |t|
|
||||||
|
t.string "title"
|
||||||
|
t.text "content", :limit => 2147483647
|
||||||
|
t.integer "author_id", :null => false
|
||||||
|
t.integer "project_id"
|
||||||
|
t.datetime "created_at"
|
||||||
|
t.datetime "updated_at"
|
||||||
|
t.string "file_name"
|
||||||
|
t.datetime "expires_at"
|
||||||
|
t.string "type"
|
||||||
|
t.integer "visibility_level", :default => 0, :null => false
|
||||||
|
end
|
||||||
|
|
||||||
|
add_index "snippets", ["author_id"], :name => "index_snippets_on_author_id"
|
||||||
|
add_index "snippets", ["created_at", "id"], :name => "index_snippets_on_created_at_and_id"
|
||||||
|
add_index "snippets", ["created_at"], :name => "index_snippets_on_created_at"
|
||||||
|
add_index "snippets", ["expires_at"], :name => "index_snippets_on_expires_at"
|
||||||
|
add_index "snippets", ["project_id"], :name => "index_snippets_on_project_id"
|
||||||
|
add_index "snippets", ["visibility_level"], :name => "index_snippets_on_visibility_level"
|
||||||
|
|
||||||
create_table "softapplications", :force => true do |t|
|
create_table "softapplications", :force => true do |t|
|
||||||
t.string "name"
|
t.string "name"
|
||||||
t.text "description"
|
t.text "description"
|
||||||
|
@ -2108,6 +2448,17 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
create_table "subscriptions", :force => true do |t|
|
||||||
|
t.integer "user_id"
|
||||||
|
t.integer "subscribable_id"
|
||||||
|
t.string "subscribable_type"
|
||||||
|
t.boolean "subscribed"
|
||||||
|
t.datetime "created_at"
|
||||||
|
t.datetime "updated_at"
|
||||||
|
end
|
||||||
|
|
||||||
|
add_index "subscriptions", ["subscribable_id", "subscribable_type", "user_id"], :name => "subscriptions_user_id_and_ref_fields", :unique => true
|
||||||
|
|
||||||
create_table "syllabus_members", :force => true do |t|
|
create_table "syllabus_members", :force => true do |t|
|
||||||
t.integer "rank"
|
t.integer "rank"
|
||||||
t.integer "syllabus_id"
|
t.integer "syllabus_id"
|
||||||
|
@ -2381,6 +2732,17 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
|
||||||
add_index "users", ["id", "type"], :name => "index_users_on_id_and_type"
|
add_index "users", ["id", "type"], :name => "index_users_on_id_and_type"
|
||||||
add_index "users", ["type"], :name => "index_users_on_type"
|
add_index "users", ["type"], :name => "index_users_on_type"
|
||||||
|
|
||||||
|
create_table "users_star_projects", :force => true do |t|
|
||||||
|
t.integer "project_id", :null => false
|
||||||
|
t.integer "user_id", :null => false
|
||||||
|
t.datetime "created_at"
|
||||||
|
t.datetime "updated_at"
|
||||||
|
end
|
||||||
|
|
||||||
|
add_index "users_star_projects", ["project_id"], :name => "index_users_star_projects_on_project_id"
|
||||||
|
add_index "users_star_projects", ["user_id", "project_id"], :name => "index_users_star_projects_on_user_id_and_project_id", :unique => true
|
||||||
|
add_index "users_star_projects", ["user_id"], :name => "index_users_star_projects_on_user_id"
|
||||||
|
|
||||||
create_table "versions", :force => true do |t|
|
create_table "versions", :force => true do |t|
|
||||||
t.integer "project_id", :default => 0, :null => false
|
t.integer "project_id", :default => 0, :null => false
|
||||||
t.string "name", :default => "", :null => false
|
t.string "name", :default => "", :null => false
|
||||||
|
@ -2433,6 +2795,33 @@ ActiveRecord::Schema.define(:version => 20161223083022) do
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
create_table "web_hooks", :force => true do |t|
|
||||||
|
t.string "url"
|
||||||
|
t.integer "project_id"
|
||||||
|
t.datetime "created_at"
|
||||||
|
t.datetime "updated_at"
|
||||||
|
t.string "type", :default => "ProjectHook"
|
||||||
|
t.integer "service_id"
|
||||||
|
t.boolean "push_events", :default => true, :null => false
|
||||||
|
t.boolean "issues_events", :default => false, :null => false
|
||||||
|
t.boolean "merge_requests_events", :default => false, :null => false
|
||||||
|
t.boolean "tag_push_events", :default => false
|
||||||
|
t.boolean "note_events", :default => false, :null => false
|
||||||
|
end
|
||||||
|
|
||||||
|
add_index "web_hooks", ["created_at", "id"], :name => "index_web_hooks_on_created_at_and_id"
|
||||||
|
add_index "web_hooks", ["project_id"], :name => "index_web_hooks_on_project_id"
|
||||||
|
|
||||||
|
create_table "wechat_logs", :force => true do |t|
|
||||||
|
t.string "openid", :null => false
|
||||||
|
t.text "request_raw"
|
||||||
|
t.text "response_raw"
|
||||||
|
t.text "session_raw"
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
end
|
||||||
|
|
||||||
|
add_index "wechat_logs", ["openid"], :name => "index_wechat_logs_on_openid"
|
||||||
|
|
||||||
create_table "wiki_content_versions", :force => true do |t|
|
create_table "wiki_content_versions", :force => true do |t|
|
||||||
t.integer "wiki_content_id", :null => false
|
t.integer "wiki_content_id", :null => false
|
||||||
t.integer "page_id", :null => false
|
t.integer "page_id", :null => false
|
||||||
|
|
Loading…
Reference in New Issue