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