<?php
self::$db->query_write("
	CREATE TABLE IF NOT EXISTS `" . TABLE_PREFIX  . "dbtech_vbmail_feedback` (
		`feedbackid` int(10) unsigned NOT NULL AUTO_INCREMENT,
		`title` varchar(50) NOT NULL DEFAULT '',
		`description` mediumtext,
		`active` tinyint(1) unsigned NOT NULL DEFAULT '1',
		`displayorder` int(10) unsigned NOT NULL DEFAULT '10',
		PRIMARY KEY (`feedbackid`)
	) ENGINE=MyISAM
");
self::report('Created Table', 'dbtech_vbmail_feedback');

// Populated Tables
self::$db->query_write("
	INSERT IGNORE INTO `" . TABLE_PREFIX . "dbtech_vbmail_feedback` 
		(`feedbackid`, `title`, `description`, `active`, `displayorder`) 
	VALUES 
		(1, 'It\'s uninteresting', '', 1, 10),
		(2, 'It\'s annoying', '', 1, 20),
		(3, 'It\'s too frequent', '', 1, 30)
");
self::report('Populated Table', 'dbtech_vbmail_feedback');

if (class_exists('VBMAIL_CACHE'))
{
	// Rebuild the cache
	VBMAIL_CACHE::build('feedback');
}
?>