PowerDNS / pdns

PowerDNS Authoritative, PowerDNS Recursor, dnsdist
https://www.powerdns.com/
GNU General Public License v2.0
3.71k stars 908 forks source link

Schema: stop using NULL fields #2388

Open zeha opened 9 years ago

zeha commented 9 years ago

I propose to make these fields NOT NULL:

Maybe someone else can shed light on the NULL status of the other fields.

Why?

IMO it'd be a lot better if inside pdns we can depend on fields being filled with some value (even if it's the empty string or 0), AND we can write to those fields the universal empty values (0/'') without writing any database-specific code.

See #2211 and #2064 for cases where we are/should be writing to currently NULLable fields but users (may) expect us to write NULL and we aren't.

pieterlexis commented 8 years ago

see also #3024

pieterlexis commented 8 years ago

this will be a schema change (that we don't want for 4.0.0, moving to 4.1.0)