Sha256: 459c16ea2ee37e28cafe54f77fc979336cbce65f5882d95c3a64d0ef2969af6a
Contents?: true
Size: 353 Bytes
Versions: 11
Compression:
Stored size: 353 Bytes
Contents
class CreateLikes < ActiveRecord::Migration def change create_table :likes do |t| t.boolean :positive, default: true t.integer :target_id t.string :target_type, limit: 60, null: false t.integer :user_id t.timestamps end add_index :likes, [:target_id, :user_id, :target_type], unique: true end end
Version data entries
11 entries across 11 versions & 1 rubygems