Sha256: 5630a3dd2af725517f1277bc06d8116dbe9572d15da003c3137fe3623248457a
Contents?: true
Size: 515 Bytes
Versions: 6
Compression:
Stored size: 515 Bytes
Contents
class ActsAsVotableMigration < ActiveRecord::Migration<%= migration_version %> def self.up create_table :votes do |t| t.references :votable, :polymorphic => true t.references :voter, :polymorphic => true t.boolean :vote_flag t.string :vote_scope t.integer :vote_weight t.timestamps end add_index :votes, [:voter_id, :voter_type, :vote_scope] add_index :votes, [:votable_id, :votable_type, :vote_scope] end def self.down drop_table :votes end end
Version data entries
6 entries across 6 versions & 1 rubygems