CREATE TABLE IF NOT EXISTS `#__dataset_tables` (
 `dbtid` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
 `namekey` varchar(100) NOT NULL,
 `name` varchar(255) NOT NULL,
 `node` varchar(50) NOT NULL,
 `export` tinyint(3) unsigned NOT NULL DEFAULT '2',
 `dbid` smallint(5) unsigned NOT NULL DEFAULT '0',
 `size` decimal(14,0) unsigned NOT NULL DEFAULT '0',
 `created` int(10) unsigned NOT NULL DEFAULT '0',
 `modified` int(10) unsigned NOT NULL DEFAULT '0',
 `rows` int(10) unsigned NOT NULL DEFAULT '0',
 `rows_average_length` decimal(8,0) unsigned NOT NULL DEFAULT '0',
 `data_length` decimal(14,0) unsigned NOT NULL DEFAULT '0',
 `prefix` varchar(255) NOT NULL,
 `version` varchar(50) NOT NULL,
 `rolid` smallint(5) unsigned NOT NULL DEFAULT '0',
 `level` tinyint(3) unsigned NOT NULL DEFAULT '0',
 `type` tinyint(3) unsigned NOT NULL DEFAULT '0',
 `pkey` varchar(255) NOT NULL,
 `description` text NOT NULL,
 `suffix` varchar(255) NOT NULL,
 `group` varchar(255) NOT NULL,
 `domain` tinyint(3) unsigned NOT NULL DEFAULT '0',
 `exportdelete` tinyint(4) NOT NULL DEFAULT '0',
 `noaudit` tinyint(3) unsigned NOT NULL DEFAULT '0',
 `engine` tinyint(3) unsigned NOT NULL DEFAULT '0',
 PRIMARY KEY (`dbtid`),
 UNIQUE KEY `UK_dataset_tables_namekey` (`namekey`),
 UNIQUE KEY `UK_dataset_tables_dbid_name` (`dbid`,`name`(50)),
 KEY `IX_dataset_tables_rolid` (`rolid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;