tables.php
上传用户:gzy2002
上传日期:2010-02-11
资源大小:1785k
文件大小:34k
- <?php
- $queries[] = "
- CREATE TABLE admin_help_cat (
- id int(10) NOT NULL auto_increment,
- name varchar(250) NOT NULL default '',
- displayorder int(10) NOT NULL default '0',
- PRIMARY KEY (id)
- )
- ";
- $queries[] = "
- CREATE TABLE admin_help_entry (
- id int(10) NOT NULL auto_increment,
- category int(10) NOT NULL default '0',
- entry mediumtext NOT NULL,
- displayorder int(10) NOT NULL default '0',
- title varchar(250) NOT NULL default '',
- PRIMARY KEY (id)
- )
- ";
- $queries[] = "
- CREATE TABLE blobs (
- id int(10) unsigned NOT NULL auto_increment,
- blobdata longblob NOT NULL,
- PRIMARY KEY (id)
- )
- ";
- $queries[] = "
- CREATE TABLE calendar_task (
- id int(10) NOT NULL auto_increment,
- title varchar(250) NOT NULL default '',
- description mediumtext NOT NULL,
- techmaker int(10) NOT NULL default '0',
- multistaff int(1) NOT NULL default '0',
- globalcomplete int(1) NOT NULL default '0',
- notifycompletion int(1) NOT NULL default '0',
- repeattype int(1) NOT NULL default '0',
- value1 int(10) NOT NULL default '0',
- value2 varchar(250) NOT NULL default '0',
- starttime time NOT NULL default '00:00:00',
- startdate date NOT NULL default '0000-00-00',
- enddate date NOT NULL default '0000-00-00',
- endtime time NOT NULL default '00:00:00',
- timezone int(10) NOT NULL default '0',
- weekstart int(10) NOT NULL default '0',
- timezone_dst int(1) NOT NULL default '0',
- PRIMARY KEY (id),
- KEY repeattype (repeattype),
- KEY startdate (startdate),
- KEY enddate (enddate)
- )
- ";
- $queries[] = "
- CREATE TABLE calendar_task_iteration (
- task_techid int(11) NOT NULL default '0',
- taskid int(11) default NULL,
- completed int(11) default NULL,
- date date default NULL,
- time time default NULL
- )
- ";
- $queries[] = "
- CREATE TABLE calendar_task_tech (
- id int(10) NOT NULL auto_increment,
- eventid int(10) NOT NULL default '0',
- email_due int(1) NOT NULL default '0',
- email_before1 int(3) NOT NULL default '0',
- email_before2 int(3) NOT NULL default '0',
- techid int(1) NOT NULL default '0',
- completed int(1) NOT NULL default '0',
- stamp int(10) default '0',
- PRIMARY KEY (id),
- KEY eventid (eventid)
- )
- ";
- $queries[] = "
- CREATE TABLE cron_options (
- id int(10) NOT NULL auto_increment,
- title varchar(250) NOT NULL default '',
- options mediumtext NOT NULL,
- day int(2) NOT NULL default '0',
- hour int(1) NOT NULL default '0',
- scriptname varchar(250) NOT NULL default '',
- description mediumtext NOT NULL,
- nextrun int(10) NOT NULL default '0',
- templates mediumtext NOT NULL,
- PRIMARY KEY (id)
- )
- ";
- $queries[] = "
- CREATE TABLE data (
- id int(10) NOT NULL auto_increment,
- name varchar(250) NOT NULL default '',
- data longtext NOT NULL,
- isdefault int(1) NOT NULL default '0',
- PRIMARY KEY (id)
- )
- ";
- $queries[] = "
- CREATE TABLE escalate (
- id int(10) unsigned NOT NULL auto_increment,
- dayswaiting int(10) NOT NULL default '0',
- daysopen int(10) NOT NULL default '0',
- category int(10) NOT NULL default '0',
- priority int(10) NOT NULL default '0',
- tech int(10) NOT NULL default '0',
- techemail varchar(250) NOT NULL default '',
- PRIMARY KEY (id)
- )
- ";
- $queries[] = "
- CREATE TABLE faq_articles (
- id int(10) unsigned NOT NULL auto_increment,
- title varchar(255) NOT NULL default '',
- answer mediumtext NOT NULL,
- techid_made int(10) NOT NULL default '0',
- date_made int(10) NOT NULL default '0',
- techid_modified int(10) NOT NULL default '0',
- date_modified int(10) NOT NULL default '0',
- question mediumtext NOT NULL,
- category int(10) NOT NULL default '0',
- show_order int(10) NOT NULL default '0',
- to_validate int(1) NOT NULL default '0',
- keywords mediumtext NOT NULL,
- userid int(10) NOT NULL default '0',
- rating int(10) NOT NULL default '0',
- votes int(10) NOT NULL default '0',
- ref varchar(20) NOT NULL default '',
- question_html int(1) NOT NULL default '0',
- answer_html int(1) NOT NULL default '0',
- views int(10) NOT NULL default '0',
- PRIMARY KEY (id),
- KEY catid (category),
- UNIQUE KEY ref (ref)
- )
- ";
- $queries[] = "
- CREATE TABLE faq_articles_related (
- show_article int(10) NOT NULL default '0',
- related_article int(10) NOT NULL default '0',
- KEY show_article (show_article)
- )
- ";
- $queries[] = "
- CREATE TABLE faq_attachments (
- id int(10) NOT NULL auto_increment,
- blobid int(10) NOT NULL default '0',
- filename varchar(255) NOT NULL default '0',
- filesize varchar(255) NOT NULL default '0',
- extension varchar(10) NOT NULL default '0',
- articleid int(10) NOT NULL default '0',
- techid int(10) NOT NULL default '0',
- timestamp int(10) NOT NULL default '0',
- PRIMARY KEY (id),
- KEY articleid (articleid)
- )
- ";
- $queries[] = "
- CREATE TABLE faq_cats (
- id int(10) unsigned NOT NULL auto_increment,
- name varchar(255) NOT NULL default '',
- description varchar(255) NOT NULL default '',
- articles int(10) NOT NULL default '0',
- parent int(10) NOT NULL default '0',
- show_order int(10) NOT NULL default '0',
- p_loggedin int(1) NOT NULL default '0',
- p_restricted int(1) NOT NULL default '0',
- parentlist varchar(250) NOT NULL default '0',
- totalarticles int(10) NOT NULL default '0',
- newdate int(10) NOT NULL default '0',
- editdate int(10) NOT NULL default '0',
- PRIMARY KEY (id),
- KEY parent (parent)
- )
- ";
- $queries[] = "
- CREATE TABLE faq_cats_related (
- show_cat int(10) NOT NULL default '0',
- related_cat int(10) NOT NULL default '0',
- KEY show_cat (show_cat)
- )
- ";
- $queries[] = "
- CREATE TABLE faq_comments (
- id int(10) NOT NULL auto_increment,
- userid int(10) NOT NULL default '0',
- useremail varchar(250) NOT NULL default '',
- comments mediumtext NOT NULL,
- articleid int(10) NOT NULL default '0',
- new int(1) NOT NULL default '0',
- PRIMARY KEY (id),
- KEY new (new),
- KEY articleid (articleid)
- )
- ";
- $queries[] = "
- CREATE TABLE faq_keywords (
- articles varchar(100) NOT NULL default '',
- word varchar(50) NOT NULL default '',
- PRIMARY KEY (word)
- )
- ";
- $queries[] = "
- CREATE TABLE faq_permissions (
- catid int(10) NOT NULL default '0',
- groupid int(10) NOT NULL default '0',
- UNIQUE KEY groupid (groupid,catid)
- )
- ";
- $queries[] = "
- CREATE TABLE faq_rating (
- ipaddress varchar(20) NOT NULL default '',
- faqid int(10) NOT NULL default '0',
- rating int(10) NOT NULL default '0',
- timestamp int(10) NOT NULL default '0',
- userid int(10) NOT NULL default '0',
- session int(10) NOT NULL default '0'
- )
- ";
- $queries[] = "
- CREATE TABLE faq_searchlog (
- id int(10) NOT NULL auto_increment,
- time int(10) NOT NULL default '0',
- query mediumtext NOT NULL,
- results int(10) NOT NULL default '0',
- PRIMARY KEY (id)
- )
- ";
- $queries[] = "
- CREATE TABLE faq_subscriptions (
- id int(10) unsigned NOT NULL auto_increment,
- catid int(10) NOT NULL default '0',
- articleid int(10) NOT NULL default '0',
- new int(1) NOT NULL default '0',
- edit int(1) NOT NULL default '0',
- userid int(10) NOT NULL default '0',
- PRIMARY KEY (id),
- KEY articleid (articleid),
- KEY catid (catid)
- )
- ";
- $queries[] = "
- CREATE TABLE faq_word (
- id int(10) NOT NULL default '0',
- word varchar(250) NOT NULL default '',
- distribution decimal(10,0) NOT NULL default '0',
- total int(10) NOT NULL default '0',
- PRIMARY KEY (id)
- )
- ";
- $queries[] = "
- CREATE TABLE gateway_accounts (
- id int(10) NOT NULL auto_increment,
- email char(75) NOT NULL default '',
- category int(10) NOT NULL default '0',
- priority int(10) NOT NULL default '0',
- tech int(10) NOT NULL default '0',
- auto_reply int(1) NOT NULL default '0',
- auto_new int(1) NOT NULL default '0',
- is_default int(1) NOT NULL default '0',
- PRIMARY KEY (id)
- )
- ";
- $queries[] = "
- CREATE TABLE gateway_auto (
- id int(10) unsigned NOT NULL auto_increment,
- email varchar(250) NOT NULL default '',
- type varchar(50) NOT NULL default '',
- timestamp int(11) NOT NULL default '0',
- PRIMARY KEY (id)
- )
- ";
- $queries[] = "
- CREATE TABLE gateway_error (
- id int(10) NOT NULL auto_increment,
- logid int(10) NOT NULL default '0',
- error varchar(250) NOT NULL default '',
- timestamp int(10) NOT NULL default '0',
- sourceid int(10) NOT NULL default '0',
- PRIMARY KEY (id)
- )
- ";
- $queries[] = "
- CREATE TABLE gateway_pop_accounts (
- id int(11) NOT NULL auto_increment,
- accountid int(11) default NULL,
- server varchar(64) default NULL,
- username varchar(64) default NULL,
- password varchar(64) default NULL,
- target varchar(64) NOT NULL default 'user',
- PRIMARY KEY (id)
- )
- ";
- $queries[] = "
- CREATE TABLE gateway_pop_failures (
- id int(11) NOT NULL auto_increment,
- messageid varchar(255) default NULL,
- reason varchar(255) default NULL,
- stamp int(11) default NULL,
- PRIMARY KEY (id)
- )
- ";
- $queries[] = "
- CREATE TABLE gateway_source (
- id int(10) NOT NULL auto_increment,
- source mediumtext NOT NULL,
- headers mediumtext NOT NULL,
- PRIMARY KEY (id)
- )
- ";
- $queries[] = "
- CREATE TABLE gateway_spam (
- id int(10) NOT NULL auto_increment,
- type varchar(250) NOT NULL default '',
- regex int(1) NOT NULL default '0',
- textmatch mediumtext NOT NULL,
- is_delete int(1) NOT NULL default '0',
- PRIMARY KEY (id)
- )
- ";
- $queries[] = "
- CREATE TABLE languages (
- id int(10) NOT NULL auto_increment,
- name varchar(250) NOT NULL default '',
- is_selectable int(1) NOT NULL default '0',
- custom int(1) NOT NULL default '0',
- isocode varchar(250) NOT NULL default '',
- contenttype varchar(250) NOT NULL default '',
- direction enum('ltr','rtl') NOT NULL default 'ltr',
- installid int(10) NOT NULL default '0',
- PRIMARY KEY (id)
- )
- ";
- $queries[] = "
- CREATE TABLE news (
- id int(10) unsigned NOT NULL auto_increment,
- title varchar(255) NOT NULL default '',
- details mediumtext NOT NULL,
- techid int(10) NOT NULL default '0',
- date int(10) NOT NULL default '0',
- logged_in int(1) NOT NULL default '0',
- logged_out int(1) NOT NULL default '0',
- PRIMARY KEY (id)
- )
- ";
- $queries[] = "
- CREATE TABLE pm_relations (
- pmid int(10) NOT NULL,
- techid int(10) NOT NULL default '0',
- is_read int(1) NOT NULL default '0',
- PRIMARY KEY (pmid, techid)
- )
- ";
- $queries[] = "
- CREATE TABLE pm_source (
- id int(10) NOT NULL auto_increment,
- fromid int(10) NOT NULL default '0',
- title varchar(250) NOT NULL default '',
- message mediumtext NOT NULL,
- timestamp int(10) NOT NULL default '0',
- PRIMARY KEY (id)
- )
- ";
- $queries[] = "
- CREATE TABLE query_log (
- id int(11) NOT NULL auto_increment,
- query mediumtext,
- explain_log mediumtext,
- duration decimal(15,10) default NULL,
- stamp int(11) default NULL,
- filename varchar(250) NOT NULL default '',
- PRIMARY KEY (id),
- KEY duration (duration),
- KEY stamp (stamp)
- )
- ";
- $queries[] = "
- CREATE TABLE quickreply (
- id int(10) NOT NULL auto_increment,
- category int(10) NOT NULL default '0',
- techid int(10) NOT NULL default '0',
- name varchar(50) NOT NULL default '',
- response mediumtext NOT NULL,
- PRIMARY KEY (id),
- KEY techid (techid)
- )
- ";
- $queries[] = "
- CREATE TABLE quickreply_cat (
- id int(10) unsigned NOT NULL auto_increment,
- name varchar(50) NOT NULL default '',
- techid int(10) NOT NULL default '0',
- global int(1) NOT NULL default '0',
- PRIMARY KEY (id)
- )
- ";
- $queries[] = "
- CREATE TABLE report (
- id int(10) NOT NULL auto_increment,
- title varchar(250) NOT NULL default '',
- name varchar(250) NOT NULL default '',
- description mediumtext NOT NULL,
- lastrun int(10) NOT NULL default '0',
- format varchar(250) NOT NULL default '',
- email varchar(250) NOT NULL default '',
- repeattype varchar(250) NOT NULL default '',
- value1 varchar(250) NOT NULL default '',
- value2 varchar(250) NOT NULL default '',
- style int(10) NOT NULL default '0',
- path varchar(250) NOT NULL default '',
- PRIMARY KEY (id)
- )
- ";
- $queries[] = "
- CREATE TABLE report_relations (
- reportid int(10) NOT NULL default '0',
- statid int(10) NOT NULL default '0'
- )
- ";
- $queries[] = "
- CREATE TABLE report_stat (
- id int(10) NOT NULL auto_increment,
- title varchar(250) NOT NULL default '',
- description mediumtext NOT NULL,
- variable1 varchar(250) NOT NULL default '',
- variable2 varchar(250) NOT NULL default '',
- variable1times mediumtext NOT NULL,
- variable2times mediumtext NOT NULL,
- dateaffect varchar(250) NOT NULL default '',
- displaytype varchar(50) NOT NULL default '',
- appendix int(1) NOT NULL default '0',
- displayfields mediumtext NOT NULL,
- fixed_general mediumtext NOT NULL,
- fixed_user mediumtext NOT NULL,
- fixed_ticket mediumtext NOT NULL,
- PRIMARY KEY (id)
- )
- ";
- $queries[] = "
- CREATE TABLE report_style (
- id int(10) unsigned NOT NULL auto_increment,
- name varchar(250) NOT NULL default '',
- title_colour varchar(250) NOT NULL default '',
- description_colour varchar(250) NOT NULL default '',
- PRIMARY KEY (id)
- )
- ";
- $queries[] = "
- CREATE TABLE search (
- id int(10) NOT NULL auto_increment,
- query mediumtext NOT NULL,
- results mediumtext NOT NULL,
- time int(10) NOT NULL default '0',
- techid int(10) NOT NULL default '0',
- total int(10) NOT NULL default '0',
- PRIMARY KEY (id),
- KEY techid (techid)
- )
- ";
- $queries[] = "
- CREATE TABLE settings (
- id int(10) unsigned NOT NULL auto_increment,
- name varchar(75) NOT NULL default '',
- settings varchar(255) default NULL,
- value mediumtext NOT NULL,
- category int(10) NOT NULL default '0',
- description mediumtext,
- field_type varchar(255) NOT NULL default '',
- show_order int(10) NOT NULL default '0',
- options varchar(250) NOT NULL default '',
- PRIMARY KEY (id)
- )
- ";
- $queries[] = "
- CREATE TABLE settings_cat (
- id int(10) NOT NULL auto_increment,
- name varchar(255) NOT NULL default '',
- description mediumtext NOT NULL,
- defaultdisplay int(1) NOT NULL default '0',
- displayorder int(11) default '0',
- PRIMARY KEY (id)
- )
- ";
- $queries[] = "
- CREATE TABLE tech (
- id int(10) NOT NULL auto_increment,
- username varchar(255) NOT NULL default '',
- `password` varchar(255) NOT NULL default '',
- signature mediumtext NOT NULL,
- email varchar(255) NOT NULL default '',
- p_close_ticket int(1) NOT NULL default '0',
- p_tech_view int(1) NOT NULL default '0',
- p_tech_edit int(1) NOT NULL default '0',
- p_add_k int(1) NOT NULL default '0',
- p_edit_k int(1) NOT NULL default '0',
- p_delete_k int(1) NOT NULL default '0',
- p_add_c_k int(1) NOT NULL default '0',
- p_delete_c_k int(1) NOT NULL default '0',
- is_admin int(1) NOT NULL default '0',
- p_edit_c_k int(1) NOT NULL default '0',
- p_edit_users int(1) NOT NULL default '0',
- p_delete_users int(1) NOT NULL default '0',
- p_add_announcements int(1) NOT NULL default '0',
- p_delete_announcements int(1) NOT NULL default '0',
- p_create_users int(1) NOT NULL default '0',
- p_edit_announcements int(1) NOT NULL default '0',
- p_delete_other int(1) NOT NULL default '0',
- p_delete_own int(1) NOT NULL default '0',
- userfield_selection mediumtext NOT NULL,
- fielddisplay mediumtext NOT NULL,
- alert_reply_your int(1) NOT NULL default '0',
- alert_reply_cat int(1) NOT NULL default '0',
- alert_reply_all int(1) NOT NULL default '0',
- alert_new_cat int(1) NOT NULL default '0',
- alert_new_all int(1) NOT NULL default '0',
- alert_pm int(1) NOT NULL default '0',
- alert_sound int(1) NOT NULL default '0',
- alert_popup int(1) NOT NULL default '0',
- alert_time int(10) NOT NULL default '0',
- alert_frequency int(2) NOT NULL default '0',
- cats_user varchar(250) NOT NULL default '',
- cats_admin varchar(250) NOT NULL default '',
- email_new_email int(1) NOT NULL default '0',
- email_new_sms int(1) NOT NULL default '0',
- email_reply_email int(1) NOT NULL default '0',
- email_reply_sms int(1) NOT NULL default '0',
- email_own_email int(1) NOT NULL default '0',
- email_own_sms int(1) NOT NULL default '0',
- sms varchar(250) NOT NULL default '',
- disabled int(1) NOT NULL default '0',
- email_assigned int(1) NOT NULL default '0',
- email_pm int(1) NOT NULL default '0',
- weekstart int(11) NOT NULL default '7',
- p_approve_new_registrations int(1) NOT NULL default '0',
- password_cookie varchar(8) NOT NULL default '',
- disabled_reason varchar(255) NOT NULL default '',
- email_attachments int(1) NOT NULL default '0',
- email_own_attachments int(1) NOT NULL default '0',
- copy_to_clipboard int(1) NOT NULL default '0',
- p_user_expire int(1) NOT NULL default '1',
- selected_sound varchar(255) default '',
- p_quickedit int(1) NOT NULL default '0',
- p_global_note int(1) NOT NULL default '0',
- email_faq int(1) NOT NULL default '0',
- footer int(10) NOT NULL default '0',
- p_html_tech int(1) NOT NULL default '0',
- p_html_user int(1) NOT NULL default '0',
- timezone int(10) NOT NULL default '0',
- timezone_dst int(1) NOT NULL default '0',
- PRIMARY KEY (id)
- )
- ";
- $queries[] = "
- CREATE TABLE tech_attachments (
- id int(10) NOT NULL auto_increment,
- blobid int(10) NOT NULL default '0',
- filename varchar(250) NOT NULL default '',
- filesize varchar(50) NOT NULL default '',
- techid int(10) NOT NULL default '0',
- category int(10) NOT NULL default '0',
- extension varchar(10) NOT NULL default '',
- timestamp int(10) NOT NULL default '0',
- comments mediumtext NOT NULL,
- PRIMARY KEY (id),
- KEY techid (techid),
- KEY category (category)
- )
- ";
- $queries[] = "
- CREATE TABLE tech_bookmarks (
- id int(10) NOT NULL auto_increment,
- url varchar(250) NOT NULL default '',
- comments mediumtext NOT NULL,
- displayorder int(10) NOT NULL default '0',
- techid int(10) NOT NULL default '0',
- name varchar(250) NOT NULL default '',
- category int(10) NOT NULL default '0',
- PRIMARY KEY (id),
- KEY techid (techid,category)
- )
- ";
- $queries[] = "
- CREATE TABLE tech_email (
- techid int(10) NOT NULL default '0',
- fieldname varchar(250) NOT NULL default '',
- value varchar(250) NOT NULL default '',
- newreply int(1) NOT NULL default '0',
- newticket int(1) NOT NULL default '0',
- email int(1) NOT NULL default '0',
- sms int(1) NOT NULL default '0',
- KEY techid (techid)
- )
- ";
- $queries[] = "
- CREATE TABLE tech_folders (
- techid int(10) NOT NULL default '0',
- type varchar(250) NOT NULL default '',
- categories mediumtext NOT NULL,
- UNIQUE KEY techid (techid,type)
- )
- ";
- $queries[] = "
- CREATE TABLE tech_help_cat (
- id int(10) NOT NULL auto_increment,
- name varchar(250) NOT NULL default '',
- displayorder int(10) NOT NULL default '0',
- PRIMARY KEY (id)
- )
- ";
- $queries[] = "
- CREATE TABLE tech_help_entry (
- id int(10) NOT NULL auto_increment,
- category int(10) NOT NULL default '0',
- entry mediumtext NOT NULL,
- displayorder int(10) NOT NULL default '0',
- title varchar(250) NOT NULL default '',
- PRIMARY KEY (id),
- KEY category (category)
- )
- ";
- $queries[] = "
- CREATE TABLE tech_internal_help_cat (
- id int(10) NOT NULL auto_increment,
- name varchar(250) NOT NULL default '',
- displayorder int(10) NOT NULL default '0',
- PRIMARY KEY (id)
- )
- ";
- $queries[] = "
- CREATE TABLE tech_internal_help_entry (
- id int(10) NOT NULL auto_increment,
- category int(10) NOT NULL default '0',
- entry mediumtext NOT NULL,
- displayorder int(10) NOT NULL default '0',
- title varchar(250) NOT NULL default '',
- PRIMARY KEY (id)
- )
- ";
- $queries[] = "
- CREATE TABLE tech_news (
- id int(10) unsigned NOT NULL auto_increment,
- title varchar(255) NOT NULL default '',
- details mediumtext NOT NULL,
- techid int(10) NOT NULL default '0',
- date int(10) NOT NULL default '0',
- PRIMARY KEY (id)
- )
- ";
- $queries[] = "
- CREATE TABLE tech_notes (
- id int(10) NOT NULL auto_increment,
- title varchar(250) NOT NULL default '',
- note mediumtext NOT NULL,
- timestamp int(10) NOT NULL default '0',
- techid int(10) NOT NULL default '0',
- category int(10) NOT NULL default '0',
- PRIMARY KEY (id),
- KEY techid (techid,category)
- )
- ";
- $queries[] = "
- CREATE TABLE tech_sendmail (
- id int(10) NOT NULL auto_increment,
- parent int(10) NOT NULL default '0',
- techid int(10) NOT NULL default '0',
- subject varchar(255) NOT NULL default '',
- message mediumtext NOT NULL,
- from_email varchar(255) NOT NULL default '',
- to_email varchar(255) NOT NULL default '',
- tracking int(1) NOT NULL default '0',
- awaiting_reply int(1) NOT NULL default '0',
- pass varchar(7) NOT NULL default '',
- date_sent int(10) NOT NULL default '0',
- PRIMARY KEY (id)
- )
- ";
- $queries[] = "
- CREATE TABLE tech_session (
- sessionid char(32) NOT NULL default '',
- techid int(10) unsigned NOT NULL default '0',
- useragent char(250) NOT NULL default '',
- lastactivity int(10) unsigned NOT NULL default '0',
- location char(255) NOT NULL default '',
- language int(10) NOT NULL default '0',
- techzone int(1) default '0',
- PRIMARY KEY (sessionid,sessionid),
- KEY sessionid (sessionid),
- KEY techid (techid)
- )
- ";
- $queries[] = "
- CREATE TABLE tech_start_tickets (
- techid int(10) NOT NULL default '0',
- userid int(10) NOT NULL default '0',
- KEY techid (techid)
- )
- ";
- $queries[] = "
- CREATE TABLE tech_ticket_save (
- ticketid int(10) NOT NULL default '0',
- techid int(10) NOT NULL default '0',
- message mediumtext NOT NULL,
- category int(10) NOT NULL default '0',
- id int(10) unsigned NOT NULL auto_increment,
- PRIMARY KEY (id),
- KEY techid (techid)
-
- )
- ";
- $queries[] = "
- CREATE TABLE tech_ticket_search (
- id int(11) NOT NULL auto_increment,
- techid int(11) NOT NULL default '0',
- save_name varchar(255) NOT NULL default '',
- save_type enum('search','result') NOT NULL default 'search',
- data mediumtext,
- PRIMARY KEY (id),
- KEY techid (techid)
- )
- ";
- $queries[] = "
- CREATE TABLE tech_ticket_watch (
- id int(10) NOT NULL auto_increment,
- ticketid int(10) NOT NULL default '0',
- created int(10) NOT NULL default '0',
- datetodo date NOT NULL default '0000-00-00',
- completed int(1) NOT NULL default '0',
- techid int(10) NOT NULL default '0',
- PRIMARY KEY (id),
- KEY date (datetodo),
- KEY techid (created)
- )
- ";
- $queries[] = "
- CREATE TABLE tech_timelog (
- id int(11) NOT NULL auto_increment,
- techid int(11) default '0',
- activity char(255) default NULL,
- stamp int(11) default NULL,
- PRIMARY KEY (id),
- KEY techid (techid)
- )
- ";
- $queries[] = "
- CREATE TABLE tech_timelog_archive (
- id int(11) NOT NULL auto_increment,
- techid int(11) default '0',
- activity char(255) default NULL,
- stamp int(11) default NULL,
- PRIMARY KEY (id),
- KEY techid (techid)
- )
- ";
- $queries[] = "
- CREATE TABLE template (
- id int(10) unsigned NOT NULL auto_increment,
- name varchar(255) NOT NULL default '',
- template mediumtext,
- category int(10) default NULL,
- description varchar(255) NOT NULL default '',
- upgraded int(1) NOT NULL default '0',
- changed int(1) NOT NULL default '0',
- custom int(1) NOT NULL default '0',
- version_upgrade int(1) NOT NULL default '0',
- template_unparsed mediumtext NOT NULL,
- displayorder int(3) NOT NULL default '0',
- backup int(1) NOT NULL default '0',
- PRIMARY KEY (id),
- KEY name (name)
- )
- ";
- $queries[] = "
- CREATE TABLE template_cat (
- id int(10) NOT NULL auto_increment,
- name varchar(255) NOT NULL default '',
- description mediumtext NOT NULL,
- PRIMARY KEY (id)
- )
- ";
- $queries[] = "
- CREATE TABLE template_email (
- id int(10) unsigned NOT NULL auto_increment,
- name varchar(255) NOT NULL default '',
- template mediumtext,
- category varchar(50) NOT NULL default '0',
- description varchar(255) NOT NULL default '',
- upgraded int(1) NOT NULL default '0',
- changed int(1) NOT NULL default '0',
- custom int(1) NOT NULL default '0',
- version_upgrade int(1) NOT NULL default '0',
- template_unparsed mediumtext NOT NULL,
- displayorder int(3) NOT NULL default '0',
- backup int(1) NOT NULL default '0',
- language int(10) NOT NULL default '0',
- subject varchar(250) NOT NULL default '',
- PRIMARY KEY (id),
- KEY name (name)
- )
- ";
- $queries[] = "
- CREATE TABLE template_replace (
- id int(10) unsigned NOT NULL auto_increment,
- name varchar(75) NOT NULL default '',
- value mediumtext NOT NULL,
- description mediumtext,
- displayorder int(10) NOT NULL default '0',
- custom int(1) NOT NULL default '0',
- PRIMARY KEY (id)
- )
- ";
- $queries[] = "
- CREATE TABLE template_words (
- wordref varchar(50) NOT NULL default '',
- language int(10) NOT NULL default '0',
- text mediumtext NOT NULL,
- category int(10) NOT NULL default '0',
- cust int(1) NOT NULL default '0',
- KEY language (language)
- )
- ";
- $queries[] = "
- CREATE TABLE template_words_cat (
- id int(10) NOT NULL auto_increment,
- name varchar(250) NOT NULL default '',
- displayorder int(10) NOT NULL default '0',
- PRIMARY KEY (id)
- )
- ";
- $queries[] = "
- CREATE TABLE ticket (
- id int(10) NOT NULL auto_increment,
- subject varchar(250) NOT NULL default '',
- userid int(10) NOT NULL default '0',
- tech int(10) NOT NULL default '0',
- category int(10) NOT NULL default '0',
- priority int(10) NOT NULL default '0',
- language int(10) NOT NULL default '0',
- is_locked int(1) NOT NULL default '0',
- is_open int(1) NOT NULL default '0',
- awaiting_tech int(1) NOT NULL default '0',
- date_opened int(10) NOT NULL default '0',
- date_closed int(10) NOT NULL default '0',
- date_lastreply int(10) NOT NULL default '0',
- date_lastreply_tech int(10) NOT NULL default '0',
- date_locked int(10) NOT NULL default '0',
- lock_techid int(10) NOT NULL default '0',
- email varchar(250) NOT NULL default '',
- ref varchar(20) NOT NULL default '',
- gatewayid int(10) NOT NULL default '0',
- ticketemail varchar(250) NOT NULL default '',
- nodisplay int(1) NOT NULL default '0',
- date_awaiting_toggled int(10) NOT NULL default '0',
- authcode varchar(250) NOT NULL default '',
- PRIMARY KEY (id),
- KEY userid (userid),
- KEY techid (tech),
- KEY category (category),
- KEY priority (priority),
- KEY date_opened (date_opened),
- UNIQUE KEY ref (ref),
- KEY is_open (is_open),
- KEY awaiting_tech (awaiting_tech),
- KEY nodisplay (nodisplay)
- )
- ";
- $queries[] = "
- CREATE TABLE ticket_attachments (
- id int(10) NOT NULL auto_increment,
- filename varchar(255) NOT NULL default '0',
- filesize varchar(255) NOT NULL default '0',
- ticketid int(10) NOT NULL default '0',
- blobid int(10) NOT NULL default '0',
- techid int(10) NOT NULL default '0',
- userid int(10) NOT NULL default '0',
- temporaryid int(10) NOT NULL default '0',
- timestamp int(10) NOT NULL default '0',
- extension varchar(5) NOT NULL default '',
- toemail int(1) NOT NULL default '0',
- PRIMARY KEY (id),
- KEY ticketid (ticketid)
- )
- ";
- $queries[] = "
- CREATE TABLE ticket_cat (
- id int(10) unsigned NOT NULL auto_increment,
- name varchar(255) default NULL,
- cat_order int(5) NOT NULL default '0',
- user_view int(1) NOT NULL default '0',
- user_select int(1) NOT NULL default '0',
- show_category int(10) NOT NULL default '0',
- require_registration tinyint(4) NOT NULL default '0',
- auto_assign_tech int(11) NOT NULL default '0',
- PRIMARY KEY (id)
- )
- ";
- $queries[] = "
- CREATE TABLE ticket_def (
- id int(10) unsigned NOT NULL auto_increment,
- name mediumtext,
- display_name varchar(255) NOT NULL default '',
- description mediumtext,
- formtype enum('input','select','textarea','multiselect','radio','checkbox','system') NOT NULL default 'select',
- user_editable int(1) NOT NULL default '0',
- user_viewable int(1) NOT NULL default '0',
- ticket_start int(1) NOT NULL default '0',
- tech_viewable int(1) NOT NULL default '0',
- tech_editable int(1) NOT NULL default '0',
- default_value varchar(255) default NULL,
- parsed_default_value varchar(255) default NULL,
- data mediumtext NOT NULL,
- extrainput int(1) NOT NULL default '0',
- maxoptions smallint(4) NOT NULL default '0',
- minoptions smallint(4) NOT NULL default '0',
- maxlength smallint(6) NOT NULL default '0',
- minlength smallint(6) NOT NULL default '0',
- regex varchar(255) default NULL,
- error_message mediumtext,
- required int(1) NOT NULL default '0',
- length int(10) NOT NULL default '0',
- height int(10) NOT NULL default '0',
- perline int(2) NOT NULL default '1',
- displayorder int(10) NOT NULL default '0',
- extrainput_location int(1) NOT NULL default '0',
- extrainput_text varchar(250) NOT NULL default '',
- multiselect int(1) NOT NULL default '0',
- PRIMARY KEY (id)
- )
- ";
- $queries[] = "
- CREATE TABLE ticket_fielddisplay (
- id int(10) unsigned NOT NULL auto_increment,
- code mediumtext NOT NULL,
- name varchar(250) NOT NULL default '',
- example varchar(250) NOT NULL default '',
- PRIMARY KEY (id)
- )
- ";
- $queries[] = "
- CREATE TABLE ticket_log (
- id int(10) NOT NULL auto_increment,
- ticketid int(10) NOT NULL default '0',
- actionid int(10) NOT NULL default '0',
- techid int(10) NOT NULL default '0',
- timestamp int(10) NOT NULL default '0',
- userid int(10) NOT NULL default '0',
- id_before int(10) NOT NULL default '0',
- id_after int(10) NOT NULL default '0',
- detail_before mediumtext NOT NULL,
- detail_after mediumtext NOT NULL,
- extra varchar(250) NOT NULL default '',
- PRIMARY KEY (id),
- KEY ticketid (ticketid),
- KEY techid (techid)
- )
- ";
- $queries[] = "
- CREATE TABLE ticket_merge (
- old_id int(10) NOT NULL default '0',
- old_ref varchar(20) NOT NULL default '',
- new_id int(10) NOT NULL default '0',
- new_ref varchar(20) NOT NULL default ''
- )
- ";
- $queries[] = "
- CREATE TABLE ticket_message (
- id int(10) unsigned NOT NULL auto_increment,
- ticketid int(10) NOT NULL default '0',
- message mediumtext,
- date int(10) default NULL,
- techid int(10) NOT NULL default '0',
- ipaddress varchar(16) NOT NULL default '',
- sourceid int(10) NOT NULL default '0',
- userid int(10) NOT NULL default '0',
- striptags int(1) NOT NULL default '0',
- PRIMARY KEY (id),
- KEY ticketid (ticketid),
- KEY techid (techid)
- )
- ";
- $queries[] = "
- CREATE TABLE ticket_notes (
- id int(10) unsigned NOT NULL auto_increment,
- ticketid int(10) NOT NULL default '0',
- date int(10) NOT NULL default '0',
- techid int(10) NOT NULL default '0',
- note mediumtext NOT NULL,
- PRIMARY KEY (id),
- KEY techid (techid)
- )
- ";
- $queries[] = "
- CREATE TABLE ticket_pri (
- id int(10) unsigned NOT NULL auto_increment,
- name varchar(255) NOT NULL default '',
- pri_order int(10) NOT NULL default '0',
- user_view int(1) NOT NULL default '0',
- user_select int(1) NOT NULL default '0',
- show_priority int(10) NOT NULL default '0',
- auto_assign_tech int(10) NOT NULL default '0',
- require_registration int(10) NOT NULL default '0',
- PRIMARY KEY (id)
- )
- ";
- $queries[] = "
- CREATE TABLE `user` (
- id int(10) unsigned NOT NULL auto_increment,
- username varchar(250) NOT NULL default '',
- email varchar(250) NOT NULL default '',
- validate_key varchar(6) NOT NULL default '0',
- awaiting_validation int(1) NOT NULL default '0',
- `password` varchar(250) NOT NULL default '',
- date_registered int(10) NOT NULL default '0',
- language int(10) NOT NULL default '0',
- password_cookie varchar(8) NOT NULL default '',
- password_url varchar(8) NOT NULL default '',
- autoresponds int(1) NOT NULL default '0',
- disabled int(1) NOT NULL default '0',
- awaiting_manual_validation int(1) NOT NULL default '0',
- expire_tickets int(10) NOT NULL default '0',
- expire_date int(10) NOT NULL default '0',
- expire_type enum('none','ticket','date','both') default 'none',
- disabled_reason varchar(255) default NULL,
- timezone int(10) NOT NULL default '0',
- weekstart int(10) NOT NULL default '0',
- name varchar(250) NOT NULL default '',
- timezone_dst int(1) NOT NULL default '0',
- PRIMARY KEY (id),
- KEY username (username),
- KEY email (email),
- KEY awaiting_manual_validation (awaiting_manual_validation)
- )
- ";
- $queries[] = "
- CREATE TABLE user_bill (
- id int(10) NOT NULL auto_increment,
- userid int(10) NOT NULL default '0',
- techid int(10) NOT NULL default '0',
- ticketid int(10) NOT NULL default '0',
- time int(10) NOT NULL default '0',
- paid int(1) NOT NULL default '0',
- billable int(1) default '0',
- charge float default '0',
- stamp int(10) NOT NULL default '0',
- PRIMARY KEY (id),
- KEY ticketid (ticketid,userid)
- )
- ";
- $queries[] = "
- CREATE TABLE user_def (
- id int(10) unsigned NOT NULL auto_increment,
- name varchar(255) default NULL,
- display_name mediumtext NOT NULL,
- description mediumtext,
- formtype enum('input','select','textarea','multiselect','radio','checkbox','system') NOT NULL default 'select',
- user_editable int(1) NOT NULL default '0',
- user_viewable int(1) NOT NULL default '0',
- user_start int(1) NOT NULL default '0',
- tech_viewable int(1) NOT NULL default '0',
- tech_editable int(1) NOT NULL default '0',
- default_value varchar(255) default NULL,
- parsed_default_value varchar(255) default NULL,
- data mediumtext NOT NULL,
- extrainput int(1) NOT NULL default '0',
- maxoptions smallint(4) NOT NULL default '0',
- minoptions smallint(4) NOT NULL default '0',
- maxlength smallint(6) NOT NULL default '0',
- minlength smallint(6) NOT NULL default '0',
- regex varchar(255) default NULL,
- error_message varchar(255) default NULL,
- required int(1) NOT NULL default '0',
- length int(10) NOT NULL default '0',
- height int(10) NOT NULL default '0',
- perline int(2) NOT NULL default '1',
- displayorder int(10) NOT NULL default '0',
- extrainput_location int(1) NOT NULL default '0',
- extrainput_text varchar(250) NOT NULL default '',
- multiselect int(1) NOT NULL default '0',
- PRIMARY KEY (id)
- )
- ";
- $queries[] = "
- CREATE TABLE user_email (
- email varchar(250) NOT NULL default '',
- userid int(10) NOT NULL default '0',
- validated int(1) NOT NULL default '0',
- authcode varchar(20) NOT NULL default '',
- KEY email (email),
- KEY userid (userid)
- )
- ";
- $queries[] = "
- CREATE TABLE user_groups (
- id int(10) NOT NULL auto_increment,
- name varchar(250) NOT NULL default '',
- PRIMARY KEY (id)
- )
- ";
- $queries[] = "
- CREATE TABLE user_help (
- id int(10) NOT NULL auto_increment,
- category int(10) NOT NULL default '0',
- name varchar(250) NOT NULL default '',
- displayorder int(10) NOT NULL default '0',
- PRIMARY KEY (id),
- KEY category (category)
- )
- ";
- $queries[] = "
- CREATE TABLE user_help_cats (
- id int(10) NOT NULL auto_increment,
- displayorder int(10) NOT NULL default '0',
- is_custom int(1) NOT NULL default '0',
- name varchar(250) NOT NULL default '',
- PRIMARY KEY (id)
- )
- ";
- $queries[] = "
- CREATE TABLE user_help_cats_entries (
- id int(10) NOT NULL auto_increment,
- categoryid int(10) NOT NULL default '0',
- languageid int(10) NOT NULL default '0',
- entry mediumtext NOT NULL,
- PRIMARY KEY (id)
- )
- ";
- $queries[] = "
- CREATE TABLE user_help_entries (
- id int(10) NOT NULL auto_increment,
- helpid int(10) NOT NULL default '0',
- language int(10) NOT NULL default '0',
- title varchar(250) NOT NULL default '',
- helpentry mediumtext NOT NULL,
- PRIMARY KEY (id),
- KEY language (language,helpid)
- )
- ";
- $queries[] = "
- CREATE TABLE user_notes (
- id int(10) NOT NULL auto_increment,
- userid int(10) NOT NULL default '0',
- techid int(10) NOT NULL default '0',
- note mediumtext NOT NULL,
- timestamp int(10) NOT NULL default '0',
- global int(1) NOT NULL default '0',
- PRIMARY KEY (id),
- KEY userid (userid,techid)
- )
- ";
- $queries[] = "
- CREATE TABLE user_session (
- sessionid char(32) NOT NULL default '',
- userid int(10) unsigned NOT NULL default '0',
- useragent char(250) NOT NULL default '',
- lastactivity int(10) unsigned NOT NULL default '0',
- location char(255) NOT NULL default '',
- language int(10) NOT NULL default '0',
- PRIMARY KEY (sessionid,sessionid),
- KEY sessionid (sessionid),
- KEY userid (userid)
- )
- ";
- ?>