-- --------------------------------------------------
--
-- JspRun! SQL file for installation
-- $Id: jsprun.sql utf8 10517 2007-09-04 01:15:26Z monkey $
--
-- --------------------------------------------------
DROP TABLE IF EXISTS jrun_access;
CREATE TABLE jrun_access (
uid mediumint(8) unsigned NOT NULL DEFAULT '0',
fid smallint(6) unsigned NOT NULL DEFAULT '0',
allowview tinyint(1) NOT NULL DEFAULT '0',
allowpost tinyint(1) NOT NULL DEFAULT '0',
allowreply tinyint(1) NOT NULL DEFAULT '0',
allowgetattach tinyint(1) NOT NULL DEFAULT '0',
allowpostattach tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (uid,fid)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS jrun_activities;
CREATE TABLE jrun_activities (
tid mediumint(8) unsigned NOT NULL DEFAULT '0',
uid mediumint(8) unsigned NOT NULL DEFAULT '0',
cost mediumint(8) unsigned NOT NULL DEFAULT '0',
starttimefrom int(10) unsigned NOT NULL DEFAULT '0',
starttimeto int(10) unsigned NOT NULL DEFAULT '0',
place char(40) NOT NULL DEFAULT '',
class char(25) NOT NULL DEFAULT '',
gender tinyint(1) NOT NULL DEFAULT '0',
number smallint(5) unsigned NOT NULL DEFAULT '0',
expiration int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (tid),
KEY uid (uid,starttimefrom)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS jrun_activityapplies;
CREATE TABLE jrun_activityapplies (
applyid int(10) unsigned NOT NULL AUTO_INCREMENT,
tid mediumint(8) unsigned NOT NULL DEFAULT '0',
username char(15) NOT NULL DEFAULT '',
uid mediumint(8) unsigned NOT NULL DEFAULT '0',
message char(200) NOT NULL DEFAULT '',
verified tinyint(1) NOT NULL DEFAULT '0',
dateline int(10) unsigned NOT NULL DEFAULT '0',
payment mediumint(8) NOT NULL DEFAULT '0',
contact char(200) NOT NULL,
PRIMARY KEY (applyid),
KEY uid (uid),
KEY tid (tid),
KEY dateline (tid,dateline)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS jrun_adminactions;
CREATE TABLE jrun_adminactions (
admingid smallint(6) unsigned NOT NULL DEFAULT '0',
disabledactions text NOT NULL,
PRIMARY KEY (admingid)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS jrun_admingroups;
CREATE TABLE jrun_admingroups (
admingid smallint(6) unsigned NOT NULL DEFAULT '0',
alloweditpost tinyint(1) NOT NULL DEFAULT '0',
alloweditpoll tinyint(1) NOT NULL DEFAULT '0',
allowstickthread tinyint(1) NOT NULL DEFAULT '0',
allowmodpost tinyint(1) NOT NULL DEFAULT '0',
allowdelpost tinyint(1) NOT NULL DEFAULT '0',
allowmassprune tinyint(1) NOT NULL DEFAULT '0',
allowrefund tinyint(1) NOT NULL DEFAULT '0',
allowcensorword tinyint(1) NOT NULL DEFAULT '0',
allowviewip tinyint(1) NOT NULL DEFAULT '0',
allowbanip tinyint(1) NOT NULL DEFAULT '0',
allowedituser tinyint(1) NOT NULL DEFAULT '0',
allowmoduser tinyint(1) NOT NULL DEFAULT '0',
allowbanuser tinyint(1) NOT NULL DEFAULT '0',
allowpostannounce tinyint(1) NOT NULL DEFAULT '0',
allowviewlog tinyint(1) NOT NULL DEFAULT '0',
allowbanpost tinyint(1) NOT NULL DEFAULT '0',
disablepostctrl tinyint(1) NOT NULL DEFAULT '0',
supe_allowpushthread tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (admingid)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
INSERT INTO jrun_admingroups VALUES ('1','1','1','3','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1');
INSERT INTO jrun_admingroups VALUES ('2','1','0','2','1','1','1','1','1','1','1','1','1','1','1','1','1','1','0');
INSERT INTO jrun_admingroups VALUES ('3','1','0','1','1','1','0','0','0','1','0','0','1','1','0','0','1','1','0');
INSERT INTO jrun_admingroups VALUES ('16','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','1','0','0');
DROP TABLE IF EXISTS jrun_adminnotes;
CREATE TABLE jrun_adminnotes (
id mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
admin varchar(15) NOT NULL DEFAULT '',
access tinyint(3) NOT NULL DEFAULT '0',
adminid tinyint(3) NOT NULL DEFAULT '0',
dateline int(10) unsigned NOT NULL DEFAULT '0',
expiration int(10) unsigned NOT NULL DEFAULT '0',
message text NOT NULL,
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS jrun_adminsessions;
CREATE TABLE jrun_adminsessions (
uid mediumint(8) unsigned NOT NULL DEFAULT '0',
ip char(15) NOT NULL DEFAULT '',
dateline int(10) unsigned NOT NULL DEFAULT '0',
errorcount tinyint(1) NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS jrun_advertisements;
CREATE TABLE jrun_advertisements (
advid mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
available tinyint(1) NOT NULL DEFAULT '0',
`type` varchar(50) NOT NULL DEFAULT '0',
displayorder tinyint(3) NOT NULL DEFAULT '0',
title varchar(50) NOT NULL DEFAULT '',
targets text NOT NULL,
parameters text NOT NULL,
`code` text NOT NULL,
starttime int(10) unsigned NOT NULL DEFAULT '0',
endtime int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (advid)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS jrun_announcements;
CREATE TABLE jrun_announcements (
id smallint(6) unsigned NOT NULL AUTO_INCREMENT,
author varchar(15) NOT NULL DEFAULT '',
`subject` varchar(250) NOT NULL DEFAULT '',
`type` tinyint(1) NOT NULL DEFAULT '0',
displayorder tinyint(3) NOT NULL DEFAULT '0',
starttime int(10) unsigned NOT NULL DEFAULT '0',
endtime int(10) unsigned NOT NULL DEFAULT '0',
message text NOT NULL,
groups text NOT NULL,
PRIMARY KEY (id),
KEY timespan (starttime,endtime)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS jrun_attachments;
CREATE TABLE jrun_attachments (
aid mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
tid mediumint(8) unsigned NOT NULL DEFAULT '0',
pid int(10) unsigned NOT NULL DEFAULT '0',
dateline int(10) unsigned NOT NULL DEFAULT '0',
readperm tinyint(3) unsigned NOT NULL DEFAULT '0',
price smallint(6) unsigned NOT NULL DEFAULT '0',
filename char(100) NOT NULL DEFAULT '',
description char(100) NOT NULL DEFAULT '',
filetype char(50) NOT NULL DEFAULT '',
filesize int(10) unsigned NOT NULL DEFAULT '0',
attachment char(100) NOT NULL DEFAULT '',
downloads mediumint(8) NOT NULL DEFAULT '0',
isimage tinyint(1) unsigned NOT NULL DEFAULT '0',
uid mediumint(8) unsigned NOT NULL DEFAULT '0',
thumb tinyint(1) unsigned NOT NULL DEFAULT '0',
remote tinyint(1) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (aid),
KEY tid (tid),
KEY pid (pid,aid),
KEY uid (uid)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS jrun_attachpaymentlog;
CREATE TABLE jrun_attachpaymentlog (
uid mediumint(8) unsigned NOT NULL DEFAULT '0',
aid mediumint(8) unsigned NOT NULL DEFAULT '0',
authorid mediumint(8) unsigned NOT NULL DEFAULT '0',
dateline int(10) unsigned NOT NULL DEFAULT '0',
amount int(10) unsigned NOT NULL DEFAULT '0',
netamount int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (aid,uid),
KEY uid (uid),
KEY authorid (authorid)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS jrun_attachtypes;
CREATE TABLE jrun_attachtypes (
id smallint(6) unsigned NOT NULL AUTO_INCREMENT,
extension char(12) NOT NULL DEFAULT '',
maxsize int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS jrun_banned;
CREATE TABLE jrun_banned (
id smallint(6) unsigned NOT NULL AUTO_INCREMENT,
ip1 smallint(3) NOT NULL DEFAULT '0',
ip2 smallint(3) NOT NULL DEFAULT '0',
ip3 smallint(3) NOT NULL DEFAULT '0',
ip4 smallint(3) NOT NULL DEFAULT '0',
admin varchar(15) NOT NULL DEFAULT '',
dateline int(10) unsigned NOT NULL DEFAULT '0',
expiration int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS jrun_bbcodes;
CREATE TABLE jrun_bbcodes (
id mediumint(8)