CREATE TABLE IF NOT EXISTS `#__mailing_node` (
 `mgid` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `wid` int(10) unsigned NOT NULL DEFAULT '0',
 `namekey` varchar(100) NOT NULL,
 `rolid` smallint(5) unsigned NOT NULL DEFAULT '1',
 `type` tinyint(3) unsigned NOT NULL DEFAULT '1',
 `created` int(10) unsigned NOT NULL DEFAULT '0',
 `uid` int(10) unsigned NOT NULL DEFAULT '0',
 `publish` tinyint(4) NOT NULL DEFAULT '1',
 `senddate` int(10) unsigned NOT NULL DEFAULT '0',
 `html` tinyint(3) unsigned NOT NULL DEFAULT '1',
 `alias` varchar(255) NOT NULL,
 `params` text NOT NULL,
 `level` tinyint(3) unsigned NOT NULL DEFAULT '0',
 `tags` text NOT NULL,
 `archive` tinyint(3) unsigned NOT NULL DEFAULT '1',
 `status` tinyint(4) NOT NULL DEFAULT '10',
 `attach` tinyint(3) unsigned NOT NULL DEFAULT '0',
 `modified` int(10) unsigned NOT NULL DEFAULT '0',
 `publishstart` int(10) unsigned NOT NULL DEFAULT '0',
 `publishend` int(10) unsigned NOT NULL DEFAULT '0',
 `core` tinyint(4) NOT NULL DEFAULT '0',
 `sms` tinyint(3) unsigned NOT NULL DEFAULT '0',
 `template` tinyint(3) unsigned NOT NULL DEFAULT '3',
 `format` tinyint(3) unsigned NOT NULL DEFAULT '0',
 `notify` tinyint(3) unsigned NOT NULL DEFAULT '1',
 `enddate` int(10) unsigned NOT NULL DEFAULT '0',
 `channel` text NOT NULL,
 PRIMARY KEY (`mgid`),
 UNIQUE KEY `UK_mailing_node_namekey` (`namekey`),
 KEY `IX_mailing_node_archive_publish_status_modified` (`archive`,`publish`,`status`,`modified`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;