DJ XtAzY
Active member
So I've been creating some in-house addons and it's been doing great...until I disable them. I did add new columns (varchar types) to an existing xenforo table. Basically my question is that if I do create new columns and add them to an existing xf table, should I set them to default to NULL? I did extend DataWriter so I guess when I disable the addon, the original DataWriter class doesn't know what values to set for those extra columns. I just learned this now from Mike's quote:
If you're adding columns to existing tables, you must add a default value. Why? It's not for your code, it's not for the data writer.
It's for when people disable your add-on (or if someone does happen to insert into the DB without a data writer).