Sha256: 470c73581b8381f763abe3488996df1f63f0e99643df76de921d4f650f9d8a39
Contents?: true
Size: 559 Bytes
Versions: 8
Compression:
Stored size: 559 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: false 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
8 entries across 8 versions & 1 rubygems