CREATE TABLE IF NOT EXISTS `#__model_fields` (
 `fdid` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `namekey` varchar(150) NOT NULL,
 `fieldid` smallint(5) unsigned NOT NULL DEFAULT '0',
 `rolid` smallint(5) unsigned NOT NULL DEFAULT '1',
 `uid` int(10) unsigned NOT NULL DEFAULT '0',
 `core` tinyint(4) NOT NULL DEFAULT '0',
 `publish` tinyint(4) NOT NULL DEFAULT '0',
 `created` int(10) unsigned NOT NULL DEFAULT '0',
 `modified` int(10) unsigned NOT NULL DEFAULT '0',
 `sid` mediumint(8) unsigned NOT NULL DEFAULT '0',
 `searchable` tinyint(3) unsigned NOT NULL DEFAULT '0',
 `rolid_edit` smallint(5) unsigned NOT NULL DEFAULT '1',
 `params` text NOT NULL,
 `initialvalue` varchar(255) NOT NULL,
 `column` varchar(100) NOT NULL,
 `required` tinyint(3) unsigned NOT NULL DEFAULT '0',
 `ordering` smallint(5) unsigned NOT NULL DEFAULT '999',
 `updateall` tinyint(3) unsigned NOT NULL DEFAULT '1',
 `dbcid` int(10) unsigned NOT NULL DEFAULT '0',
 `translate` tinyint(3) unsigned NOT NULL DEFAULT '0',
 `advsearchable` tinyint(3) unsigned NOT NULL DEFAULT '0',
 `sorting` tinyint(3) unsigned NOT NULL DEFAULT '0',
 PRIMARY KEY (`fdid`),
 UNIQUE KEY `UK_namekey_model_fields` (`namekey`),
 KEY `IX_model_fields_publish_rolid` (`publish`,`rolid`),
 KEY `IX_model_fields_sid` (`sid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;