Just add a column...and then rewrite all of your data access code to respect this new logic. This is a ton of work!
Just add a column...and then rewrite all of your data access code to respect this new logic. This is a ton of work!
So is rewriting all your data access code to pay attention to the sign bit!
All we are accomplishing with flipping the sign is unlinking an existing refence. That can be useful in a deployed app depending on the situation, like in production support scenarios. I would not design an app this way, but that does not mean it is not useful in existing apps
So you're not adding a feature, you're just manually screwing with the DB in a live support situation? Again, there are better ways, and the fact that this error may be useful in a particular scenario does not mean that it is necessary or a good idea.
Yep sometimes a FK row needs to be separated from the parent row. And I don't want to hard delete it. That can be really problematic if there are enforced integrity constraints. And lots of FKs directly reference parent PKs. signed int keys really help here
Then again I submit that you are doing something dangerous and unnecessary, and it is just luck that it hasn't bitten you yet.