2012-06-18 17:49:28 +00:00
|
|
|
class CreateRailsAdminHistoriesTable < ActiveRecord::Migration
|
|
|
|
def change
|
|
|
|
create_table :rails_admin_histories do |t|
|
|
|
|
t.string :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
|
|
|
|
|
2014-04-01 08:15:29 +00:00
|
|
|
add_index(:rails_admin_histories, [:item, :table, :month, :year], name: 'index_rails_admin_histories')
|
2012-06-18 17:49:28 +00:00
|
|
|
end
|
|
|
|
end
|