Massive/migrations/1678334268359-add-backup.ts
Brandon Presley 13b340f5be Add setting to automatically backup - 1.130
Every day at 6am (also immediately when toggled)
we will copy the massive.db file to the Download
directory.
2023-03-09 17:16:08 +13:00

14 lines
439 B
TypeScript

import {MigrationInterface, QueryRunner} from 'typeorm'
export class addBackup1678334268359 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner
.query('ALTER TABLE settings ADD COLUMN backup BOOLEAN DEFAULT false')
.catch(() => null)
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.dropColumn('settings', 'backup')
}
}