Sha256: 4863e2e8115b3ef92344e20f9d59ff9ed1db9484664c752446035ab494d25f81
Contents?: true
Size: 717 Bytes
Versions: 64
Compression:
Stored size: 717 Bytes
Contents
# This migration comes from dm_core (originally 20140105133446) class ActsAsVotableMigration < ActiveRecord::Migration 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 null: true end if ActiveRecord::VERSION::MAJOR < 4 add_index :votes, [:votable_id, :votable_type] add_index :votes, [:voter_id, :voter_type] 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
64 entries across 64 versions & 4 rubygems