mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 08:04:40 -04:00
Update prune data script
This commit is contained in:
parent
0e21863f8c
commit
56576e8f59
@ -39,6 +39,8 @@ class PruneData extends Command
|
|||||||
left join expenses e on e.account_id = a.id
|
left join expenses e on e.account_id = a.id
|
||||||
left join users u on u.account_id = a.id and u.registered = 1
|
left join users u on u.account_id = a.id and u.registered = 1
|
||||||
where c.created_at < DATE_SUB(now(), INTERVAL 6 MONTH)
|
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
|
group by c.id
|
||||||
having count(cl.id) = 0
|
having count(cl.id) = 0
|
||||||
and count(t.id) = 0
|
and count(t.id) = 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user