Class: CreateSeemsRateableCachedRatings
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateSeemsRateableCachedRatings
- Defined in:
- lib/generators/seems_rateable/install/templates/cached_ratings_migration.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
14 15 16 |
# File 'lib/generators/seems_rateable/install/templates/cached_ratings_migration.rb', line 14 def self.down drop_table :cached_ratings end |
.up ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 |
# File 'lib/generators/seems_rateable/install/templates/cached_ratings_migration.rb', line 2 def self.up create_table :seems_rateable_cached_ratings do |t| t.belongs_to :cacheable, :polymorphic => true t.float :avg, :null => false t.integer :cnt, :null => false t.string :dimension t.integer :cacheable_id, :limit => 8 t.string :cacheable_type t. end end |