实训关卡得分默认值设置为100分,并迁移以往分数为空的数据
This commit is contained in:
parent
236da38444
commit
0e253c4e9f
2
Gemfile
2
Gemfile
|
@ -15,7 +15,7 @@ unless RUBY_PLATFORM =~ /w32/
|
|||
gem 'nokogiri'
|
||||
end
|
||||
|
||||
gem 'simple_xlsx_reader'
|
||||
#gem 'simple_xlsx_reader'
|
||||
gem 'wechat',path: 'lib/wechat'
|
||||
gem 'grack', path:'lib/grack'
|
||||
gem 'gitlab', path: 'lib/gitlab-cli'
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
class AddScoreDefaultValueForChallenge < ActiveRecord::Migration
|
||||
def up
|
||||
challenges = Challenge.where(:score => nil)
|
||||
challenges.update_all(:score => 100)
|
||||
change_column :challenges, :score, :integer, :default => 100
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue