February 3, 2023 at 12:00 am
Comments posted to this topic are about the item Nullable vs Non-Nullable Columns and Adding Not Null Without Downtime in PostgreSQL
February 8, 2023 at 5:33 am
An issue that can arise with non nullable columns is that if at a later time you realise you need them to be null after all , due to some edge case, then you have lots of updating to do.
A good example of this is the new laws coming on the books in California and Europe on data privacy. We may think we need to have first and last name and other fields to be required, until a new law comes into effect on data privacy. Here would be a good place to define a gray area. That is, to ask though we dont have a immediate need to delete certain personally identifiable information now,... can that channge in the future. If this is foreseeable, then a constraint on the table may be a better option. These can simply be dropped at the right time.
----------------------------------------------------
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy