/*
  Warnings:

  - Added the required column `userId` to the `Transfer` table without a default value. This is not possible if the table is not empty.

*/
-- AlterTable
ALTER TABLE "Transfer" ADD COLUMN     "userId" UUID NOT NULL;

-- CreateIndex
CREATE INDEX "Card_externalServiceId_idx" ON "Card"("externalServiceId");

-- CreateIndex
CREATE INDEX "ChannelNotification_externalServiceId_idx" ON "ChannelNotification"("externalServiceId");

-- CreateIndex
CREATE INDEX "FinancialAccount_externalServiceId_idx" ON "FinancialAccount"("externalServiceId");

-- CreateIndex
CREATE INDEX "Member_externalServiceId_idx" ON "Member"("externalServiceId");

-- CreateIndex
CREATE INDEX "MemberPaycheck_externalServiceId_idx" ON "MemberPaycheck"("externalServiceId");

-- CreateIndex
CREATE INDEX "Organization_externalServiceId_idx" ON "Organization"("externalServiceId");

-- CreateIndex
CREATE INDEX "Owner_externalServiceId_idx" ON "Owner"("externalServiceId");

-- CreateIndex
CREATE INDEX "PayrollProvider_externalServiceId_idx" ON "PayrollProvider"("externalServiceId");

-- CreateIndex
CREATE INDEX "Tag_externalServiceId_idx" ON "Tag"("externalServiceId");

-- CreateIndex
CREATE INDEX "TagType_externalServiceId_idx" ON "TagType"("externalServiceId");

-- CreateIndex
CREATE INDEX "Transfer_externalServiceId_idx" ON "Transfer"("externalServiceId");

-- CreateIndex
CREATE INDEX "User_externalServiceId_idx" ON "User"("externalServiceId");

-- AddForeignKey
ALTER TABLE "Transfer" ADD CONSTRAINT "Transfer_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
