▲ | nlitened 14 hours ago | |
> So you either make the column nullable and slowly backfill it over time. Or you find some default value which isn't null but the code understands it to still be empty. And again, you slowly backfill over time. What would be the justification for using some other “default value” in this case? That’s just null with extra steps. Null _is_ the default value There’s nothing gross or unholy about null values. Very smart people many years ago envisioned them as part of relational databases specifically for the use cases like these. | ||
▲ | mort96 2 hours ago | parent [-] | |
I want to represent that a field should never get new null values, it should be treated as non-nullable for the purpose of writing; however there are historical records which were made before the introduction of the field, so it should be treated as nullable for the purpose of reading. |