CREATE TABLE inbox ( id int(10) unsigned NOT NULL auto_increment, number varchar(20) NOT NULL default '', smsdate datetime NOT NULL default '0000-00-00 00:00:00', insertdate timestamp DEFAULT CURRENT_TIMESTAMP, text text, phone tinyint(4), processed tinyint(4) NOT NULL default '0', PRIMARY KEY (id) ); CREATE TABLE outbox ( id int(10) unsigned NOT NULL auto_increment, number varchar(20) NOT NULL default '', processed_date timestamp DEFAULT 0, insertdate timestamp DEFAULT CURRENT_TIMESTAMP, text varchar(160) default NULL, phone tinyint(4), processed tinyint(4) NOT NULL default '0', error tinyint(4) NOT NULL default '-1', dreport tinyint(4) NOT NULL default '0', not_before time NOT NULL default '00:00:00', not_after time NOT NULL default '23:59:59', PRIMARY KEY (id) ); CREATE TABLE multipartinbox ( id int(10) unsigned NOT NULL auto_increment, number varchar(20) NOT NULL default '', smsdate datetime NOT NULL default '0000-00-00 00:00:00', insertdate timestamp DEFAULT CURRENT_TIMESTAMP, text text, phone tinyint(4), processed tinyint(4) NOT NULL default '0', refnum int(8) default NULL, maxnum int(8) default NULL, curnum int(8) default NULL, PRIMARY KEY (id) ); ALTER TABLE inbox CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE outbox CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE multipartinbox CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE inbox MODIFY number VARCHAR(20) CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE inbox MODIFY text text CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE multipartinbox MODIFY number VARCHAR(20) CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER TABLE multipartinbox MODIFY text text CHARACTER SET utf8 COLLATE utf8_general_ci;