/*
  Warnings:

  - You are about to drop the column `provideraccountid` on the `provider_entity` table. All the data in the column will be lost.

*/
-- DropForeignKey
ALTER TABLE "provider_entity" DROP CONSTRAINT "provider_entity_tonicAccountId_fkey";

-- DropForeignKey
ALTER TABLE "provider_entity" DROP CONSTRAINT "provider_entity_tonicCountryId_fkey";

-- DropForeignKey
ALTER TABLE "provider_entity" DROP CONSTRAINT "provider_entity_tonicOfferId_fkey";

-- AlterTable
ALTER TABLE "provider_account" RENAME CONSTRAINT "tonic_account_pkey" TO "provider_account_pkey";

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

-- AddForeignKey
ALTER TABLE "provider_entity" ADD CONSTRAINT "provider_entity_tonicOfferId_fkey" FOREIGN KEY ("tonicOfferId") REFERENCES "tonic_offer"("id") ON DELETE SET NULL ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "provider_entity" ADD CONSTRAINT "provider_entity_tonicCountryId_fkey" FOREIGN KEY ("tonicCountryId") REFERENCES "tonic_country"("id") ON DELETE SET NULL ON UPDATE CASCADE;

-- AddForeignKey
ALTER TABLE "provider_entity" ADD CONSTRAINT "provider_entity_providerAccountId_fkey" FOREIGN KEY ("providerAccountId") REFERENCES "provider_account"("id") ON DELETE SET NULL ON UPDATE CASCADE;

-- RenameIndex
ALTER INDEX "tonic_account_type_key" RENAME TO "provider_account_type_key";
