Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add restore functionality #143

Open
wants to merge 62 commits into
base: master
Choose a base branch
from
Open

Conversation

mithereal
Copy link

adds the inverse functions of soft delete by setting deleted_at field to nil

@mithereal
Copy link
Author

the reasoning for writing this is bc, i cannot locate the restore function in the codebase, can you tell me which file it is located in? also the reasoning i named it soft_restore is to follow the naming schema of the codebase and to prevent code clashes from other using librarys that might have the restore function defined.

lib/ecto/soft_delete_repo.ex Outdated Show resolved Hide resolved
lib/ecto/soft_delete_repo.ex Outdated Show resolved Hide resolved
Copy link

@Matsa59 Matsa59 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good.

For tests, dunno what to recommend, maybe the maintainer should take a look and suggest a new test strategy

lib/ecto/soft_delete_migration.ex Outdated Show resolved Hide resolved
lib/ecto/soft_delete_repo.ex Outdated Show resolved Hide resolved
test/soft_delete_repo_test.exs Outdated Show resolved Hide resolved
.formatter.exs Outdated Show resolved Hide resolved
Copy link
Author

@mithereal mithereal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be good now i removed the index that was not necessary and cleaned up the test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants