upd: improve note edit table & improve previous version view

Closes transfem-org/Sharkey#105
This commit is contained in:
Mar0xy 2023-10-22 13:16:30 +02:00
parent 6b3b805a3e
commit d50e81e475
No known key found for this signature in database
GPG key ID: 56569BBE47D2C828
8 changed files with 463 additions and 101 deletions

View file

@ -0,0 +1,13 @@
export class AlterNoteEdit1697970083000 {
name = "AlterNoteEdit1697970083000";
async up(queryRunner) {
await queryRunner.query(`ALTER TABLE "note_edit" RENAME COLUMN "text" TO "newText"`);
await queryRunner.query(`ALTER TABLE "note_edit" ADD COLUMN "oldText" text`);
}
async down(queryRunner) {
await queryRunner.query(`ALTER TABLE "note_edit" RENAME COLUMN "newText" TO "text"`);
await queryRunner.query(`ALTER TABLE "note_edit" DROP COLUMN "oldText"`);
}
}