mizzkey/packages/backend/migration/1696604572677-poll_vote_poll.js
Caipira e9fda7dd1a feat(backend): Federated note update (#1)
(cherry picked from commit 6af23d4e28893b0ab253182153973bcad1210ac0)
2024-02-13 12:45:49 +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"`);
}
}