增加迁移文件

This commit is contained in:
sw 2015-07-02 15:36:27 +08:00
parent a6e80ed938
commit 976c4ddd19
2 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,9 @@
class AddLatePenaltyToStudnetWork < ActiveRecord::Migration
def up
add_column :student_works, :late_penalty, :integer, default: 0
end
def down
remove_column :student_works, :late_penalty
end
end

View File

@ -0,0 +1,9 @@
class AddAbsencePenaltyToStudnetWork < ActiveRecord::Migration
def up
add_column :student_works, :absence_penalty, :integer, default: 0
end
def down
remove_column :student_works, :absence_penalty
end
end