CREATE TABLE IF NOT EXISTS `notifications` ( `id` int(11) NOT NULL AUTO_INCREMENT, `type` varchar(25) NOT NULL, `data` varchar(255) NOT NULL, `active` tinyint(1) NOT NULL DEFAULT '1', `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `account_id` int(10) unsigned DEFAULT NULL, PRIMARY KEY (`id`), KEY `active` (`active`), KEY `data` (`data`), KEY `account_id` (`account_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `notification_settings` ( `type` varchar(15) NOT NULL, `account_id` int(11) NOT NULL, `active` tinyint(1) NOT NULL DEFAULT '0' ) ENGINE=InnoDB DEFAULT CHARSET=utf8;