forked from FoundKeyGang/FoundKey
Johann150
bc1c66e16e
This API endpoint is not working correctly and can cause unintended data loss: It may remove emojis that have been imported from other instances. See also https://github.com/misskey-dev/misskey/issues/8222
13 lines
720 B
JavaScript
13 lines
720 B
JavaScript
export class driveFileUserConstraint1659516638000 {
|
|
name = 'driveFileUserConstraint1659516638000';
|
|
|
|
async up(queryRunner) {
|
|
await queryRunner.query(`ALTER TABLE "drive_file" DROP CONSTRAINT "FK_860fa6f6c7df5bb887249fba22e"`);
|
|
await queryRunner.query(`ALTER TABLE "drive_file" ADD CONSTRAINT "FK_860fa6f6c7df5bb887249fba22e" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE RESTRICT`);
|
|
}
|
|
|
|
async down(queryRunner) {
|
|
await queryRunner.query(`ALTER TABLE "drive_file" DROP CONSTRAINT "FK_860fa6f6c7df5bb887249fba22e"`);
|
|
await queryRunner.query(`ALTER TABLE "drive_file" ADD CONSTRAINT "FK_860fa6f6c7df5bb887249fba22e" FOREIGN KEY ("userId") REFERENCES "user"("id") ON DELETE SET NULL`);
|
|
}
|
|
}
|