3scale/porta

View on GitHub
db/migrate/20090928083142_recreate_dispatch_rules_table.rb

Summary

Maintainability
A
0 mins
Test Coverage
class RecreateDispatchRulesTable < ActiveRecord::Migration
  def self.up
    if MailDispatchRule.table_exists?
      drop_table :mail_dispatch_rules
    end
    
    create_table :mail_dispatch_rules do |t|
      t.references :account, :system_operation
      t.text :emails
      t.boolean :dispatch, :default => true
      t.timestamps
    end
        
  end

  def self.down
    drop_table :mail_dispatch_rules
  end
end