CREATE TABLE IF NOT EXISTS `#__speasyimagegallery_albums` (
	`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
	`asset_id` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'FK to the #__assets table.',
	`title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
	`alias` varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '',
	`image` varchar(500) COLLATE utf8mb4_unicode_ci NOT NULL,
	`description` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL,
	`published` tinyint(3) NOT NULL DEFAULT '0',
	`catid` int(10) NOT NULL DEFAULT '0',
	`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
	`created_by` int(10) UNSIGNED NOT NULL DEFAULT '0',
	`modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
	`modified_by` int(10) UNSIGNED NOT NULL DEFAULT '0',
	`checked_out` int(10) UNSIGNED NOT NULL DEFAULT '0',
	`checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
	`attribs` varchar(5120) COLLATE utf8mb4_unicode_ci NOT NULL,
	`ordering` int(11) NOT NULL DEFAULT '0',
	`metakey` text COLLATE utf8mb4_unicode_ci NOT NULL,
	`metadesc` text COLLATE utf8mb4_unicode_ci NOT NULL,
	`access` int(10) UNSIGNED NOT NULL DEFAULT '0',
	`hits` int(10) UNSIGNED NOT NULL DEFAULT '0',
	`metadata` text COLLATE utf8mb4_unicode_ci NOT NULL,
	`featured` tinyint(3) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Set if item is featured.',
	`language` char(7) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'The language code for the article.',
	PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;

CREATE TABLE IF NOT EXISTS `#__speasyimagegallery_images` (
	`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
	`asset_id` int(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'FK to the #__assets table.',
	`album_id` int(10) NOT NULL DEFAULT '0',
	`title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
	`alt` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
	`filename` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
	`description` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL,
	`state` tinyint(3) NOT NULL DEFAULT '0',
	`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
	`created_by` int(10) UNSIGNED NOT NULL DEFAULT '0',
	`modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
	`modified_by` int(10) UNSIGNED NOT NULL DEFAULT '0',
	`checked_out` int(10) UNSIGNED NOT NULL DEFAULT '0',
	`checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
	`images` varchar(5120) COLLATE utf8mb4_unicode_ci NOT NULL,
	`ordering` int(11) NOT NULL DEFAULT '0',
	`language` char(7) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'The language code for the article.',
	PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;
