mirror of
https://github.com/1f349/orchid.git
synced 2024-12-22 08:04:10 +00:00
10 lines
360 B
SQL
10 lines
360 B
SQL
select cert.id, cert.not_after, dns.type, dns.token
|
|
from certificates as cert
|
|
left outer join dns on cert.dns = dns.id
|
|
where cert.active = 1
|
|
and cert.auto_renew = 1
|
|
and cert.renewing = 0
|
|
and cert.renew_failed = 0
|
|
and (cert.not_after IS NULL or DATETIME(cert.not_after, 'utc', '-30 days') < DATETIME())
|
|
order by cert.not_after DESC NULLS FIRST
|