/*
  Warnings:

  - You are about to drop the column `function_call` on the `message` table. All the data in the column will be lost.
  - You are about to drop the column `name` on the `message` table. All the data in the column will be lost.
  - The primary key for the `tool_call` table will be changed. If it partially fails, the table could be left without primary key constraint.

*/
-- DropForeignKey
ALTER TABLE "tool_call" DROP CONSTRAINT "tool_call_tool_id_fkey";

-- AlterTable
ALTER TABLE "message" DROP COLUMN "function_call",
DROP COLUMN "name",
ADD COLUMN     "tool_call_ids" TEXT[];

-- AlterTable
ALTER TABLE "tool_call" DROP CONSTRAINT "tool_call_pkey",
ALTER COLUMN "id" DROP DEFAULT,
ALTER COLUMN "id" SET DATA TYPE TEXT,
ADD CONSTRAINT "tool_call_pkey" PRIMARY KEY ("id");
DROP SEQUENCE "tool_call_id_seq";
