For 19_STABLE I fixed that by adding one default value in data_update_instance() but that isn't the definitive change, because that field will be plagued with zeros and nulls (depending of the DB).
So, we need to definitively fix this under Moodle 2.0 (requires DB changes). The plan is:
1) Require permission to MD about to change DB in HEAD (perhaps we are still sticky to 19_STABLE). If permission is given, continue, else, hant until HEAD DB changes are allowed.
2) As part of the data module upgrade script:
a) Upgrade all the data->notifications currently being NULL to 0 (zero).
b) Modify the field to be NOT NULL
c) Modify the field to have a DEFAULT of 0 (zero)
(note b & c must be performed in two steps)
3) Modify install.xml (for new installations) in order to have that field defined as NOT NULL DEFAULT 0
4) Upgrade data module version.php to make the upgrade happen.
All these exclusively under HEAD. As said, plz, confirm with MD if we are free to start changing DB in HEAD.