3scale/porta

View on GitHub
db/migrate/20110812112413_remove_test_attribute_from_plans.rb

Summary

Maintainability
A
0 mins
Test Coverage
class RemoveTestAttributeFromPlans < ActiveRecord::Migration
  def self.up
    Plan.connection.execute "DELETE FROM plans WHERE test = true"
    change_table Plan.table_name do |t|
      t.remove :test
    end
  end

  def self.down
    change_table Plan.table_name do |t|
      t.boolean :test, :default => false, :null => false
    end
  end
end