Sha256: 0fe56c69c300aa0a3731fe042ac49c3715c68e5b416ebb8cbde36f6666edaa73
Contents?: true
Size: 554 Bytes
Versions: 3
Compression:
Stored size: 554 Bytes
Contents
class CreateStashedItems < ActiveRecord::Migration def up create_table :recommendable_stashed_items do |t| t.references :user t.references :stashable, :polymorphic => true t.timestamps end add_index :recommendable_stashed_items, :stashable_id add_index :recommendable_stashed_items, :stashable_type add_index :recommendable_stashed_items, [:user_id, :stashable_id, :stashable_type], :unique => true, :name => "user_stashed_constraint" end def down drop_table :recommendable_stashed_items end end
Version data entries
3 entries across 3 versions & 1 rubygems