/*
  Warnings:

  - You are about to drop the column `tonicAccountId` on the `provider_entity` table. All the data in the column will be lost.
  - You are about to drop the `tonic_account` table. If the table is not empty, all the data it contains will be lost.

*/

-- AlterTable
ALTER TABLE "provider_entity" RENAME COLUMN "tonicAccountId" TO providerAccountId;

-- ADD COLUMN     "providerAccountId" INTEGER,
ALTER TABLE "provider_entity"
ALTER COLUMN "externalId" DROP NOT NULL,
ALTER COLUMN "name" DROP NOT NULL,
ALTER COLUMN "status" DROP NOT NULL,
ALTER COLUMN "imprint" DROP NOT NULL,
ALTER COLUMN "target" DROP NOT NULL,
ALTER COLUMN "tonicCountryId" DROP NOT NULL,
ALTER COLUMN "tonicOfferId" DROP NOT NULL,
ALTER COLUMN "type" DROP NOT NULL,
ALTER COLUMN "url" DROP NOT NULL;

-- DropTable
ALTER TABLE "tonic_account" RENAME TO "provider_account";
