From 61815af8bdbbc2658ba51026ce758954a4a48d09 Mon Sep 17 00:00:00 2001 From: alan <547533434@qq.com> Date: Thu, 30 Oct 2014 11:24:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B8=AF=E6=BE=B3=E5=8F=B0?= =?UTF-8?q?=E9=AB=98=E6=A0=A1=E4=BF=A1=E6=81=AF=20Signed-off-by:=20alan=20?= =?UTF-8?q?<547533434@qq.com>?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20141030030211_add_data_for_school.rb | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 db/migrate/20141030030211_add_data_for_school.rb diff --git a/db/migrate/20141030030211_add_data_for_school.rb b/db/migrate/20141030030211_add_data_for_school.rb new file mode 100644 index 000000000..8ce3d88f1 --- /dev/null +++ b/db/migrate/20141030030211_add_data_for_school.rb @@ -0,0 +1,25 @@ +class AddDataForSchool < ActiveRecord::Migration + def up + sql = " Insert into schools (name, province, logo_link) values + ('香港大学','香港','/images/transparent.png'), + ('香港大学','香港','/images/transparent.png'), + ('香港中文大学','香港','/images/transparent.png'), + ('香港科技大学','香港','/images/transparent.png'),('香港理工大学','香港','/images/transparent.png'), + ('香港城市大学','香港','/images/transparent.png'),('香港浸会大学','香港','/images/transparent.png'), + ('香港教育学院','香港','/images/transparent.png'),('香港歌德学院','香港','/images/transparent.png'), + ('香港岭南大学','香港','/images/transparent.png'),('澳门大学','澳门','/images/transparent.png'), + ('澳门理工学院','澳门','/images/transparent.png'),('澳门科技大学','澳门','/images/transparent.png'), + ('澳门保安部队高等学校','澳门','/images/transparent.png'),('亚洲国际公开大学','澳门','/images/transparent.png'), + ('澳门旅游学院','澳门','/images/transparent.png'),('清华大学(新竹)','台湾','/images/transparent.png'), + ('台湾大学','台湾','/images/transparent.png'),('交通大学','台湾','/images/transparent.png'), + ('中央大学','台湾','/images/transparent.png'),('成功大学','台湾','/images/transparent.png'), + ('中山大学','台湾','/images/transparent.png'),('中原大学','台湾','/images/transparent.png'), + ('政治大学','台湾','/images/transparent.png'),('元智大学','台湾','/images/transparent.png'), + ('天主教辅仁大学','台湾','/images/transparent.png'),('台湾科技大学','台湾','/images/transparent.png'), + ('台湾师范大学','台湾','/images/transparent.png'),('台湾艺术大学','台湾','/images/transparent.png')" + execute(sql) + end + + def down + end +end