From fbfb2dc8ed9c473b0c86b80ce4f1f3df022a3aa9 Mon Sep 17 00:00:00 2001 From: Aevann Date: Fri, 4 Aug 2023 00:04:09 +0300 Subject: [PATCH] fix migration --- migrations/20230801-move-lifetimedonated-to-column.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/migrations/20230801-move-lifetimedonated-to-column.sql b/migrations/20230801-move-lifetimedonated-to-column.sql index d80058f7d..327f87064 100644 --- a/migrations/20230801-move-lifetimedonated-to-column.sql +++ b/migrations/20230801-move-lifetimedonated-to-column.sql @@ -1,3 +1,4 @@ +drop function lifetimedonated; alter table users add column lifetimedonated int not null default 0; alter table users alter column lifetimedonated drop default; update users set lifetimedonated=(select sum(amount) from transactions where transactions.email = users.email) where (select sum(amount) from transactions where transactions.email = users.email)>0;