Sha256: 630e54946f2f0961c1e79aa7aab615825009941f45e7d7a39d4cc281576b7d1b

Contents?: true

Size: 436 Bytes

Versions: 38

Compression:

Stored size: 436 Bytes

Contents

class CreateFollows < ActiveRecord::Migration
  def change
    create_table :follows do |t|
      t.string  :follower_type
      t.integer :follower_id
      t.string  :followable_type
      t.integer :followable_id
      t.datetime :created_at
    end

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

Version data entries

38 entries across 20 versions & 2 rubygems

Version Path
socialization-2.0.1 lib/generators/socialization/templates/active_record/migration_follows.rb
socialization-2.0.0 lib/generators/socialization/templates/active_record/migration_follows.rb
socialization-1.2.3 demo/db/migrate/20120115054646_create_follows.rb
socialization-1.2.3 lib/generators/socialization/templates/active_record/migration_follows.rb
socialization-1.2.2 demo/db/migrate/20120115054646_create_follows.rb
socialization-1.2.2 lib/generators/socialization/templates/active_record/migration_follows.rb
socialization-1.2.1 demo/db/migrate/20120115054646_create_follows.rb
socialization-1.2.1 lib/generators/socialization/templates/active_record/migration_follows.rb
twrk-socialization-1.2.0 lib/generators/socialization/templates/active_record/migration_follows.rb
twrk-socialization-1.2.0 demo/db/migrate/20120115054646_create_follows.rb
twrk-socialization-0.0.1 demo/db/migrate/20120115054646_create_follows.rb
twrk-socialization-0.0.1 lib/generators/socialization/templates/active_record/migration_follows.rb
socialization-1.2.0 demo/db/migrate/20120115054646_create_follows.rb
socialization-1.2.0 lib/generators/socialization/templates/active_record/migration_follows.rb
socialization-1.1.0 lib/generators/socialization/templates/active_record/migration_follows.rb
socialization-1.1.0 demo/db/migrate/20120115054646_create_follows.rb
socialization-1.0.0 demo/db/migrate/20120115054646_create_follows.rb
socialization-1.0.0 lib/generators/socialization/templates/active_record/migration_follows.rb
socialization-0.5.0.beta4 lib/generators/socialization/templates/active_record/migration_follows.rb
socialization-0.5.0.beta4 demo/db/migrate/20120115054646_create_follows.rb