CREATE TABLE IF NOT EXISTS `#__layout_listings` (
 `lid` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
 `yid` mediumint(8) unsigned NOT NULL DEFAULT '0',
 `namekey` varchar(100) NOT NULL,
 `sid` smallint(5) unsigned NOT NULL DEFAULT '0',
 `map` varchar(30) NOT NULL,
 `parent` mediumint(8) unsigned NOT NULL DEFAULT '0',
 `type` varchar(100) NOT NULL,
 `publish` tinyint(4) NOT NULL DEFAULT '1',
 `core` tinyint(4) NOT NULL DEFAULT '1',
 `ordering` tinyint(3) unsigned NOT NULL DEFAULT '99',
 `hidden` tinyint(3) unsigned NOT NULL DEFAULT '0',
 `level` tinyint(3) unsigned NOT NULL DEFAULT '0',
 `search` tinyint(3) unsigned NOT NULL DEFAULT '0',
 `advsearch` tinyint(3) unsigned NOT NULL DEFAULT '0',
 `advordering` tinyint(3) unsigned NOT NULL DEFAULT '0',
 `modified` int(10) unsigned NOT NULL DEFAULT '0',
 `created` int(10) unsigned NOT NULL,
 `params` text NOT NULL,
 `did` mediumint(8) unsigned NOT NULL DEFAULT '0',
 `ref_wid` smallint(5) unsigned NOT NULL DEFAULT '0',
 `rolid` smallint(5) unsigned NOT NULL DEFAULT '1',
 `fdid` int(10) unsigned NOT NULL DEFAULT '0',
 `parentdft` tinyint(3) unsigned NOT NULL DEFAULT '0',
 `xsvisible` tinyint(3) unsigned NOT NULL DEFAULT '0',
 `xshidden` tinyint(3) unsigned NOT NULL DEFAULT '0',
 `devicevisible` varchar(100) NOT NULL,
 `devicehidden` varchar(100) NOT NULL,
 PRIMARY KEY (`lid`),
 UNIQUE KEY `UK_layout_listings_namekey` (`namekey`),
 KEY `IX_layout_listing_yid_publish_level_rolid_hidden_ordering` (`yid`,`level`,`publish`,`rolid`,`hidden`,`ordering`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;