class CreateFavoriteProjects < ActiveRecord::Migration[6.0] def change create_table :favorite_projects, id: false do |t| t.integer :id, null: false t.integer :user_id, null: false t.string :title t.string :personal_annotation t.timestamps end add_index :favorite_projects, :id, unique: true end end