You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In version v2.7.14 using official mysql docker image
When I want to remove an inventory, I get this message:
But I was able to figure out what that errors means. In the database, we cannot remove any row that is linked in another row.
The problem is actually that no template is removed from the database. As you can see here:
My template page:
My project__template table
So we cannot remove any row which was previously linked to those templates...
Steps to reproduice:
Create a template
Remove the template
(try to) Remove the inventory which was used by the template
The text was updated successfully, but these errors were encountered:
Agree, it is a bug. Task template can't be deleted from database because it is linked with task logs. I sure we should preserve task logs for audit purpose.
But I not sure the best solution. We can set null inventory_id, repository_id, etc of deleted templates.
Or we can use removed flag for environment and inventories.
I feel like it's best to not keep too much unused things in the database, as it can end up taking a lot of storage. I'd not keep those logs for audit purposes, as I don't really see why someone would need it after having deleted the template.
But if we absolutely must keep those logs, I'd suggest doing this: Moving those logs in another table let's say backup__logs and then remove the task template, so we won't have anything linked anymore.
In version v2.7.14 using official mysql docker image
When I want to remove an inventory, I get this message:
But I was able to figure out what that errors means. In the database, we cannot remove any row that is linked in another row.
The problem is actually that no template is removed from the database. As you can see here:
My template page:
My project__template table
So we cannot remove any row which was previously linked to those templates...
Steps to reproduice:
The text was updated successfully, but these errors were encountered: