From 3aab1b172c88beba760d149f6ba3fceeb4d9f5b2 Mon Sep 17 00:00:00 2001 From: z9hang Date: Mon, 14 Jul 2014 11:28:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=89=A7=E8=A1=8C=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E8=BF=81=E7=A7=BB=E6=97=B6=E7=9A=84=E2=80=98page=5Fty?= =?UTF-8?q?pe=3D=E2=80=99=20undefine=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/migrate/20140710071720_create_first_pages.rb | 3 +++ db/migrate/20140710095123_add_cloumn_to_first_page.rb | 8 ++++---- db/migrate/20140711010124_alt_column_name.rb | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) 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