Sha256: 2e2e7ad975e9c92b21a0b99c7f4a59e0a5bf60e8a085a23613ff25236d1f05c0
Contents?: true
Size: 496 Bytes
Versions: 5
Compression:
Stored size: 496 Bytes
Contents
class ActsAsVotableMigration < ActiveRecord::Migration[4.2] 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
5 entries across 5 versions & 1 rubygems