/*
  Warnings:

  - You are about to drop the column `account_id` on the `chat` table. All the data in the column will be lost.
  - You are about to drop the column `account_id` on the `message` table. All the data in the column will be lost.
  - Added the required column `connected_accounts` to the `chat` table without a default value. This is not possible if the table is not empty.
  - Added the required column `connected_accounts` to the `message` table without a default value. This is not possible if the table is not empty.

*/
-- AlterTable
ALTER TABLE "chat" DROP COLUMN "account_id",
ADD COLUMN     "connected_accounts" JSONB NOT NULL DEFAULT '{}';

-- AlterTable
ALTER TABLE "message" DROP COLUMN "account_id",
ADD COLUMN     "connected_accounts" JSONB NOT NULL DEFAULT '{}';

-- Remove the default constraints after data migration
ALTER TABLE "chat" ALTER COLUMN "connected_accounts" DROP DEFAULT;
ALTER TABLE "message" ALTER COLUMN "connected_accounts" DROP DEFAULT;
