[BUG]Deleted domain relations and activity history reappear when a domain is recreated with the same name
Affected module
Governance (Glossary / Classification / Domains)
Describe the bug
When a domain is deleted and later recreated with the same name, previously associated assets and historical activity feed entries are automatically linked to the newly created domain.
This behavior is observed even after the original domain has been hard deleted through the UI.
To Reproduce
Steps to Reproduce User A creates a domain (e.g., Domain X). Add assets to the domain. Delete the domain. User B creates a new domain with the same name (Domain X). Open the newly created domain.
Expected behavior
Actual Behavior Assets that were associated with the deleted domain automatically appear in the newly created domain. Historical activity entries from the previous domain are visible, including events such as "User A deleted domain X".
Expected Behavior A newly created domain should be treated as a completely new entity, regardless of its name. Previously deleted domain associations, assets, and activity feed history should not be restored or inherited. Domain relationships should be tied to the domain entity ID rather than the domain name.
OS
No response
Python version
No response
OpenMetadata version
No response
OpenMetadata Ingestion package version
No response
Additional context
No response
Pre-submission checklist
- [x] I searched for duplicate issues.
- [x] I removed credentials, hostnames, emails, and other sensitive data from logs and config.
@nikhilchennam want to work on this bug
@ShisuiCode Added you as assignee feel free to open a PR
same issue observed in Glossary terms associations. When a glossary term is linked to an asset, and then the same glossary terms gets renamed, OM displays no data available for that asset until the glossary term is restored with the previous name. assets should be linked to glossary term id not names. should this be a new issue or can it be fixed with existing one?