Sha256: ac5629c02e85ecce58bdc57ad967f5073709801ce2392c7e0776ff70fd4c464f

Contents?: true

Size: 574 Bytes

Versions: 64

Compression:

Stored size: 574 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
    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

64 entries across 57 versions & 5 rubygems

Version Path
sufia-4.0.0.beta2 sufia-models/lib/generators/sufia/models/templates/migrations/acts_as_follower_migration.rb
sufia-models-4.0.0.beta2 lib/generators/sufia/models/templates/migrations/acts_as_follower_migration.rb
sufia-4.0.0.beta1 sufia-models/lib/generators/sufia/models/templates/migrations/acts_as_follower_migration.rb
sufia-models-4.0.0.beta1 lib/generators/sufia/models/templates/migrations/acts_as_follower_migration.rb
curate-0.6.6 spec/internal/db/migrate/20140328183262_acts_as_follower_migration.rb
sufia-models-3.7.2 lib/generators/sufia/models/templates/migrations/acts_as_follower_migration.rb
sufia-3.7.2 sufia-models/lib/generators/sufia/models/templates/migrations/acts_as_follower_migration.rb
sufia-models-3.7.1 lib/generators/sufia/models/templates/migrations/acts_as_follower_migration.rb
sufia-3.7.1 sufia-models/lib/generators/sufia/models/templates/migrations/acts_as_follower_migration.rb
sufia-models-3.7.0 lib/generators/sufia/models/templates/migrations/acts_as_follower_migration.rb
sufia-3.7.0 sufia-models/lib/generators/sufia/models/templates/migrations/acts_as_follower_migration.rb
curate-0.6.4 spec/internal/db/migrate/20140131175505_acts_as_follower_migration.rb
sufia-3.6.1 sufia-models/lib/generators/sufia/models/templates/migrations/acts_as_follower_migration.rb
sufia-models-3.6.1 lib/generators/sufia/models/templates/migrations/acts_as_follower_migration.rb
sufia-3.6.0 sufia-models/lib/generators/sufia/models/templates/migrations/acts_as_follower_migration.rb
sufia-models-3.6.0 lib/generators/sufia/models/templates/migrations/acts_as_follower_migration.rb
curate-0.6.3 spec/internal/db/migrate/20131205204131_acts_as_follower_migration.rb
sufia-3.5.0 sufia-models/lib/generators/sufia/models/templates/migrations/acts_as_follower_migration.rb
sufia-models-3.5.0 lib/generators/sufia/models/templates/migrations/acts_as_follower_migration.rb
acts_as_follower-0.2.1 lib/generators/templates/migration.rb