-- AlterEnum
-- This migration adds more than one value to an enum.
-- With PostgreSQL versions 11 and earlier, this is not possible
-- in a single migration. This can be worked around by creating
-- multiple migrations, each migration adding only one value to
-- the enum.


ALTER TYPE "ExternalServiceType" ADD VALUE 'Highline';
ALTER TYPE "ExternalServiceType" ADD VALUE 'Lowline';

-- AlterTable
ALTER TABLE "Member" ADD COLUMN     "destinationFinancialAccountId" UUID,
ADD COLUMN     "paymentsExternalServiceId" TEXT NOT NULL DEFAULT '',
ADD COLUMN     "paymentsExternalServiceMetadata" JSONB,
ADD COLUMN     "paymentsExternalServiceType" "ExternalServiceType";

-- AlterTable
ALTER TABLE "Organization" ADD COLUMN     "highlineExternalServiceId" TEXT NOT NULL DEFAULT '';

-- AddForeignKey
ALTER TABLE "Member" ADD CONSTRAINT "Member_destinationFinancialAccountId_fkey" FOREIGN KEY ("destinationFinancialAccountId") REFERENCES "FinancialAccount"("id") ON DELETE SET NULL ON UPDATE CASCADE;
