ALTER TABLE privatemsg MODIFY author int(10) unsigned NOT NULL, /* deleting the 0 default */ MODIFY recipient int(10) unsigned NOT NULL, /* deleting the 0 default */ /* new subject has 255 chars. for perf reasons, can we keep it at 64? */ MODIFY timestamp int(10) unsigned NOT NULL, /* deleting the 0 default */ MODIFY newmsg tinyint(3) unsigned NOT NULL, /* deleting the 0 default */ ADD thread int(10) NOT NULL DEFAULT 0,/* adding a size constraint */ ADD type varchar(255) NOT NULL, /* why is this varchar? and if it should be, why so long? */ ADD variables text, /* can always change this to something bigger if/when necessary, but starting big and making smaller later risks data loss. */ ADD KEY (type), ADD KEY (author); ALTER TABLE privatemsg_folder MODIFY uid int(10) unsigned NOT NULL; ALTER TABLE privatemsg_archive MODIFY author int(10) unsigned NOT NULL, /* deleting the 0 default */ MODIFY recipient int(10) unsigned NOT NULL, /* deleting the 0 default */ /* new subject has 255 chars. for perf reasons, can we keep it at 64? */ MODIFY timestamp int(10) unsigned NOT NULL, /* deleting the 0 default */ MODIFY folder int(10) unsigned NOT NULL, /* deleting the 0 default, but why is there a default 0 in privatemsg, and no default value in privatemsg_archive? */ ADD thread int(10) NOT NULL DEFAULT 0,/* adding a size constraint */ CREATE TABLE privatemsg_block_user ( author int(10) unsigned NOT NULL, recipient int(10) unsigned NOT NULL, PRIMARY KEY (author, recipient) ) /*!40100 DEFAULT CHARACTER SET utf8 */ /* CONVERSION: What happens here to the data in the old privatemsg.replied column, and how do the new thread, type, and variables columns get populated? */ /* AFTER CONVERSION: ONLY EXECUTE THIS ONCE THE REPLIED COLUMN LOGIC HAS BEEN HANDLED */ ALTER TABLE privatemsg DROP COLUMN replied;