$tables['xf_nflj_ams_article'] = "
CREATE TABLE IF NOT EXISTS xf_nflj_ams_article (
article_id int(10) unsigned NOT NULL AUTO_INCREMENT,
category_id int(10) unsigned NOT NULL,
user_id int(10) unsigned NOT NULL,
username varchar(50) NOT NULL,
title varchar(150) NOT NULL DEFAULT '',
meta_description varchar(160) NOT NULL,
description text NOT NULL,
article_state enum('visible','moderated','deleted','awaiting','draft') NOT NULL DEFAULT 'visible',
article_open tinyint(3) unsigned NOT NULL DEFAULT '1',
message mediumtext NOT NULL,
publish_date int(10) unsigned NOT NULL DEFAULT '0',
publish_date_timezone varchar(50) NOT NULL DEFAULT 'Europe/London',
last_update int(10) unsigned NOT NULL DEFAULT '0',
edit_date int(10) unsigned NOT NULL DEFAULT '0',
likes int(10) unsigned NOT NULL,
like_users blob,
attach_count smallint(5) unsigned NOT NULL DEFAULT '0',
article_view_count int(10) unsigned NOT NULL DEFAULT '0',
article_page_count int(10) unsigned NOT NULL DEFAULT '0',
rating_count int(10) unsigned NOT NULL DEFAULT '0',
rating_sum int(10) unsigned NOT NULL DEFAULT '0',
rating_avg float unsigned NOT NULL DEFAULT '0',
rating_weighted float unsigned NOT NULL DEFAULT '0',
review_count int(10) unsigned NOT NULL DEFAULT '0',
comment_count int(10) unsigned NOT NULL DEFAULT '0',
series_part_id int(10) unsigned NOT NULL DEFAULT '0',
featured tinyint(3) unsigned NOT NULL DEFAULT '0',
cover_image_id int(10) unsigned NOT NULL DEFAULT '0',
cover_image_header tinyint(3) unsigned NOT NULL DEFAULT '1',
thread_id int(10) unsigned NOT NULL DEFAULT '0',
custom_article_fields mediumblob NOT NULL,
prefix_id int(10) unsigned NOT NULL DEFAULT '0',
last_comment_date int(10) unsigned NOT NULL DEFAULT '0',
last_review_date int(10) unsigned NOT NULL DEFAULT '0',
about_author tinyint(3) unsigned NOT NULL DEFAULT '1',
xfmg_album_id int(10) UNSIGNED NOT NULL DEFAULT '0',
xfmg_media_ids varbinary(100) NOT NULL DEFAULT '',
xfmg_video_ids varbinary(100) NOT NULL DEFAULT '',
author_rating float unsigned NOT NULL DEFAULT '0',
tags mediumblob NOT NULL,
comments_open tinyint(3) unsigned NOT NULL DEFAULT '1',
last_edit_date int(10) unsigned NOT NULL DEFAULT '0',
last_edit_user_id int(10) unsigned NOT NULL DEFAULT '0',
edit_count int(10) unsigned NOT NULL DEFAULT '0',
cover_image_cache BLOB NOT NULL,
image_attach_count INT(10) UNSIGNED NOT NULL DEFAULT '0',
file_attach_count INT(10) UNSIGNED NOT NULL DEFAULT '0',
article_location VARCHAR(255) NOT NULL DEFAULT '',
original_source MEDIUMBLOB NOT NULL,
warning_id int(10) unsigned NOT NULL DEFAULT '0',
warning_message varchar(255) NOT NULL DEFAULT '',
ip_id INT(10) UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY (article_id),
KEY category_id (category_id),
KEY user_id (user_id),
KEY prefix_id (prefix_id),
KEY thread_id (thread_id),
KEY category_last_update (category_id,last_update),
KEY user_id_last_update (user_id,last_update),
KEY last_update (last_update),
KEY category_rating_weighted (category_id,rating_weighted),
KEY rating_weighted (rating_weighted),
KEY category_author_rating (category_id,author_rating),
KEY author_rating (author_rating),
KEY publish_date (publish_date),
KEY category_id_publish_date (category_id,publish_date),
KEY user_id_publish_date (user_id,publish_date)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
";