Class: CreateRailsAdminHistoriesTable
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateRailsAdminHistoriesTable
- Defined in:
- lib/generators/rails_admin/templates/migration.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
15 16 17 |
# File 'lib/generators/rails_admin/templates/migration.rb', line 15 def self.down drop_table :rails_admin_histories end |
.up ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 |
# File 'lib/generators/rails_admin/templates/migration.rb', line 2 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. end add_index(:rails_admin_histories, [:item, :table, :month, :year], :name => 'index_rails_admin_histories' ) end |