CREATE TABLE #TABLEPREFIX#articles (
       articleid BIGINT(20) NOT NULL AUTO_INCREMENT
     , locationid BIGINT(20) NOT NULL DEFAULT 0
     , articlegroupid BIGINT(20)
     , commenttoarticleid BIGINT(20) DEFAULT 0
     , created DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00'
     , createdbyuser VARCHAR(100) NOT NULL
     , modified DATETIME DEFAULT '0000-00-00 00:00:00'
     , modifiedbyuser VARCHAR(100)
     , title TINYTEXT NOT NULL
     , alias VARCHAR(100)
     , body TEXT
     , thumbnailurl TINYTEXT
     , shortdescription TINYTEXT
     , viewinlist INT(1) DEFAULT 1
     , publish INT(1) DEFAULT 1
     , promote INT(1) DEFAULT 0
     , promoteimageurl TINYTEXT
     , sortid BIGINT(20) DEFAULT 0
     , metadescription TINYTEXT
     , metakeywords TINYTEXT
     , validfromdate DATE
     , validtodate DATE
     , PRIMARY KEY (articleid)
);
CREATE INDEX searchindex ON lbarticles (title ASC, shortdescription ASC, body(255) ASC);

CREATE TABLE #TABLEPREFIX#articlegroups (
       articlegroupid BIGINT(20) NOT NULL AUTO_INCREMENT
     , articlegroupname TINYTEXT NOT NULL
     , PRIMARY KEY (articlegroupid)
);

