`CREATE TABLE "user_group_invite" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "userId" character varying(32) NOT NULL, "userGroupId" character varying(32) NOT NULL, CONSTRAINT "PK_3893884af0d3a5f4d01e7921a97" PRIMARY KEY ("id"))`,
);
awaitqueryRunner.query(
`CREATE INDEX "IDX_1039988afa3bf991185b277fe0" ON "user_group_invite" ("userId") `,
);
awaitqueryRunner.query(
`CREATE INDEX "IDX_e10924607d058004304611a436" ON "user_group_invite" ("userGroupId") `,
);
awaitqueryRunner.query(
`CREATE UNIQUE INDEX "IDX_78787741f9010886796f2320a4" ON "user_group_invite" ("userId", "userGroupId") `,
);
awaitqueryRunner.query(
`CREATE UNIQUE INDEX "IDX_d9ecaed8c6dc43f3592c229282" ON "user_group_joining" ("userId", "userGroupId") `,
);
awaitqueryRunner.query(
`ALTER TABLE "user_group_invite" ADD CONSTRAINT "FK_1039988afa3bf991185b277fe03" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`,
);
awaitqueryRunner.query(
`ALTER TABLE "user_group_invite" ADD CONSTRAINT "FK_e10924607d058004304611a436a" FOREIGN KEY ("userGroupId") REFERENCES "user_group"("id") ON DELETE CASCADE ON UPDATE NO ACTION`,
);
}
asyncdown(queryRunner){
awaitqueryRunner.query(
`ALTER TABLE "user_group_invite" DROP CONSTRAINT "FK_e10924607d058004304611a436a"`,
);
awaitqueryRunner.query(
`ALTER TABLE "user_group_invite" DROP CONSTRAINT "FK_1039988afa3bf991185b277fe03"`,
);
awaitqueryRunner.query(`DROP INDEX "IDX_d9ecaed8c6dc43f3592c229282"`);
awaitqueryRunner.query(`DROP INDEX "IDX_78787741f9010886796f2320a4"`);
awaitqueryRunner.query(`DROP INDEX "IDX_e10924607d058004304611a436"`);
awaitqueryRunner.query(`DROP INDEX "IDX_1039988afa3bf991185b277fe0"`);