News for hackers. Stuff that matters.
Re:Some SQL Tricks of an Application DBA by niccl on Wednesday July 29, 2020 @05:14PM (#23991672)
My fix for this is to rename the table to something like _b_<table_name> then create a view <table_name> that excludes the 'deleted' values (based on the value in DeletedReason column). That way you make one change to the structure when you create the column, and everything else Just Works
Re:Some SQL Tricks of an Application DBA by munk-a on Thursday July 30, 2020 @02:18PM (#24001323)
We use the same approach and specifically use a "...withdeleted" suffix for the table - you got a table of containing widget objects there? how about a "widgetwithdeleted" table.