fix migration
This commit is contained in:
parent
a707788c31
commit
93867ec927
|
@ -5,11 +5,13 @@ export class CleanCharts1680375641101 {
|
||||||
async up(queryRunner) {
|
async up(queryRunner) {
|
||||||
await queryRunner.query(`delete from __chart__hashtag where ___local_users = 0 and ___remote_users = 0;`);
|
await queryRunner.query(`delete from __chart__hashtag where ___local_users = 0 and ___remote_users = 0;`);
|
||||||
await queryRunner.query(`delete from __chart_day__hashtag where ___local_users = 0 and ___remote_users = 0;`);
|
await queryRunner.query(`delete from __chart_day__hashtag where ___local_users = 0 and ___remote_users = 0;`);
|
||||||
|
await queryRunner.query(`COMMIT;`);
|
||||||
await queryRunner.query(`vacuum __chart__hashtag;`);
|
await queryRunner.query(`vacuum __chart__hashtag;`);
|
||||||
await queryRunner.query(`vacuum __chart_day__hashtag;`);
|
await queryRunner.query(`vacuum __chart_day__hashtag;`);
|
||||||
|
await queryRunner.query(`COMMIT;`);
|
||||||
}
|
}
|
||||||
async down(queryRunner) {
|
async down(queryRunner) {
|
||||||
await queryRunner.query(`vacuum __chart__hashtag;`);
|
await queryRunner.query(`delete from __chart__hashtag where ___local_users = 0 and ___remote_users = 0;`);
|
||||||
await queryRunner.query(`vacuum __chart_day__hashtag;`);
|
await queryRunner.query(`delete from __chart_day__hashtag where ___local_users = 0 and ___remote_users = 0;`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue