adopt-a-hydrant/db/migrate/00000000000005_create_rails...

16 lines
454 B
Ruby

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
add_index(:rails_admin_histories, [:item, :table, :month, :year], name: 'index_rails_admin_histories')
end
end