From 89b8f7783da5be3c75d1594a399403e37cfa50e9 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 4 Dec 2015 08:57:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0forked=5Fform=E7=9A=84id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/repositories/show.html.erb | 2 +- ..._add_forked_from_project_id_to_projects.rb | 5 ++ db/schema.rb | 63 +++++++++---------- 3 files changed, 35 insertions(+), 35 deletions(-) create mode 100644 db/migrate/20151203072815_add_forked_from_project_id_to_projects.rb diff --git a/app/views/repositories/show.html.erb b/app/views/repositories/show.html.erb index e06542cba..324dc6202 100644 --- a/app/views/repositories/show.html.erb +++ b/app/views/repositories/show.html.erb @@ -15,7 +15,7 @@ 版本库地址:<%= @repos_url %> <% else %> 版本库地址:<%= h @repository.url %> - <% end %> + <% end %>-
diff --git a/db/migrate/20151203072815_add_forked_from_project_id_to_projects.rb b/db/migrate/20151203072815_add_forked_from_project_id_to_projects.rb new file mode 100644 index 000000000..f679eaecd --- /dev/null +++ b/db/migrate/20151203072815_add_forked_from_project_id_to_projects.rb @@ -0,0 +1,5 @@ +class AddForkedFromProjectIdToProjects < ActiveRecord::Migration + def change + add_column :projects, :forked_from_project_id, :integer + end +end diff --git a/db/schema.rb b/db/schema.rb index c6ca6a0ce..886f233a8 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20151130033906) do +ActiveRecord::Schema.define(:version => 20151203072815) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false @@ -543,23 +543,26 @@ ActiveRecord::Schema.define(:version => 20151130033906) do add_index "documents", ["created_on"], :name => "index_documents_on_created_on" add_index "documents", ["project_id"], :name => "documents_project_id" - create_table "dts", :force => true do |t| - t.string "IPLineCode" - t.string "Description" - t.string "Num" - t.string "Variable" - t.string "TraceInfo" - t.string "Method" + create_table "dts", :primary_key => "Num", :force => true do |t| + t.string "Defect", :limit => 50 + t.string "Category", :limit => 50 t.string "File" - t.string "IPLine" - t.string "Review" - t.string "Category" - t.string "Defect" - t.string "PreConditions" - t.string "StartLine" + t.string "Method" + t.string "Module", :limit => 20 + t.string "Variable", :limit => 50 + t.integer "StartLine" + t.integer "IPLine" + t.string "IPLineCode", :limit => 200 + t.string "Judge", :limit => 15 + t.integer "Review", :limit => 1 + t.string "Description" + t.text "PreConditions", :limit => 2147483647 + t.text "TraceInfo", :limit => 2147483647 + t.text "Code", :limit => 2147483647 t.integer "project_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at" + t.datetime "updated_at" + t.integer "id", :null => false end create_table "enabled_modules", :force => true do |t| @@ -891,16 +894,6 @@ ActiveRecord::Schema.define(:version => 20151130033906) do add_index "journal_details", ["journal_id"], :name => "journal_details_journal_id" - create_table "journal_details_copy", :force => true do |t| - t.integer "journal_id", :default => 0, :null => false - t.string "property", :limit => 30, :default => "", :null => false - t.string "prop_key", :limit => 30, :default => "", :null => false - t.text "old_value" - t.text "value" - end - - add_index "journal_details_copy", ["journal_id"], :name => "journal_details_journal_id" - create_table "journal_replies", :id => false, :force => true do |t| t.integer "journal_id" t.integer "user_id" @@ -970,6 +963,7 @@ ActiveRecord::Schema.define(:version => 20151130033906) do t.integer "course_group_id", :default => 0 end + add_index "members", ["course_id"], :name => "index_members_on_course_id" add_index "members", ["project_id"], :name => "index_members_on_project_id" add_index "members", ["user_id", "project_id", "course_id"], :name => "index_members_on_user_id_and_project_id", :unique => true add_index "members", ["user_id"], :name => "index_members_on_user_id" @@ -1303,27 +1297,28 @@ ActiveRecord::Schema.define(:version => 20151130033906) do end create_table "projects", :force => true do |t| - t.string "name", :default => "", :null => false + t.string "name", :default => "", :null => false t.text "description" - t.string "homepage", :default => "" - t.boolean "is_public", :default => true, :null => false + t.string "homepage", :default => "" + t.boolean "is_public", :default => true, :null => false t.integer "parent_id" t.datetime "created_on" t.datetime "updated_on" t.string "identifier" - t.integer "status", :default => 1, :null => false + t.integer "status", :default => 1, :null => false t.integer "lft" t.integer "rgt" - t.boolean "inherit_members", :default => false, :null => false + t.boolean "inherit_members", :default => false, :null => false t.integer "project_type" - t.boolean "hidden_repo", :default => false, :null => false - t.integer "attachmenttype", :default => 1 + t.boolean "hidden_repo", :default => false, :null => false + t.integer "attachmenttype", :default => 1 t.integer "user_id" - t.integer "dts_test", :default => 0 + t.integer "dts_test", :default => 0 t.string "enterprise_name" t.integer "organization_id" t.integer "project_new_type" t.integer "gpid" + t.integer "forked_from_project_id" end add_index "projects", ["lft"], :name => "index_projects_on_lft"