misskey/packages/backend/migration/1696604572677-poll_vote_pol...

13 lines
404 B
JavaScript
Raw Normal View History

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"`);
}
}