Sha256: 1ff55a4dcbe25b7c637aa4a80ca1b7f54966e02a018a6d84aedb87c98f1cfef9

Contents?: true

Size: 585 Bytes

Versions: 16

Compression:

Stored size: 585 Bytes

Contents

class ActsAsFollowerMigration < ActiveRecord::Migration
  def self.up
    create_table :follows, :force => true do |t|
      t.references :followable, :polymorphic => true, :null => false
      t.references :follower,   :polymorphic => true, :null => false
      t.boolean :blocked, :default => false, :null => false
      t.timestamps null: true
    end

    add_index :follows, ["follower_id", "follower_type"],     :name => "fk_follows"
    add_index :follows, ["followable_id", "followable_type"], :name => "fk_followables"
  end

  def self.down
    drop_table :follows
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
dm_core-4.2.3.10 db/migrate/20140201092656_acts_as_follower_migration.rb
dm_core-4.2.3.9 db/migrate/20140201092656_acts_as_follower_migration.rb
dm_core-4.2.3.8 db/migrate/20140201092656_acts_as_follower_migration.rb
dm_core-4.2.3.7 db/migrate/20140201092656_acts_as_follower_migration.rb
dm_core-4.2.3.6 db/migrate/20140201092656_acts_as_follower_migration.rb
dm_core-4.2.3.5 db/migrate/20140201092656_acts_as_follower_migration.rb
dm_core-4.2.3.4 db/migrate/20140201092656_acts_as_follower_migration.rb
dm_core-4.2.3.3 db/migrate/20140201092656_acts_as_follower_migration.rb
dm_core-4.2.3.2 db/migrate/20140201092656_acts_as_follower_migration.rb
dm_core-4.2.3.1 db/migrate/20140201092656_acts_as_follower_migration.rb
dm_core-4.2.3 db/migrate/20140201092656_acts_as_follower_migration.rb
dm_core-4.2.2.3 db/migrate/20140201092656_acts_as_follower_migration.rb
dm_core-4.2.2.2 db/migrate/20140201092656_acts_as_follower_migration.rb
dm_core-4.2.2.1 db/migrate/20140201092656_acts_as_follower_migration.rb
dm_core-4.2.2 db/migrate/20140201092656_acts_as_follower_migration.rb
dm_core-4.2.1.5 db/migrate/20140201092656_acts_as_follower_migration.rb