-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
After deleting a project cannot create with the same name. #20
Comments
This behaviour is because of soft delete[Not actually deleting them from DB] of projects. |
@ashutoshd11 Can I take up this issue and create PR for this? It will also solve #21 |
@sachdevavaibhav , thank you for showing interest; your input would very helpful for us. Here are some pointers to keep in mind during development: Avoid Hard Deletion:Hard deleting a project from the database is not advisable because it would also delete all its test cases and runs due to cascading logic. We cannot afford this, as it would make the deleted project unrecoverable. Implementing Soft Deletion:In our current implementation, when updating the project status to “deleted” in the database, we also rename the project to projectName_deleted. This allows a new project with the same original name to be created. However, this introduces a challenge: if a project with the name projectName_deleted already exists, deleting the newly created project becomes problematic. We need to implement logic that checks for existing variations (e.g., _deleted, _deleted1, etc.) and updates the name accordingly during deletion. In the future, we will add a feature to recover deleted data, providing an extra layer of data safety and flexibility. |
@ashutoshd11 , I understood that we need to perform soft delete. However I have a suggestion, we can put timestamp at the end of project name In future when you will add feature to recover deleted data you can simply remove anything after the last underscore while making sure another project with same name does not exist. What do you think about this? |
@sachdevavaibhav this would also works 👍 . |
@ashutoshd11 |
@sachdevavaibhav feature to restore project is not yet implemented. |
Thanks @sachdevavaibhav , added comments in PR. |
Steps to Reproduce
The text was updated successfully, but these errors were encountered: