ADD some field to projects table
This commit is contained in:
parent
65ebeaed25
commit
dd0fafe533
|
@ -0,0 +1,11 @@
|
|||
class AddProjectCategoryIdAndProjectLanguageIdToProjects < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :projects, :project_category_id, :integer
|
||||
add_column :projects, :project_language_id, :integer
|
||||
|
||||
category = ProjectCategory.find_by_name '其他'
|
||||
language = ProjectLanguage.find_by_name '未知'
|
||||
|
||||
Project.update_all({:project_category_id => category&.id, :project_language_id => language&.id})
|
||||
end
|
||||
end
|
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20191107032227) do
|
||||
ActiveRecord::Schema.define(:version => 20191107034328) do
|
||||
|
||||
create_table "activities", :force => true do |t|
|
||||
t.integer "act_id", :null => false
|
||||
|
@ -2069,6 +2069,8 @@ ActiveRecord::Schema.define(:version => 20191107032227) do
|
|||
t.text "script"
|
||||
t.integer "training_status", :limit => 1, :default => 0
|
||||
t.string "language"
|
||||
t.integer "project_category_id"
|
||||
t.integer "project_language_id"
|
||||
end
|
||||
|
||||
add_index "projects", ["lft"], :name => "index_projects_on_lft"
|
||||
|
|
Loading…
Reference in New Issue