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