17 lines
531 B
Ruby
17 lines
531 B
Ruby
class RemoveProvisionalGradePosition < ActiveRecord::Migration
|
|
tag :postdeploy
|
|
|
|
def up
|
|
# the unique index was dropped in a predeploy migration
|
|
remove_column :moderated_grading_provisional_grades, :position
|
|
end
|
|
|
|
def down
|
|
add_column :moderated_grading_provisional_grades, :position, :integer, :limit => 8
|
|
add_index :moderated_grading_provisional_grades,
|
|
[:submission_id, :position],
|
|
unique: true,
|
|
name: :idx_mg_provisional_grades_unique_submission_position
|
|
end
|
|
end
|