class ModifyRubricCriterionWeightColumn < ActiveRecord::Migration
  # Table rubric_criteria has attribute weight.
  # Earlier migrations made the weight attribute of type decimal
  # which is translated into MySQL native type Decimal(10,0)
  # i.e. this means basically a decimal number allowing 10 digits
  # prior the decimal point and 0 (!) after the decimal point.
  # We don't want this. I'm going with float now.
  def self.up
    change_table :rubric_criteria do |t|
      t.remove :weight
      t.float :weight
    end
  end

  def self.down
    change_table :rubric_criteria do |t|
      t.remove :weight
      t.decimal :weight
    end
  end
end

Fix failure of AssignmentTest, which was due to bad choice/configuration of database attribute type (i.e. :decimal) when creating rubric_criteria table. See review 213
Fix failure of AssignmentTest, which was due to bad choice/configuration of database attribute type (i.e. :decimal) when creating rubric_criteria table. See review 213
