Update prune data script
This commit is contained in:
parent
0e21863f8c
commit
56576e8f59
1 changed files with 2 additions and 0 deletions
|
|
@ -39,6 +39,8 @@ class PruneData extends Command
|
|||
left join expenses e on e.account_id = a.id
|
||||
left join users u on u.account_id = a.id and u.registered = 1
|
||||
where c.created_at < DATE_SUB(now(), INTERVAL 6 MONTH)
|
||||
and c.trial_started is null
|
||||
and c.plan is null
|
||||
group by c.id
|
||||
having count(cl.id) = 0
|
||||
and count(t.id) = 0
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue