1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-11-28 14:58:29 +09:00
cherrypick/packages/backend/migration/1696604572677-poll-vote-poll.js
2023-10-25 18:17:05 +09:00

13 lines
404 B
JavaScript

export class PollVotePoll1696604572677 {
name = 'PollVotePoll1696604572677';
async up(queryRunner) {
await queryRunner.query(`ALTER TABLE "poll_vote" ADD CONSTRAINT "FK_poll_vote_poll" FOREIGN KEY ("noteId") REFERENCES "poll"("noteId") ON DELETE CASCADE`);
}
async down(queryRunner) {
await queryRunner.query(`ALTER TABLE "poll_vote" DROP CONSTRAINT "FK_poll_vote_poll"`);
}
}