Add "enable RSS" user privacy toggle

This commit is contained in:
Hazelnoot 2024-12-09 09:11:39 -05:00
parent 943c6414d8
commit fe37aa2ce8
15 changed files with 56 additions and 0 deletions

View file

@ -0,0 +1,13 @@
export class AddUserEnableRss1733748798177 {
name = 'AddUserEnableRss1733748798177'
async up(queryRunner) {
// Disable by default, then specifically enable for all existing local users.
await queryRunner.query(`ALTER TABLE "user" ADD "enable_rss" boolean NOT NULL DEFAULT false`);
await queryRunner.query(`UPDATE "user" SET "enable_rss" = true WHERE host IS NULL;`)
}
async down(queryRunner) {
await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "enable_rss"`);
}
}