Sha256: 2595f3dac989b6f243bcbc4166354c0655764a3bb7314cdf7910c1e5901ca967

Contents?: true

Size: 479 Bytes

Versions: 4

Compression:

Stored size: 479 Bytes

Contents

class CreateSeemsRateableCachedRatings < ActiveRecord::Migration
  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.timestamps
      end
    end

    def self.down
      drop_table :cached_ratings
    end  
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
seems_rateable-1.0.10 lib/generators/seems_rateable/install/templates/cached_ratings_migration.rb
seems_rateable-1.0.9 lib/generators/seems_rateable/install/templates/cached_ratings_migration.rb
seems_rateable-1.0.8 lib/generators/seems_rateable/install/templates/cached_ratings_migration.rb
seems_rateable-1.0.7 lib/generators/seems_rateable/install/templates/cached_ratings_migration.rb