-- AlterTable
ALTER TABLE "todos" ADD COLUMN     "product_id" TEXT;

-- CreateIndex
CREATE INDEX "todos_user_id_product_id_idx" ON "todos"("user_id", "product_id");

-- AddForeignKey
ALTER TABLE "todos" ADD CONSTRAINT "todos_product_id_fkey" FOREIGN KEY ("product_id") REFERENCES "products"("id") ON DELETE SET NULL ON UPDATE CASCADE;
