From c579ede792d11bf28a1ea437a57b61f61954cfca Mon Sep 17 00:00:00 2001 From: cxt Date: Mon, 4 Mar 2019 10:51:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=A6=E9=99=A2=E7=BB=9F=E8=AE=A1=E7=9A=84?= =?UTF-8?q?=E4=B8=BB=E6=9C=BA=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gemfile | 4 ++-- db/migrate/20190301112631_migrate_exer_user_score.rb | 1 + .../20190304021422_department_default_host_count.rb | 10 ++++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 db/migrate/20190304021422_department_default_host_count.rb diff --git a/Gemfile b/Gemfile index 5e4be042..ce827d25 100644 --- a/Gemfile +++ b/Gemfile @@ -15,6 +15,8 @@ unless RUBY_PLATFORM =~ /w32/ gem 'rqrcode_png' gem 'roo-xls' gem 'newrelic_rpm' + gem 'seventeen_mon' + gem 'mobinfo' end gem 'certified' gem 'net-ssh', '2.9.1' @@ -22,8 +24,6 @@ unless RUBY_PLATFORM =~ /w32/ gem 'nokogiri' end -gem 'seventeen_mon' -gem 'mobinfo' gem 'simple_xlsx_reader' gem 'wechat',path: 'lib/wechat' gem 'grack', path:'lib/grack' diff --git a/db/migrate/20190301112631_migrate_exer_user_score.rb b/db/migrate/20190301112631_migrate_exer_user_score.rb index d334373c..dd075562 100644 --- a/db/migrate/20190301112631_migrate_exer_user_score.rb +++ b/db/migrate/20190301112631_migrate_exer_user_score.rb @@ -1,3 +1,4 @@ +#encoding: utf-8 class MigrateExerUserScore < ActiveRecord::Migration def up exercise = Exercise.where(:id => 1264).first diff --git a/db/migrate/20190304021422_department_default_host_count.rb b/db/migrate/20190304021422_department_default_host_count.rb new file mode 100644 index 00000000..f13f540b --- /dev/null +++ b/db/migrate/20190304021422_department_default_host_count.rb @@ -0,0 +1,10 @@ +class DepartmentDefaultHostCount < ActiveRecord::Migration + def up + change_column :departments, :host_count, :integer, :default => 5 + + Department.update_all(:host_count => 5) + end + + def down + end +end