-- CreateTable
CREATE TABLE "IamRoleIamPolicyAttachment" (
    "iamRoleId" TEXT NOT NULL,
    "iamPolicyId" TEXT NOT NULL,
    "iamPolicyVersion" INTEGER NOT NULL,

    PRIMARY KEY ("iamRoleId", "iamPolicyId", "iamPolicyVersion"),
    CONSTRAINT "IamRoleIamPolicyAttachment_iamRoleId_fkey" FOREIGN KEY ("iamRoleId") REFERENCES "IamRole" ("id") ON DELETE RESTRICT ON UPDATE CASCADE,
    CONSTRAINT "IamRoleIamPolicyAttachment_iamPolicyId_iamPolicyVersion_fkey" FOREIGN KEY ("iamPolicyId", "iamPolicyVersion") REFERENCES "IamPolicy" ("id", "version") ON DELETE RESTRICT ON UPDATE CASCADE
);
