whywaita / myshoes

Auto-scaling VirtualMachine runner 🏃 for GitHub Actions
MIT License
135 stars 14 forks source link

myshoes can't delete targets if runners is exist #31

Closed whywaita closed 3 years ago

whywaita commented 3 years ago
mysql> delete from targets where uuid = "UUID";
ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraint fails (`myshoes`.`runners`, CONSTRAINT `runners_ibfk_1` FOREIGN KEY (`target_id`) REFERENCES `targets` (`uuid`) ON DELETE RESTRICT)
whywaita commented 3 years ago

need to add status suspend?

whywaita commented 3 years ago

fixed from #33

whywaita commented 3 years ago

We need to add deleted in target

whywaita commented 3 years ago

I added deleted status in https://github.com/whywaita/myshoes/commit/8da5ff5cd2a345c0faef83e95f8d62f7ecb96dfe#diff-466d38fdde5642da27bcd2f2e8c753c325f941ee5f9cf74dbbc32c52689343e7R125.

We will discuss DELETE /target/{uuid} in #38 .