CREATE TABLE prefix_Addon (
  a_name VARCHAR(20) NOT NULL DEFAULT '',
  a_ver SMALLINT(6) NOT NULL DEFAULT 0,
  a_fullname VARCHAR(80) NOT NULL DEFAULT '',
  a_descr VARCHAR(255) NOT NULL DEFAULT '',
  PRIMARY KEY(a_name, a_ver)
) TYPE=MyISAM;

CREATE TABLE prefix_AdminEntry (
  ad_name VARCHAR(40) NOT NULL DEFAULT '',
  ad_category VARCHAR(20) NOT NULL DEFAULT '',
  ad_url VARCHAR(128) NOT NULL DEFAULT '',
  ad_sortfield SMALLINT(6) NOT NULL DEFAULT 0,
  PRIMARY KEY(ad_name),
  INDEX SORT(ad_sortfield)
) TYPE=MyISAM;

CREATE TABLE prefix_Article (
  a_tid INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  a_author VARCHAR(64) NOT NULL DEFAULT '',
  a_authormail VARCHAR(48) NOT NULL DEFAULT '',
  a_origin VARCHAR(128) NOT NULL DEFAULT '',
  a_originurl VARCHAR(128) NOT NULL DEFAULT '',
  a_disc_tid INTEGER(10) UNSIGNED NULL DEFAULT 0,
  PRIMARY KEY(a_tid)
) TYPE=MyISAM;

CREATE TABLE prefix_BadWord (
  w_id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  w_bad CHAR(32) NOT NULL DEFAULT '',
  w_good CHAR(32) NOT NULL DEFAULT '',
  w_onlyname TINYINT NOT NULL DEFAULT 0,
  PRIMARY KEY(w_id)
) TYPE=MyISAM;

CREATE TABLE prefix_Bookmark (
  uid INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  tid INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  PRIMARY KEY(uid, tid),
  INDEX XIF40Bookmark(tid)
) TYPE=MyISAM;

CREATE TABLE prefix_Category (
  ct_id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  ct_name VARCHAR(32) NOT NULL DEFAULT '',
  ct_sortfield INTEGER(11) NOT NULL DEFAULT 0,
  PRIMARY KEY(ct_id),
  INDEX XPKSort(ct_sortfield)
) TYPE=MyISAM;

CREATE TABLE prefix_Code (
  sid CHAR(32) NOT NULL DEFAULT '',
  code CHAR(8) NOT NULL DEFAULT '',
  time INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  PRIMARY KEY(sid)
) TYPE=MyISAM;

CREATE TABLE prefix_Download (
  dl_tid INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  dl_url VARCHAR(255) NOT NULL DEFAULT '',
  dl_homepage VARCHAR(255) NOT NULL DEFAULT '',
  dl__downloads INTEGER(11) NOT NULL DEFAULT 0,
  dl_disc_tid INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  dl_size VARCHAR(10) NOT NULL DEFAULT '',
  PRIMARY KEY(dl_tid),
  INDEX XPKDownload(dl_tid)
) TYPE=MyISAM;

CREATE TABLE prefix_File (
  file_id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  file_size INTEGER UNSIGNED NOT NULL DEFAULT 0,
  file_type VARCHAR(64) NOT NULL DEFAULT '',
  file_name VARCHAR(32) NOT NULL DEFAULT '',
  file_downloads INTEGER UNSIGNED NOT NULL DEFAULT 0,
  file_key INTEGER UNSIGNED NOT NULL DEFAULT 0,
  PRIMARY KEY(file_id)
) TYPE=MyISAM;

CREATE TABLE prefix_Forum (
  f_id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  f_tpid SMALLINT(6) NOT NULL DEFAULT 0,
  f_ctid INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  f_title VARCHAR(80) NOT NULL DEFAULT '',
  f_descr VARCHAR(255) NOT NULL DEFAULT '',
  f_status TINYINT(4) NOT NULL DEFAULT 0,
  f_lview SMALLINT(6) NOT NULL DEFAULT 0,
  f_lread SMALLINT(6) NOT NULL DEFAULT 0,
  f_sortfield INTEGER(11) NOT NULL DEFAULT 0,
  f_lpost SMALLINT(6) NOT NULL DEFAULT 0,
  f_ltopic SMALLINT(6) NOT NULL DEFAULT 0,
  f_ledit SMALLINT(6) NOT NULL DEFAULT 0,
  f_lhtml SMALLINT(6) NOT NULL DEFAULT 0,
  f_lattach SMALLINT(6) NOT NULL DEFAULT 0,
  f_lvote SMALLINT(6) NOT NULL DEFAULT 0,
  f_lmoderate SMALLINT(6) NOT NULL DEFAULT 0,
  f_lip SMALLINT(6) NOT NULL DEFAULT 0,
  f_lpoll SMALLINT(6) NOT NULL DEFAULT 0,
  f_lsticky SMALLINT(6) NOT NULL DEFAULT 0,
  f_rate TINYINT(4) NOT NULL DEFAULT 0,
  f_bcode TINYINT(4) NOT NULL DEFAULT 0,
  f_nostats TINYINT(4) NOT NULL DEFAULT 0,
  f_rules TEXT,
  f_smiles TINYINT(4) NOT NULL DEFAULT 0,
  f_attachpics TINYINT(4) NOT NULL DEFAULT 0,
  f_selfmod TINYINT(4) NOT NULL DEFAULT 0,
  f_parent INTEGER(11) NOT NULL DEFAULT 0,
  f_text MEDIUMTEXT,
  f_url VARCHAR(255) NOT NULL DEFAULT '',
  f_nonewpic VARCHAR(20) NOT NULL DEFAULT '',
  f_newpic VARCHAR(20) NOT NULL DEFAULT '',
  f_premoderate TINYINT(4) NOT NULL DEFAULT 0,
  f_lnid INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  f_downloads INTEGER(11) NOT NULL DEFAULT 0,
  f_update INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  f__tcount INT UNSIGNED NOT NULL DEFAULT 0,
  f__pcount INT UNSIGNED NOT NULL DEFAULT 0,
  f__lastpostid INT UNSIGNED NOT NULL DEFAULT 0,
  f__startpostid INT UNSIGNED NOT NULL DEFAULT 0,
  f__premodcount INT UNSIGNED NOT NULL DEFAULT 0,
  f_hidden TINYINT UNSIGNED NOT NULL DEFAULT 0,
  f_nosubs TINYINT UNSIGNED NOT NULL DEFAULT 0,
  f_lpremod SMALLINT NOT NULL DEFAULT 0,
  f_ltopicpremod SMALLINT NOT NULL DEFAULT 0,
  f_link VARCHAR(32) NOT NULL DEFAULT '',

  PRIMARY KEY(f_id,f_lview,f_premoderate),
  INDEX ctid(f_ctid),
  INDEX sortfield(f_sortfield),
  INDEX parent(f_parent),
  INDEX tpid(f_tpid)
) TYPE=MyISAM;

CREATE TABLE prefix_ForumType (
  tp_id SMALLINT(6) NOT NULL DEFAULT 0,
  tp_title VARCHAR(40) NOT NULL DEFAULT '',
  tp_library VARCHAR(20) NOT NULL DEFAULT '',
  tp_template VARCHAR(20) NOT NULL DEFAULT '',
  tp_modlib VARCHAR(20) NOT NULL DEFAULT '',
  tp_searchable TINYINT(4) NOT NULL DEFAULT 0,
  tp_container TINYINT(4) NOT NULL DEFAULT 0,
  tp_menu TINYINT(4) NOT NULL DEFAULT 0,
  tp_external TINYINT UNSIGNED NOT NULL DEFAULT 0,
  PRIMARY KEY(tp_id)
) TYPE=MyISAM;

CREATE TABLE prefix_ForumView (
  uid INT UNSIGNED NOT NULL DEFAULT 0,
  fid INT UNSIGNED NOT NULL DEFAULT 0,
  fv_count INT UNSIGNED NOT NULL DEFAULT 0,
  PRIMARY KEY (fid,uid),
  INDEX uids(uid)
) TYPE=MyISAM;

CREATE TABLE prefix_ForumVC (
  fid INTEGER UNSIGNED NOT NULL,
  f__views MEDIUMINT UNSIGNED NOT NULL,
  PRIMARY KEY(fid)
) Type=MyISAM;

CREATE TABLE prefix_Language (
  ln_id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  ln_name VARCHAR(20) NOT NULL DEFAULT '',
  ln_file VARCHAR(20) NOT NULL DEFAULT '',
  ln_locale VARCHAR(20) NOT NULL DEFAULT '',
  ln_charset VARCHAR(20) NOT NULL DEFAULT '',
  PRIMARY KEY(ln_id)
) TYPE=MyISAM;

CREATE TABLE prefix_LastVisit (
  uid INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  fid INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  lv_time1 INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  lv_time2 INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  lv_markall INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  lv_markcount INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  PRIMARY KEY(uid, fid),
  INDEX XIF62LastVisit(fid)
) TYPE=MyISAM;

CREATE TABLE prefix_PersonalMessage (
  pm_id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  pm__box TINYINT(4) NOT NULL DEFAULT 0,
  pm__owner INTEGER UNSIGNED NULL DEFAULT 0,
  pm__correspondent INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  pm__senddate INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  pm__readdate INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  pm_text MEDIUMTEXT NOT NULL,
  pm_signature TINYINT(4) NOT NULL DEFAULT 0,
  pm_smiles TINYINT(4) NOT NULL DEFAULT 0,
  pm__html TINYINT(4) NOT NULL DEFAULT 0,
  pm_bcode TINYINT(4) NOT NULL DEFAULT 0,
  pm_pair INTEGER(11) NULL DEFAULT 0,
  pm_subj VARCHAR(80) NOT NULL DEFAULT '',
  PRIMARY KEY(pm_id),
  INDEX owner(pm__owner, pm__box)
) TYPE=MyISAM;

CREATE TABLE prefix_Photo (
  ph_id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
  ph_tid INTEGER UNSIGNED NULL DEFAULT 0,
  ph_key CHAR(8) NULL,
  PRIMARY KEY(ph_id),
  UNIQUE INDEX Photo_TID(ph_tid)
) TYPE=MyISAM;

CREATE TABLE prefix_Poll (
  pl_id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  pl_tid INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  pl_title VARCHAR(60) NOT NULL DEFAULT '',
  pl_enddate INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  PRIMARY KEY(pl_id),
  INDEX PL_topicid(pl_tid)
) TYPE=MyISAM;

CREATE TABLE prefix_PollVariant (
  pv_id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  pv_plid INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  pv_text VARCHAR(80) NOT NULL,
  pv_count INT UNSIGNED NOT NULL DEFAULT 0,
  PRIMARY KEY(pv_id),
  INDEX XIF47PollVariant(pv_plid)
) TYPE=MyISAM;

CREATE TABLE prefix_Post (
  p_id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  p_tid INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  p_uid INTEGER(11) NOT NULL DEFAULT 0,
  p_text MEDIUMTEXT NOT NULL,
  p__modcomment TEXT NULL,
  p__time INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  p__edittime INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  p_signature TINYINT(4) NOT NULL DEFAULT 0,
  p__smiles TINYINT(4) NOT NULL DEFAULT 0,
  p__bcode TINYINT(4) NOT NULL DEFAULT 0,
  p__html TINYINT(4) NOT NULL DEFAULT 0,
  p_attach INTEGER(11) NOT NULL DEFAULT 0,
  p_uname VARCHAR(32) NOT NULL DEFAULT '',
  p__ip INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  p_title VARCHAR(64) NOT NULL DEFAULT '',
  p__premoderate TINYINT(4) NOT NULL DEFAULT 0,
  PRIMARY KEY(p_id,p_uid,p__premoderate),
  INDEX tid(p_tid, p__premoderate,p__time),
  INDEX uid(p_uid),
  INDEX attach(p_attach),
  FULLTEXT INDEX topics(p_text,p_title)
) TYPE=MyISAM;

CREATE TABLE prefix_Smile (
  sm_code CHAR(12) NOT NULL DEFAULT '',
  sm_file CHAR(20) NULL,
  sm_show TINYINT UNSIGNED NOT NULL DEFAULT 1,
  PRIMARY KEY(sm_code),
  INDEX XPKSmile(sm_code)
) TYPE=MyISAM;

CREATE TABLE prefix_StyleSet (
  st_id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  st_name VARCHAR(40) NOT NULL DEFAULT '',
  st_file VARCHAR(20) NOT NULL DEFAULT '',
  st_show TINYINT(4) NOT NULL DEFAULT 1,
  st_parent VARCHAR(20) NOT NULL DEFAULT '',
  st_integrated TINYINT NOT NULL DEFAULT 1,
  PRIMARY KEY(st_id)
) TYPE=MyISAM;

CREATE TABLE prefix_Subscription (
  uid INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  tid INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  fid INTEGER(11) NOT NULL DEFAULT 0,
  PRIMARY KEY(uid, tid, fid),
  INDEX uid(uid),
  INDEX tid(tid)
) TYPE=MyISAM;

CREATE TABLE prefix_Topic (
  t_id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  t_fid INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  t_title VARCHAR(80) NOT NULL DEFAULT '',
  t_descr VARCHAR(255) NOT NULL DEFAULT '',
  t__sticky TINYINT(4) NOT NULL DEFAULT 0,
  t__stickypost TINYINT(4) NOT NULL DEFAULT 0,
  t__status TINYINT(4) NOT NULL DEFAULT 0,
  t__rate TINYINT(4) NOT NULL DEFAULT 0,
  t__pcount INT UNSIGNED NOT NULL DEFAULT 0,
  t__startpostid INT UNSIGNED NOT NULL DEFAULT 0,
  t__lastpostid INT UNSIGNED NOT NULL DEFAULT 0,
  t__ratingsum INT UNSIGNED NOT NULL DEFAULT 0,
  t__ratingcount INT UNSIGNED NOT NULL DEFAULT 0,
  t_link VARCHAR(32) NOT NULL DEFAULT '',
  t__lasttime INTEGER UNSIGNED NOT NULL DEFAULT 0,
  PRIMARY KEY(t_id),
  KEY XIF32Topic (t_fid,t__pcount,t__lastpostid),
  KEY lastpost (t__lastpostid,t_fid,t__pcount),  
  FULLTEXT INDEX title(t_title,t_descr)
) TYPE=MyISAM;

CREATE TABLE prefix_TopicRate (
  tid INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  uid INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  tr_value TINYINT(4) NOT NULL DEFAULT 0,
  PRIMARY KEY(tid, uid),
  INDEX XIF42TopicRate(uid)
) TYPE=MyISAM;

CREATE TABLE prefix_TopicView (
  tid INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  uid INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  PRIMARY KEY(tid, uid),
  INDEX XIF35TopicView(uid)
) TYPE=MyISAM;

CREATE TABLE prefix_TopicVC (
  tid INTEGER UNSIGNED NOT NULL,
  t__views MEDIUMINT UNSIGNED NOT NULL,
  PRIMARY KEY(tid)
) Type=MyISAM;

CREATE TABLE prefix_UGroup (
  g_id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  g_title VARCHAR(20) NOT NULL DEFAULT '',
  g_setlevel SMALLINT(6) NOT NULL DEFAULT 0,
  g_ljoin SMALLINT(6) NOT NULL DEFAULT 0,
  g_lview SMALLINT(6) NOT NULL DEFAULT 0,
  g_lautojoin SMALLINT(6) NOT NULL DEFAULT 0,
  g_descr VARCHAR(255) NOT NULL DEFAULT '',
  g_allowquit TINYINT(4) NOT NULL DEFAULT 0,
  PRIMARY KEY(g_id)
) TYPE=MyISAM;

CREATE TABLE prefix_UGroupAccess (
  gid INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  fid INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  ga_level SMALLINT(6) NULL DEFAULT 0,
  PRIMARY KEY(gid, fid),
  INDEX XIF44GroupAccess(fid),
  INDEX XIF51GroupAccess(ga_level)
) TYPE=MyISAM;

CREATE TABLE prefix_UGroupMember (
  gid INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  uid INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  gm_status TINYINT(4) NOT NULL DEFAULT 0,
  PRIMARY KEY(gid, uid),
  INDEX XIF28GroupMember(uid)
) TYPE=MyISAM;

CREATE TABLE prefix_User (
  u_id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
  u__email VARCHAR(48) NOT NULL DEFAULT '',
  u_lnid INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  u_stid INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  u__level SMALLINT(6) NOT NULL DEFAULT 0,
  u__name VARCHAR(32) NOT NULL DEFAULT '',
  u__active TINYINT(4) NOT NULL DEFAULT 0,
  u__password VARCHAR(32) NOT NULL DEFAULT '',
  u_usesignature TINYINT(4) NOT NULL DEFAULT 0,
  u_showmail TINYINT(4) NOT NULL DEFAULT 0,
  u_usesmiles TINYINT(4) NOT NULL DEFAULT 0,
  u_signature VARCHAR(255) NOT NULL DEFAULT '',
  u_gender TINYINT(4) NOT NULL DEFAULT 0,
  u_sformat VARCHAR(20) NOT NULL DEFAULT '',
  u_lformat VARCHAR(20) NOT NULL DEFAULT '',
  u_location VARCHAR(40) NOT NULL DEFAULT '',
  u_bday TINYINT UNSIGNED NOT NULL DEFAULT 0,
  u_bmonth TINYINT UNSIGNED NOT NULL DEFAULT 0,
  u_byear SMALLINT UNSIGNED NOT NULL DEFAULT 0,
  u_bmode TINYINT UNSIGNED NOT NULL DEFAULT 0,
  u_tperpage SMALLINT(6) NOT NULL DEFAULT 0,
  u_mperpage SMALLINT(6) NOT NULL DEFAULT 0,
  u_homepage VARCHAR(128) NOT NULL DEFAULT '',
  u_showavatars TINYINT(4) NOT NULL DEFAULT 0,
  u_avatartype TINYINT(4) NOT NULL DEFAULT 0,
  u__avatar VARCHAR(128) NOT NULL DEFAULT '',
  u__pavatar_id INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  u__photo_id INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  u_encrypted TINYINT(4) NOT NULL DEFAULT 0,
  u__regdate INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  u__profileupdate INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  u__newpassword VARCHAR(32) NOT NULL DEFAULT '',
  u__title VARCHAR(48) NOT NULL DEFAULT '',
  u_timeregion INTEGER(6) NOT NULL DEFAULT 0,
  u_icq INTEGER(11) NOT NULL DEFAULT 0,
  u_interests VARCHAR(255) NOT NULL DEFAULT '',
  u_hidden TINYINT(4) NOT NULL DEFAULT 0,
  u__key VARCHAR(12) NOT NULL DEFAULT '',
  u_detrans TINYINT(4) NOT NULL DEFAULT 0,
  u_nomails TINYINT(4) NOT NULL DEFAULT 0,
  u_sortposts TINYINT(4) NOT NULL DEFAULT 0,
  u_multilang TINYINT(4) NOT NULL DEFAULT 0,
  u_diary VARCHAR(128) NOT NULL DEFAULT '',
  u_timelimit SMALLINT(6) NOT NULL DEFAULT 0,
  u_aol VARCHAR(32) NOT NULL DEFAULT '',
  u_yahoo VARCHAR(32) NOT NULL DEFAULT '',
  u_msn VARCHAR(64) NOT NULL DEFAULT '',
  u_jabber VARCHAR(64) NOT NULL DEFAULT '',
  u_extform TINYINT(4) NOT NULL DEFAULT 1,
  u_aperpage SMALLINT(5) UNSIGNED NOT NULL DEFAULT 0,
  u__rating INT NOT NULL DEFAULT 0,
  u__warnings INT NOT NULL DEFAULT 0,
  u__pmcount INT UNSIGNED NOT NULL DEFAULT 0,
  u__pmtime INT UNSIGNED NOT NULL DEFAULT 0,
  u__warntime INT UNSIGNED NOT NULL DEFAULT 0,
  u__lastlogin INT UNSIGNED NOT NULL DEFAULT 0,
  u_pmnotify TINYINT UNSIGNED NOT NULL DEFAULT 1,
  u_realname VARCHAR(255) NOT NULL DEFAULT '',
  u__noedit TINYINT UNSIGNED NOT NULL DEFAULT 0,
  u_nosigns TINYINT UNSIGNED NOT NULL DEFAULT 0,
  u_prevmsgs TINYINT UNSIGNED NOT NULL DEFAULT 5,
  u__blog_fid INTEGER UNSIGNED NOT NULL DEFAULT 0,
  u__gallery_fid INTEGER UNSIGNED NOT NULL DEFAULT 0,
  u_goto TINYINT UNSIGNED NOT NULL DEFAULT 0,
  u_firstpost TINYINT UNSIGNED NOT NULL DEFAULT 1,
  u__canonical VARCHAR(32) NOT NULL DEFAULT '',
  u_showenemies TINYINT UNSIGNED NOT NULL DEFAULT 1,
  PRIMARY KEY(u_id),
  UNIQUE email(u__email),
  UNIQUE name(u__name),
  INDEX level(u__level),
  INDEX blog_fid(u__blog_fid),
  INDEX gallery_fid(u__gallery_fid)  
) TYPE=MyISAM;

CREATE TABLE prefix_UserAccess (
  uid INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  fid INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  ua_level SMALLINT(6) NULL DEFAULT 0,
  PRIMARY KEY(uid, fid),
  INDEX XIF37UserAccess(fid),
  INDEX XIF50UserAccess(ua_level)
) TYPE=MyISAM;

CREATE TABLE prefix_UserLevel (
  l_level SMALLINT(6) NOT NULL DEFAULT 0,
  l_title VARCHAR(48) NOT NULL DEFAULT '',
  l_minpost INTEGER(11) NULL DEFAULT 0,
  l_custom TINYINT(4) NOT NULL DEFAULT 0,
  l_pic VARCHAR(255) NOT NULL DEFAULT'',
  PRIMARY KEY(l_level),
  INDEX Minpost(l_minpost, l_custom)
) TYPE=MyISAM;

CREATE TABLE prefix_UserRating (
  uid INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  ur_rated INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  ur_time INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  ur_value TINYINT(4) NOT NULL DEFAULT 0,
  PRIMARY KEY(uid, ur_rated, ur_time)
) TYPE=MyISAM;

CREATE TABLE prefix_UserStat (
  uid INT UNSIGNED NOT NULL DEFAULT 0,
  fid INT UNSIGNED NOT NULL DEFAULT 0,
  us_count INT UNSIGNED NOT NULL DEFAULT 0,
  PRIMARY KEY (fid,uid),
  INDEX uids(uid)
) TYPE=MyISAM;

CREATE TABLE prefix_UserWarning (
  uw_id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  uw_uid INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  uw_value TINYINT(4) NOT NULL DEFAULT 0,
  uw_warner INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  uw_validtill INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  uw_comment VARCHAR(255) NOT NULL DEFAULT '',
  PRIMARY KEY(uw_id, uw_uid),
  INDEX XIF64UserWarning(uw_uid)
) TYPE=MyISAM;

CREATE TABLE prefix_Vote (
  pvid INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  uid INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  tid INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  PRIMARY KEY(pvid, uid),
  INDEX Topics(tid)
) TYPE=MyISAM;

CREATE TABLE prefix_Search (
  sr_id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  sr_text VARCHAR(255) NOT NULL DEFAULT '',
  sr_mode TINYINT UNSIGNED NOT NULL DEFAULT 0,
  sr_type TINYINT UNSIGNED NOT NULL DEFAULT 0,
  sr_starttime INT UNSIGNED NOT NULL DEFAULT 0,
  sr_endtime INT UNSIGNED NOT NULL DEFAULT 0,
  sr_uname VARCHAR(32) NOT NULL DEFAULT '',
  PRIMARY KEY(sr_id)
) TYPE=MyISAM;

CREATE TABLE prefix_SearchResult (
  srid INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  srpid INTEGER(10) UNSIGNED NOT NULL DEFAULT 0,
  relevancy FLOAT NOT NULL DEFAULT 0.0,
  PRIMARY KEY (srid,srpid)
) TYPE=MyISAM;

CREATE TABLE prefix_Online (
  o_uid INTEGER UNSIGNED NOT NULL DEFAULT 1,
  o_key CHAR(32) NOT NULL DEFAULT '',
  o_udata TEXT,
  PRIMARY KEY (o_uid,o_key)
) TYPE=MyISAM;

CREATE TABLE prefix_Present (
  pu_uid INTEGER UNSIGNED NOT NULL DEFAULT 1,
  pu_ip INTEGER UNSIGNED NOT NULL DEFAULT 0,
  pu_uname VARCHAR(32) NOT NULL DEFAULT '',
  pu_lasttime INTEGER UNSIGNED NOT NULL DEFAULT 0,
  pu_action VARCHAR(20) NOT NULL DEFAULT '',
  pu_module VARCHAR(20) NOT NULL DEFAULT '',
  pu_tid INTEGER UNSIGNED NOT NULL DEFAULT 0,
  pu_fid INTEGER UNSIGNED NOT NULL DEFAULT 0,
  pu_hits INTEGER UNSIGNED NOT NULL DEFAULT 0,
  pu_hidden TINYINT UNSIGNED NOT NULL DEFAULT 0,
  INDEX uid(pu_uid),
  INDEX lasttime(pu_lasttime)
) TYPE=MyISAM;

CREATE TABLE prefix_Draft (
  dr_uid INTEGER UNSIGNED NOT NULL DEFAULT 0,
  dr_fid INTEGER UNSIGNED NOT NULL DEFAULT 0,
  dr_tid INTEGER UNSIGNED NOT NULL DEFAULT 0,
  dr_text LONGTEXT,
  PRIMARY KEY (dr_uid,dr_fid,dr_tid)
) TYPE=MyISAM;

CREATE TABLE prefix_AddrBook (
u_owner INTEGER UNSIGNED NOT NULL,
u_partner INTEGER UNSIGNED NOT NULL,
u_status TINYINT NOT NULL,
PRIMARY KEY(u_owner,u_partner)
) Type=MyISAM;

CREATE TABLE prefix_ForumIgnore(
  uid INTEGER NOT NULL,
  fid INTEGER NOT NULL,
  PRIMARY KEY (uid,fid)
) Type=MyISAM;

CREATE TABLE prefix_RSSImports(
  rss_id INTEGER NOT NULL AUTO_INCREMENT,
  rss_url VARCHAR(255) NOT NULL DEFAULT '',
  rss_lastget INTEGER NOT NULL DEFAULT 0,
  rss_lastentry INTEGER NOT NULL DEFAULT 0,
  rss_fid INTEGER NOT NULL DEFAULT 0,
  rss_premoderated TINYINT NOT NULL DEFAULT 1,
  rss_name VARCHAR(255) NOT NULL DEFAULT '',
  rss_link VARCHAR(255) NOT NULL DEFAULT '',
  rss_user VARCHAR(255) NOT NULL DEFAULT '',
  rss_source VARCHAR(255) NOT NULL  DEFAULT '',
  PRIMARY KEY(rss_id)
) Type=MyISAM;

