Class: DropRailsAdminHistoriesTable
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- DropRailsAdminHistoriesTable
- Defined in:
- lib/generators/rails_admin/templates/drop.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/generators/rails_admin/templates/drop.rb', line 6 def self.down 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 |
.up ⇒ Object
2 3 4 |
# File 'lib/generators/rails_admin/templates/drop.rb', line 2 def self.up drop_table :rails_admin_histories end |