master
 1class CreateAdminNotes < ActiveRecord::Migration
 2  def self.up
 3    create_table :admin_notes do |t|
 4      t.references :resource, :polymorphic => true, :null => false
 5      t.references :admin_user, :polymorphic => true
 6      t.text :body
 7      t.timestamps
 8    end
 9    add_index :admin_notes, [:resource_type, :resource_id]
10    add_index :admin_notes, [:admin_user_type, :admin_user_id]
11  end
12
13  def self.down
14    drop_table :admin_notes
15  end
16end