dev_forum
jingquan huang 5 years ago
commit 4435939a60

@ -1,6 +1,6 @@
class AddIsInvalidToStudentWorksScores < ActiveRecord::Migration[5.2] class AddIsInvalidToStudentWorksScores < ActiveRecord::Migration[5.2]
def change def change
add_column :student_works_scores, :is_invalid, :boolean, default: false # add_column :student_works_scores, :is_invalid, :boolean, default: false
StudentWorksScore.where("score is not null").order("id desc").find_each do |score| StudentWorksScore.where("score is not null").order("id desc").find_each do |score|
unless score.is_invalid unless score.is_invalid

@ -1,7 +1,7 @@
class AddDescriptionToEduSettings < ActiveRecord::Migration[5.2] class AddDescriptionToEduSettings < ActiveRecord::Migration[5.2]
def change def change
add_column :edu_settings, :description, :string # add_column :edu_settings, :description, :string
add_index :edu_settings, :name, unique: :true # add_index :edu_settings, :name, unique: :true
['tomcat_webssh', 'webssh_username', 'webssh_password', 'git_address_ip', 'git_address_domain', 'git_username', ['tomcat_webssh', 'webssh_username', 'webssh_password', 'git_address_ip', 'git_address_domain', 'git_username',
'git_password', 'public_key', 'private_key', 'public_bucket', 'public_bucket_host', 'public_cdn_host', 'cloud_bridge', 'git_password', 'public_key', 'private_key', 'public_bucket', 'public_bucket_host', 'public_cdn_host', 'cloud_bridge',

@ -1,6 +1,6 @@
class AddExecTimeToChallenge < ActiveRecord::Migration[5.2] class AddExecTimeToChallenge < ActiveRecord::Migration[5.2]
def change def change
add_column :challenges, :exec_time, :integer # add_column :challenges, :exec_time, :integer
Shixun.find_each do |shixun| Shixun.find_each do |shixun|
shixun.challenges.update_all(exec_time: shixun.exec_time) shixun.challenges.update_all(exec_time: shixun.exec_time)

Loading…
Cancel
Save