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