2023-04-01 13:03:49 -06:00
|
|
|
export class CleanCharts1680375641101 {
|
2023-04-06 19:56:46 -06:00
|
|
|
constructor() {
|
|
|
|
this.name = "CleanCharts1680375641101";
|
|
|
|
}
|
|
|
|
async up(queryRunner) {
|
|
|
|
await queryRunner.query(
|
2023-06-05 22:15:49 -06:00
|
|
|
`delete from __chart__hashtag where ___local_users = 0 and ___remote_users = 0;`,
|
2023-04-06 19:56:46 -06:00
|
|
|
);
|
|
|
|
await queryRunner.query(
|
2023-06-05 22:15:49 -06:00
|
|
|
`delete from __chart_day__hashtag where ___local_users = 0 and ___remote_users = 0;`,
|
2023-04-06 19:56:46 -06:00
|
|
|
);
|
2023-06-05 22:15:49 -06:00
|
|
|
await queryRunner.query(`COMMIT;`);
|
|
|
|
await queryRunner.query(`vacuum __chart__hashtag;`);
|
|
|
|
await queryRunner.query(`vacuum __chart_day__hashtag;`);
|
|
|
|
await queryRunner.query(`COMMIT;`);
|
2023-04-06 19:56:46 -06:00
|
|
|
}
|
|
|
|
async down(queryRunner) {
|
|
|
|
await queryRunner.query(
|
2023-06-05 22:15:49 -06:00
|
|
|
`delete from __chart__hashtag where ___local_users = 0 and ___remote_users = 0;`,
|
2023-04-06 19:56:46 -06:00
|
|
|
);
|
|
|
|
await queryRunner.query(
|
2023-06-05 22:15:49 -06:00
|
|
|
`delete from __chart_day__hashtag where ___local_users = 0 and ___remote_users = 0;`,
|
2023-04-06 19:56:46 -06:00
|
|
|
);
|
|
|
|
}
|
2023-04-01 13:03:49 -06:00
|
|
|
}
|