Sha256: 71a158e5653eb6f7b5af369c99357ac2533718a7ad72623cdf94881094596e14
Contents?: true
Size: 800 Bytes
Versions: 2
Compression:
Stored size: 800 Bytes
Contents
# Migration responsible for creating a table with activities class CreateSharpSocial < ActiveRecord::Migration # Create table def self.up create_table :activities do |t| t.references :actor, :polymorphic => true, :null => false t.text :content t.timestamps end add_index :activities, [:actor_id, :actor_type] 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 # Drop table def self.down drop_table :activities end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
sharp_social-0.1.1 | spec/dummy/db/migrate/20130423080539_create_sharp_social.rb |
sharp_social-0.0.1 | spec/dummy/db/migrate/20130423080539_create_sharp_social.rb |