diff --git a/db/migrate/20140710071720_create_first_pages.rb b/db/migrate/20140710071720_create_first_pages.rb index fa7d01601..c33283a06 100644 --- a/db/migrate/20140710071720_create_first_pages.rb +++ b/db/migrate/20140710071720_create_first_pages.rb @@ -5,6 +5,7 @@ class CreateFirstPages < ActiveRecord::Migration t.string :web_title t.string :title t.string :description + t.string :page_type t.timestamps end @@ -12,6 +13,8 @@ class CreateFirstPages < ActiveRecord::Migration fp.web_title = "Trustie - 为大学生技术创新筑巢" fp.title = "Trustie在线项目托管平台" fp.description = "面向中国大学生与软件从业者,提供社交化的项目管理、代码托管、资源共享、合作交流。" + fp.page_type = "project" + fp.save end end diff --git a/db/migrate/20140710095123_add_cloumn_to_first_page.rb b/db/migrate/20140710095123_add_cloumn_to_first_page.rb index 6720a8aa4..8642f08a2 100644 --- a/db/migrate/20140710095123_add_cloumn_to_first_page.rb +++ b/db/migrate/20140710095123_add_cloumn_to_first_page.rb @@ -1,9 +1,9 @@ class AddCloumnToFirstPage < ActiveRecord::Migration def change - add_column :first_pages,:type,:string + #add_column :first_pages,:type,:string - fr = FirstPage.all.first - fr.type = "project" - fr.save + #fr = FirstPage.all.first + #fr.type = "project" + #fr.save end end diff --git a/db/migrate/20140711010124_alt_column_name.rb b/db/migrate/20140711010124_alt_column_name.rb index 24b784765..50a531d54 100644 --- a/db/migrate/20140711010124_alt_column_name.rb +++ b/db/migrate/20140711010124_alt_column_name.rb @@ -1,5 +1,5 @@ class AltColumnName < ActiveRecord::Migration def change - rename_column :first_pages,:type,:page_type + #rename_column :first_pages,:type,:page_type end end