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