summaryrefslogtreecommitdiff
path: root/db/migrate/20110924214549_create_rails_admin_histories_table.rb
blob: 3c743aa2874433b051f8d8f3ea83dd1935bea492 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
class CreateRailsAdminHistoriesTable < ActiveRecord::Migration
   def self.up
     create_table :rails_admin_histories do |t|
       t.text :message # title, name, or object_id
       t.string :username
       t.integer :item
       t.string :table
       t.integer :month, :limit => 2
       t.integer :year, :limit => 5
       t.timestamps
    end
    add_index(:rails_admin_histories, [:item, :table, :month, :year], :name => 'index_rails_admin_histories' )
  end

  def self.down
    drop_table :rails_admin_histories
  end
end