Skip to content

Foreign key references to User table #103

Closed Answered by neonexus
MaheshkumarSundaram asked this question in Q&A
Discussion options

You must be logged in to vote

@MaheshkumarSundaram This is why it is best practice to never delete a user record, but instead, use soft-deletes, like I do in the user model. I have a deletedAt (and deletedBy) which I use in the login controller; but now that I look at it, needs to be added to the isLoggedIn policy... So I have a new update coming soon...

Essentially, the idea is, if even you recreate the user, you can still use the deleted user as a pointer, not just to the user, but that user in time.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@neonexus
Comment options

@MaheshkumarSundaram
Comment options

Answer selected by MaheshkumarSundaram
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants