Sha256: 353a12ba4f3e174d2fcb6e2d29c4230bcde9b28563b0bfd5acb5a081ef12fa94
Contents?: true
Size: 575 Bytes
Versions: 1
Compression:
Stored size: 575 Bytes
Contents
# Migration responsible for creating a table with activities class CreateSharpSocial < ActiveRecord::Migration # Create table def self.up create_table :follows, :force => true do |t| t.references :actor, :polymorphic => true, :null => false t.references :follower, :polymorphic => true, :null => false t.boolean :blocked, :default => false, :null => false t.timestamps end add_index :follows, ["actor_id", "actor_type"] add_index :follows, ["follower_id", "follower_type"] end def self.down drop_table :follows end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sharp_social-0.1.1 | lib/generators/sharp_social/templates/migration.rb |