-
Notifications
You must be signed in to change notification settings - Fork 372
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 soft-deletion to companies, jobs, industries #488
Conversation
1147955
to
2a15c53
Compare
@doomspork @tajchumber @gemantzu @burden Guys, what do you think about this? In context of #483 I believe having soft-delete will improve traceability a lot. |
@brain-geek I will look today! Sorry for the delay. I hope that's okay. What do you say? |
@doomspork Thanks, no worries! Just trying to push it out before beginning the next thing. 😄 |
You're the best @brain-geek! 😁 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super stuff @brain-geek! Some thoughts and a few changes. Happy to discuss any of them 😁
@doomspork Thanks for the feedback, I will be applying it in the following days. |
Recently, Devon C. Estes has written the article about soft deletion using the PostgreSQL schema. May use a similar approach, then we will not have to worry about the |
Good point @Nitrino! When we retweet that article on Elixir School someone had responded suggesting this was not an ideal approach. It might be worth looking into their feedback: https://twitter.com/atomkirk/status/1101566414668869637 |
@Nitrino Thanks for the link. I've looked through the article and found it interesting. However, I believe that this project is also intended to be checked out by new Elixir devs, and having some magic inside the postgresql would be hard to follow. However, it may be better to change What do you think? |
@doomspork well, I don't agree with |
💯 — very good point. I think this is reason enough not to use it.
Are you suggesting ditching the boolean |
@brain-geek I agree, the approach with schemas is opaque for new developers. |
ce27512
to
cbf64bc
Compare
@doomspork Please review again. I believe I fixed all the issues. 😄 |
Can I add my two cents, as I am not totally behind doing this this way right now? My take on this issue would be to add an Also, to add full trackability on what changes we have, we could change pending_changes to have an record id field (we already have the corresponding table name on it), so we can track ( and probably show? ) what changes and on what date have occured on a record. I am not saying we should not do it like this, I am just stating some thoughts out loud. |
@gemantzu / @brain-geek where are we with this? Do we want to move ahead with this approach and come back to @gemantzu's comments or look at incorporating that now? Happy to help with the work 😁 |
@doomspork I'll have comments fixed today. |
Hm, @doomspork , I don't think this approach differs much from one proposed by @gemantzu . This change only adds a field to mark a record as deleted. Only data attached there is why (pending change reference). Also, if someone deleted a company - that's for a good reason. Let them create a new one instead, IMO. Having full accountability would be nice, and I agree that would be a useful feature. |
6ebe4d2
to
027d3c3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small change and this looks good to me @brain-geek. I'd love to get at least one other set of eyes on this before merging though.
027d3c3
to
e1fcf64
Compare
@doomspork Fixed. Let's wait for other reviews. |
I see an error when trying to manually test the functionality. Do you see them in your local repo? |
I will test this out this weekend @brain-geek and see if I can reproduce @gemantzu's aforementioned errors 👍 |
Sorry for slow responses. I've seen the feedback, will be fixing it this or next weekend. |
No worries @brain-geek, take your time. Thanks again for the help! Happy Friday 😁 |
e1fcf64
to
30f0951
Compare
@maartenvanvliet do you mind taking a peek at this PR? @brain-geek is getting back into open source and wants to wrap up these two outstanding out PRs of his (the other is draft #483). Thank you again for all your help 💜 |
@brain-geek I fixed the failing tests and the conflict locally. If you give me contributor access to your fork I can push the commit over to ya so we can get this merged 😁 You may also be able to cherry-pick it: |
d6d6eaa
to
6958222
Compare
@doomspork Wow, thanks a lot! Cherry picked and merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few comments but looks good
Thank you so much for taking a look @maartenvanvliet 💜 @brain-geek you're most welcome buddy! Always happy to help ya 😁 |
@doomspork Thanks for help! It feels like cheating. 🔥 |
720b8a4
to
1fc361e
Compare
@maartenvanvliet Could you look at this PR once again? I've applied your changes. @doomspork Thanks for the help! Any ideas what also needs to be changed before merging? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The first version, feel free to give comments.