fix migration

master
Aevann 2023-08-04 00:04:09 +03:00
parent 14b1285479
commit fbfb2dc8ed
1 changed files with 1 additions and 0 deletions

View File

@ -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;