Describe the bug
When deleting a host, the certificate assigned to that host is left behind in the database.
Your Environment (please supply the following information):
n/a
Steps To Reproduce
- On the MySQL database, run
select c.id,serial,h.id,hostname from certificates as c left join hosts as h on c.id=h.c_id;
- Go to a zone
- Pick a host and find its serial number in the database output
- Delete that host from that zone
- Re-run the MySQL query in step 1, and see that the serial is still in the table, and the hostname is gone.
Caution: a certificate should not be deleted unless it has no hosts that reference it. (A certificate is able to have more than 1 host referencing it.)
Additional Info
Before:
| 306 | 12347781757552318374407394452727290987 | 27 | myserver.example.com |
After:
| 306 | 12347781757552318374407394452727290987 | NULL | NULL |
Describe the bug
When deleting a host, the certificate assigned to that host is left behind in the database.
Your Environment (please supply the following information):
n/a
Steps To Reproduce
select c.id,serial,h.id,hostname from certificates as c left join hosts as h on c.id=h.c_id;Caution: a certificate should not be deleted unless it has no
hoststhat reference it. (A certificate is able to have more than 1 host referencing it.)Additional Info
Before:
After: