User:Brion/DB defaults

Non-empty default values for database fields can cause some problems with our cache-on-insert behavior. If the default is relied upon, that value doesn't get saved with the cached object, so even though it's in the database we might not see it when we load the object back up.

user
emailnotifysub tinyint default 1 comment 'Notify by email of subscriptions', emailnotifyfav tinyint default 1 comment 'Notify by email of favorites', emailnotifynudge tinyint default 1 comment 'Notify by email of nudges', emailnotifymsg tinyint default 1 comment 'Notify by email of direct messages', emailnotifyattn tinyint default 1 comment 'Notify by email of @-replies', emailmicroid tinyint default 1 comment 'whether to publish email microid', emailpost tinyint default 1 comment 'Post by email', jabbermicroid tinyint default 1 comment 'whether to publish xmpp microid', jabbermicroid tinyint default 1 comment 'whether to publish xmpp microid',

subscription
jabber tinyint default 1 comment 'deliver jabber messages', sms tinyint default 1 comment 'deliver sms messages',

These two definitely cause trouble; should simply set them when creating records.

foreign_link
noticesync tinyint not null default 1 comment 'notice synchronization, bit 1 = sync outgoing, bit 2 = sync incoming, bit 3 = filter local replies', friendsync tinyint not null default 2 comment 'friend synchronization, bit 1 = sync outgoing, bit 2 = sync incoming', profilesync tinyint not null default 1 comment 'profile synchronization, bit 1 = sync outgoing, bit 2 = sync incoming',

notice_inbox
source tinyint default 1 comment 'reason it is in the inbox, 1=subscription',

design
disposition tinyint default 1 comment 'bit 1 = hide background image, bit 2 = display background image, bit 4 = tile background image'

user_location_prefs
share_location tinyint default 1 comment 'Whether to share location data',