From 1732e70ddc6c02d28874e080ef3fb8280307bf5a Mon Sep 17 00:00:00 2001 From: VolodymyrK Date: Thu, 13 Jun 2024 14:57:13 +0200 Subject: [PATCH] Fix view --- server/src/migration/1713372155154-CreateRoundsView.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/server/src/migration/1713372155154-CreateRoundsView.ts b/server/src/migration/1713372155154-CreateRoundsView.ts index db0c48a..712b17a 100644 --- a/server/src/migration/1713372155154-CreateRoundsView.ts +++ b/server/src/migration/1713372155154-CreateRoundsView.ts @@ -12,7 +12,7 @@ export class CreateRoundsView1713372155154 implements MigrationInterface { p.jackpot_amount, w.is_finished, p.player_account_hash as winner_account_hash, - last_play.deploy_hash as last_play_deploy_hash, + p.deploy_hash as last_play_deploy_hash, p.timestamp as ended_at from plays p join ( @@ -21,8 +21,7 @@ export class CreateRoundsView1713372155154 implements MigrationInterface { count(*) as plays_num from plays group by round_id - ) w on w.play_id = p.play_id - join plays last_play on last_play.play_id = p.play_id; + ) w on w.play_id = p.play_id; `); }