mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-22 16:22:58 +02:00
This commit was manufactured by cvs2svn to create tag
'release_2_0_13'. git-svn-id: file:///svn/phpbb/tags/release_2_0_13@5098 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
10
phpBB/install/index.htm
Normal file
10
phpBB/install/index.htm
Normal file
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" text="#000000">
|
||||
|
||||
</body>
|
||||
</html>
|
1032
phpBB/install/install.php
Normal file
1032
phpBB/install/install.php
Normal file
File diff suppressed because it is too large
Load Diff
10
phpBB/install/schemas/index.htm
Normal file
10
phpBB/install/schemas/index.htm
Normal file
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" text="#000000">
|
||||
|
||||
</body>
|
||||
</html>
|
BIN
phpBB/install/schemas/ms_access_primer.zip
Normal file
BIN
phpBB/install/schemas/ms_access_primer.zip
Normal file
Binary file not shown.
247
phpBB/install/schemas/mssql_basic.sql
Normal file
247
phpBB/install/schemas/mssql_basic.sql
Normal file
@@ -0,0 +1,247 @@
|
||||
/*
|
||||
|
||||
Basic DB data for phpBB2 devel (MSSQL)
|
||||
|
||||
$Id$
|
||||
|
||||
*/
|
||||
|
||||
BEGIN TRANSACTION;
|
||||
|
||||
/*
|
||||
-- Config
|
||||
*/
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('config_id','1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_disable','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('sitename','yourdomain.com');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('site_desc','A _little_ text to describe your forum');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_name','phpbb2mysql');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_path','/');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_domain','');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_secure','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('session_length','3600');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_html','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_html_tags','b,i,u,pre');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_bbcode','1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_smilies','1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig','1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_namechange','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_theme_create','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_local','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_remote','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_upload','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('override_user_style','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('posts_per_page','15');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('topics_per_page','50');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('hot_threshold','25');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_poll_options','10');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_sig_chars','255');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_inbox_privmsgs','50');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_sentbox_privmsgs','25');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_savebox_privmsgs','50');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_email_sig','Thanks, The Management');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_email','youraddress@yourdomain.com');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_confirm', '0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_delivery','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_host','');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_username','');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_password','');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('sendmail_fix','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('require_activation','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('flood_interval','15');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_email_form','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_filesize','6144');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_max_width','80');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_max_height','80');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_path','images/avatars');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_gallery_path','images/avatars/gallery');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smilies_path','images/smiles');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('default_style','1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('default_dateformat','D M d, Y g:i a');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_timezone','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('prune_enable','1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('privmsg_disable','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('gzip_compress','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('coppa_fax', '');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('coppa_mail', '');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('record_online_users', '0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('record_online_date', '0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_name', 'www.yourdomain.tld');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_port', '80');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', '/phpBB2/');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '.0.13');
|
||||
|
||||
/*
|
||||
-- Categories
|
||||
*/
|
||||
SET IDENTITY_INSERT phpbb_categories ON;
|
||||
|
||||
INSERT INTO phpbb_categories (cat_id, cat_title, cat_order) VALUES (1, 'Test category 1', 1);
|
||||
|
||||
SET IDENTITY_INSERT phpbb_categories OFF;
|
||||
|
||||
|
||||
/*
|
||||
-- Forums
|
||||
*/
|
||||
INSERT INTO phpbb_forums (forum_id, cat_id, forum_name, forum_desc, forum_status, forum_order, forum_posts, forum_topics, forum_last_post_id, prune_next, prune_enable, auth_view, auth_read, auth_post, auth_reply, auth_edit, auth_delete, auth_announce, auth_sticky, auth_pollcreate, auth_vote, auth_attachments) VALUES (1, 1, 'Test Forum 1', 'This is just a test forum, nothing special here.', '', 1, 1, 1, 1, '', 1, '', '', '', '', 1, 1, 3, 3, 1, 1, 3);
|
||||
|
||||
/*
|
||||
-- Users
|
||||
Default Admin --> username: admin
|
||||
password: admin (change this or remove it once everything is working!)
|
||||
*/
|
||||
INSERT INTO phpbb_users (user_id, username, user_level, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_viewemail, user_style, user_aim, user_yim, user_msnm, user_posts, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_pm, user_notify_pm, user_allow_viewonline, user_rank, user_avatar, user_lang, user_timezone, user_dateformat, user_actkey, user_newpasswd, user_notify, user_active) VALUES ( -1, 'Anonymous', 0, 0, '', '', '', '', '', '', '', '', 0, NULL, '', '', '', 0, 0, 1, 0, 1, 0, 1, 1, NULL, '', '', 0, '', '', '', 0, 0);
|
||||
INSERT INTO phpbb_users (user_id, username, user_level, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_viewemail, user_style, user_aim, user_yim, user_msnm, user_posts, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_pm, user_notify_pm, user_popup_pm, user_allow_viewonline, user_rank, user_avatar, user_lang, user_timezone, user_dateformat, user_actkey, user_newpasswd, user_notify, user_active) VALUES ( 2, 'Admin', 1, 0, '21232f297a57a5a743894a0e4a801fc3', 'admin@yourdomain.com', '', '', '', '', '', '', 1, 1, '', '', '', 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, '', 'english', 0, 'd M Y h:i a', '', '', 0, 1);
|
||||
|
||||
|
||||
/*
|
||||
-- Ranks
|
||||
*/
|
||||
SET IDENTITY_INSERT phpbb_ranks ON;
|
||||
|
||||
INSERT INTO phpbb_ranks (rank_id, rank_title, rank_min, rank_special, rank_image) VALUES (1, 'Site Admin', -1, 1, '');
|
||||
|
||||
SET IDENTITY_INSERT phpbb_ranks OFF;
|
||||
|
||||
|
||||
/*
|
||||
-- Groups
|
||||
*/
|
||||
SET IDENTITY_INSERT phpbb_groups ON;
|
||||
|
||||
INSERT INTO phpbb_groups (group_id, group_type, group_name, group_description, group_moderator, group_single_user) VALUES (1, 1, 'Anonymous', 'Personal User', '', 1);
|
||||
INSERT INTO phpbb_groups (group_id, group_type, group_name, group_description, group_moderator, group_single_user) VALUES (2, 1, 'Admin', 'Personal User', '', 1);
|
||||
|
||||
SET IDENTITY_INSERT phpbb_groups OFF;
|
||||
|
||||
/*
|
||||
-- User -> Group
|
||||
*/
|
||||
INSERT INTO phpbb_user_group (group_id, user_id, user_pending) VALUES (1, -1, '');
|
||||
INSERT INTO phpbb_user_group (group_id, user_id, user_pending) VALUES (2, 2, '');
|
||||
|
||||
|
||||
/*
|
||||
-- Demo Topic
|
||||
*/
|
||||
SET IDENTITY_INSERT phpbb_topics ON;
|
||||
|
||||
INSERT INTO phpbb_topics (topic_id, topic_title, topic_poster, topic_time, topic_views, topic_replies, forum_id, topic_status, topic_type, topic_vote, topic_first_post_id, topic_last_post_id, topic_moved_id) VALUES (1, 'Welcome to phpBB 2', 2, '972086460', 0, 0, 1, 0, 0, 0, 1, 1, '');
|
||||
|
||||
SET IDENTITY_INSERT phpbb_topics OFF;
|
||||
|
||||
|
||||
/*
|
||||
-- Demo Post
|
||||
*/
|
||||
SET IDENTITY_INSERT phpbb_posts ON;
|
||||
|
||||
INSERT INTO phpbb_posts (post_id, topic_id, forum_id, poster_id, post_time, post_username, poster_ip) VALUES (1, 1, 1, 2, 972086460, NULL, '7F000001');
|
||||
INSERT INTO phpbb_posts_text (post_id, post_subject, post_text) VALUES (1, NULL, 'This is an example post in your phpBB 2 installation. You may delete this post, this topic and even this forum if you like since everything seems to be working!');
|
||||
|
||||
SET IDENTITY_INSERT phpbb_posts OFF;
|
||||
|
||||
|
||||
/*
|
||||
-- Themes
|
||||
*/
|
||||
SET IDENTITY_INSERT phpbb_themes ON;
|
||||
|
||||
INSERT INTO phpbb_themes (themes_id, template_name, style_name, head_stylesheet, body_background, body_bgcolor, body_text, body_link, body_vlink, body_alink, body_hlink, tr_color1, tr_color2, tr_color3, tr_class1, tr_class2, tr_class3, th_color1, th_color2, th_color3, th_class1, th_class2, th_class3, td_color1, td_color2, td_color3, td_class1, td_class2, td_class3, fontface1, fontface2, fontface3, fontsize1, fontsize2, fontsize3, fontcolor1, fontcolor2, fontcolor3, span_class1, span_class2, span_class3) VALUES (1, 'subSilver', 'subSilver', 'subSilver.css', '', 'E5E5E5', '000000', '006699', '5493B4', '', 'DD6900', 'EFEFEF', 'DEE3E7', 'D1D7DC', '', '', '', '98AAB1', '006699', 'FFFFFF', 'cellpic1.gif', 'cellpic3.gif', 'cellpic2.jpg', 'FAFAFA', 'FFFFFF', '', 'row1', 'row2', '', 'Verdana, Arial, Helvetica, sans-serif', 'Trebuchet MS', 'Courier, ''Courier New'', sans-serif', 10, 11, 12, '444444', '006600', 'FFA34F', '', '', '');
|
||||
|
||||
SET IDENTITY_INSERT phpbb_themes OFF;
|
||||
|
||||
INSERT INTO phpbb_themes_name (themes_id, tr_color1_name, tr_color2_name, tr_color3_name, tr_class1_name, tr_class2_name, tr_class3_name, th_color1_name, th_color2_name, th_color3_name, th_class1_name, th_class2_name, th_class3_name, td_color1_name, td_color2_name, td_color3_name, td_class1_name, td_class2_name, td_class3_name, fontface1_name, fontface2_name, fontface3_name, fontsize1_name, fontsize2_name, fontsize3_name, fontcolor1_name, fontcolor2_name, fontcolor3_name, span_class1_name, span_class2_name, span_class3_name) VALUES (1, 'The lightest row colour', 'The medium row color', 'The darkest row colour', '', '', '', 'Border round the whole page', 'Outer table border', 'Inner table border', 'Silver gradient picture', 'Blue gradient picture', 'Fade-out gradient on index', 'Background for quote boxes', 'All white areas', '', 'Background for topic posts', '2nd background for topic posts', '', 'Main fonts', 'Additional topic title font', 'Form fonts', 'Smallest font size', 'Medium font size', 'Normal font size (post body etc)', 'Quote & copyright text', 'Code text colour', 'Main table header text colour', '', '', '');
|
||||
|
||||
|
||||
/*
|
||||
-- Smilies
|
||||
*/
|
||||
SET IDENTITY_INSERT phpbb_smilies ON;
|
||||
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 1, ':D', 'icon_biggrin.gif', 'Very Happy');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 2, ':-D', 'icon_biggrin.gif', 'Very Happy');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 3, ':grin:', 'icon_biggrin.gif', 'Very Happy');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 4, ':)', 'icon_smile.gif', 'Smile');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 5, ':-)', 'icon_smile.gif', 'Smile');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 6, ':smile:', 'icon_smile.gif', 'Smile');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 7, ':(', 'icon_sad.gif', 'Sad');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 8, ':-(', 'icon_sad.gif', 'Sad');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 9, ':sad:', 'icon_sad.gif', 'Sad');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 10, ':o', 'icon_surprised.gif', 'Surprised');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 11, ':-o', 'icon_surprised.gif', 'Surprised');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 12, ':eek:', 'icon_surprised.gif', 'Surprised');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 13, ':shock:', 'icon_eek.gif', 'Shocked');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 14, ':?', 'icon_confused.gif', 'Confused');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 15, ':-?', 'icon_confused.gif', 'Confused');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 16, ':???:', 'icon_confused.gif', 'Confused');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 17, '8)', 'icon_cool.gif', 'Cool');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 18, '8-)', 'icon_cool.gif', 'Cool');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 19, ':cool:', 'icon_cool.gif', 'Cool');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 20, ':lol:', 'icon_lol.gif', 'Laughing');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 21, ':x', 'icon_mad.gif', 'Mad');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 22, ':-x', 'icon_mad.gif', 'Mad');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 23, ':mad:', 'icon_mad.gif', 'Mad');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 24, ':P', 'icon_razz.gif', 'Razz');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 25, ':-P', 'icon_razz.gif', 'Razz');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 26, ':razz:', 'icon_razz.gif', 'Razz');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 27, ':oops:', 'icon_redface.gif', 'Embarassed');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 28, ':cry:', 'icon_cry.gif', 'Crying or Very sad');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 29, ':evil:', 'icon_evil.gif', 'Evil or Very Mad');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 30, ':twisted:', 'icon_twisted.gif', 'Twisted Evil');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 31, ':roll:', 'icon_rolleyes.gif', 'Rolling Eyes');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 32, ':wink:', 'icon_wink.gif', 'Wink');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 33, ';)', 'icon_wink.gif', 'Wink');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 34, ';-)', 'icon_wink.gif', 'Wink');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 35, ':!:', 'icon_exclaim.gif', 'Exclamation');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 36, ':?:', 'icon_question.gif', 'Question');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 37, ':idea:', 'icon_idea.gif', 'Idea');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 38, ':arrow:', 'icon_arrow.gif', 'Arrow');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 39, ':|', 'icon_neutral.gif', 'Neutral');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 40, ':-|', 'icon_neutral.gif', 'Neutral');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 41, ':neutral:', 'icon_neutral.gif', 'Neutral');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 42, ':mrgreen:', 'icon_mrgreen.gif', 'Mr. Green');
|
||||
|
||||
SET IDENTITY_INSERT phpbb_smilies OFF;
|
||||
|
||||
|
||||
/*
|
||||
-- Search Words
|
||||
*/
|
||||
SET IDENTITY_INSERT phpbb_search_wordlist ON;
|
||||
|
||||
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 1, 'example', 0 );
|
||||
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 2, 'post', 0 );
|
||||
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 3, 'phpbb', 0 );
|
||||
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 4, 'installation', 0 );
|
||||
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 5, 'delete', 0 );
|
||||
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 6, 'topic', 0 );
|
||||
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 7, 'forum', 0 );
|
||||
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 8, 'since', 0 );
|
||||
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 9, 'everything', 0 );
|
||||
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 10, 'seems', 0 );
|
||||
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 11, 'working', 0 );
|
||||
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 12, 'welcome', 0 );
|
||||
|
||||
SET IDENTITY_INSERT phpbb_search_wordlist OFF;
|
||||
|
||||
|
||||
/*
|
||||
-- Search Word Matches
|
||||
*/
|
||||
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 1, 1, 0 );
|
||||
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 2, 1, 0 );
|
||||
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 3, 1, 0 );
|
||||
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 4, 1, 0 );
|
||||
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 5, 1, 0 );
|
||||
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 6, 1, 0 );
|
||||
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 7, 1, 0 );
|
||||
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 8, 1, 0 );
|
||||
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 9, 1, 0 );
|
||||
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 10, 1, 0 );
|
||||
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 11, 1, 0 );
|
||||
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 12, 1, 1 );
|
||||
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 3, 1, 1 );
|
||||
|
||||
COMMIT;
|
697
phpBB/install/schemas/mssql_schema.sql
Normal file
697
phpBB/install/schemas/mssql_schema.sql
Normal file
@@ -0,0 +1,697 @@
|
||||
/*
|
||||
|
||||
mssql_schema.sql for phpBB2 (c) 2001, phpBB Group
|
||||
|
||||
$Id$
|
||||
|
||||
*/
|
||||
|
||||
BEGIN TRANSACTION
|
||||
GO
|
||||
|
||||
CREATE TABLE [phpbb_auth_access] (
|
||||
[group_id] [int] NULL ,
|
||||
[forum_id] [int] NULL ,
|
||||
[auth_view] [smallint] NOT NULL ,
|
||||
[auth_read] [smallint] NOT NULL ,
|
||||
[auth_post] [smallint] NOT NULL ,
|
||||
[auth_reply] [smallint] NOT NULL ,
|
||||
[auth_edit] [smallint] NOT NULL ,
|
||||
[auth_delete] [smallint] NOT NULL ,
|
||||
[auth_sticky] [smallint] NOT NULL ,
|
||||
[auth_announce] [smallint] NOT NULL ,
|
||||
[auth_vote] [smallint] NOT NULL ,
|
||||
[auth_pollcreate] [smallint] NOT NULL ,
|
||||
[auth_attachments] [smallint] NOT NULL ,
|
||||
[auth_mod] [smallint] NOT NULL
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE TABLE [phpbb_banlist] (
|
||||
[ban_id] [int] IDENTITY (1, 1) NOT NULL ,
|
||||
[ban_userid] [int] NULL ,
|
||||
[ban_ip] [char] (8) NULL ,
|
||||
[ban_email] [varchar] (50) NULL
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE TABLE [phpbb_categories] (
|
||||
[cat_id] [int] IDENTITY (1, 1) NOT NULL ,
|
||||
[cat_title] [varchar] (50) NOT NULL ,
|
||||
[cat_order] [int] NOT NULL
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE TABLE [phpbb_config] (
|
||||
[config_name] [varchar] (255) NULL ,
|
||||
[config_value] [varchar] (255) NULL
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
|
||||
CREATE TABLE [phpbb_confirm] (
|
||||
[confirm_id] [char] (32) NOT NULL ,
|
||||
[session_id] [char] (32) NOT NULL ,
|
||||
[code] [char] (6) NOT NULL
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE TABLE [phpbb_disallow] (
|
||||
[disallow_id] [int] IDENTITY (1, 1) NOT NULL ,
|
||||
[disallow_username] [varchar] (100) NULL
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE TABLE [phpbb_forum_prune] (
|
||||
[prune_id] [int] IDENTITY (1, 1) NOT NULL ,
|
||||
[forum_id] [int] NOT NULL ,
|
||||
[prune_days] [int] NOT NULL ,
|
||||
[prune_freq] [int] NOT NULL
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE TABLE [phpbb_forums] (
|
||||
[forum_id] [int] NOT NULL ,
|
||||
[cat_id] [int] NOT NULL ,
|
||||
[forum_name] [varchar] (100) NOT NULL ,
|
||||
[forum_desc] [varchar] (255) NULL ,
|
||||
[forum_status] [smallint] NOT NULL ,
|
||||
[forum_order] [int] NOT NULL ,
|
||||
[forum_posts] [int] NOT NULL ,
|
||||
[forum_topics] [smallint] NOT NULL ,
|
||||
[forum_last_post_id] [int] NOT NULL ,
|
||||
[prune_next] [int] NULL ,
|
||||
[prune_enable] [smallint] NOT NULL ,
|
||||
[auth_view] [smallint] NOT NULL ,
|
||||
[auth_read] [smallint] NOT NULL ,
|
||||
[auth_post] [smallint] NOT NULL ,
|
||||
[auth_reply] [smallint] NOT NULL ,
|
||||
[auth_edit] [smallint] NOT NULL ,
|
||||
[auth_delete] [smallint] NOT NULL ,
|
||||
[auth_sticky] [smallint] NOT NULL ,
|
||||
[auth_announce] [smallint] NOT NULL ,
|
||||
[auth_vote] [smallint] NOT NULL ,
|
||||
[auth_pollcreate] [smallint] NOT NULL ,
|
||||
[auth_attachments] [smallint] NOT NULL
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE TABLE [phpbb_groups] (
|
||||
[group_id] [int] IDENTITY (1, 1) NOT NULL ,
|
||||
[group_type] [smallint] NULL ,
|
||||
[group_name] [varchar] (50) NOT NULL ,
|
||||
[group_description] [varchar] (255) NOT NULL ,
|
||||
[group_moderator] [int] NULL ,
|
||||
[group_single_user] [smallint] NOT NULL
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE TABLE [phpbb_posts] (
|
||||
[post_id] [int] IDENTITY (1, 1) NOT NULL ,
|
||||
[topic_id] [int] NOT NULL ,
|
||||
[forum_id] [int] NOT NULL ,
|
||||
[poster_id] [int] NOT NULL ,
|
||||
[post_time] [int] NOT NULL ,
|
||||
[poster_ip] [char] (8) NULL ,
|
||||
[post_username] [char] (25) NULL ,
|
||||
[enable_bbcode] [smallint] NULL ,
|
||||
[enable_html] [smallint] NULL ,
|
||||
[enable_smilies] [smallint] NULL ,
|
||||
[enable_sig] [smallint] NULL ,
|
||||
[post_edit_time] [int] NULL ,
|
||||
[post_edit_count] [smallint] NULL
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE TABLE [phpbb_posts_text] (
|
||||
[post_id] [int] NOT NULL ,
|
||||
[bbcode_uid] [char] (10) NULL ,
|
||||
[post_subject] [char] (60) NULL ,
|
||||
[post_text] [text] NULL
|
||||
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE TABLE [phpbb_privmsgs] (
|
||||
[privmsgs_id] [int] IDENTITY (1, 1) NOT NULL ,
|
||||
[privmsgs_type] [smallint] NOT NULL ,
|
||||
[privmsgs_subject] [varchar] (100) NOT NULL ,
|
||||
[privmsgs_from_userid] [int] NOT NULL ,
|
||||
[privmsgs_to_userid] [int] NOT NULL ,
|
||||
[privmsgs_date] [int] NOT NULL ,
|
||||
[privmsgs_ip] [char] (8) NOT NULL ,
|
||||
[privmsgs_enable_bbcode] [smallint] NULL ,
|
||||
[privmsgs_enable_html] [smallint] NULL ,
|
||||
[privmsgs_enable_smilies] [smallint] NULL ,
|
||||
[privmsgs_attach_sig] [smallint] NULL
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE TABLE [phpbb_privmsgs_text] (
|
||||
[privmsgs_text_id] [int] NOT NULL ,
|
||||
[privmsgs_bbcode_uid] [char] (10) NULL ,
|
||||
[privmsgs_text] [text] NULL
|
||||
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE TABLE [phpbb_ranks] (
|
||||
[rank_id] [int] IDENTITY (1, 1) NOT NULL ,
|
||||
[rank_title] [varchar] (50) NOT NULL ,
|
||||
[rank_min] [int] NULL ,
|
||||
[rank_special] [smallint] NULL ,
|
||||
[rank_image] [varchar] (50) NULL
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE TABLE [phpbb_search_results] (
|
||||
[search_id] [int] NOT NULL ,
|
||||
[session_id] [char] (32) NOT NULL ,
|
||||
[search_array] [text] NOT NULL
|
||||
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE TABLE [phpbb_search_wordlist] (
|
||||
[word_id] [int] IDENTITY (1, 1) NOT NULL ,
|
||||
[word_text] [varchar] (50) NOT NULL ,
|
||||
[word_common] [tinyint] NOT NULL
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE TABLE [phpbb_search_wordmatch] (
|
||||
[post_id] [int] NOT NULL ,
|
||||
[word_id] [int] NOT NULL ,
|
||||
[title_match] [smallint] NOT NULL
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE TABLE [phpbb_sessions] (
|
||||
[session_id] [char] (32) NOT NULL ,
|
||||
[session_user_id] [int] NOT NULL ,
|
||||
[session_start] [int] NULL ,
|
||||
[session_time] [int] NULL ,
|
||||
[session_ip] [char] (8) NOT NULL ,
|
||||
[session_page] [int] NULL ,
|
||||
[session_logged_in] [smallint] NULL
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE TABLE [phpbb_smilies] (
|
||||
[smilies_id] [int] IDENTITY (1, 1) NOT NULL ,
|
||||
[code] [varchar] (10) NOT NULL ,
|
||||
[smile_url] [varchar] (50) NOT NULL ,
|
||||
[emoticon] [varchar] (50) NULL
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE TABLE [phpbb_themes] (
|
||||
[themes_id] [int] IDENTITY (1, 1) NOT NULL ,
|
||||
[template_name] [varchar] (30) NOT NULL ,
|
||||
[style_name] [varchar] (50) NOT NULL ,
|
||||
[head_stylesheet] [varchar] (50) NULL ,
|
||||
[body_background] [varchar] (50) NULL ,
|
||||
[body_bgcolor] [char] (6) NULL ,
|
||||
[body_text] [char] (6) NULL ,
|
||||
[body_link] [char] (6) NULL ,
|
||||
[body_vlink] [char] (6) NULL ,
|
||||
[body_alink] [char] (6) NULL ,
|
||||
[body_hlink] [char] (6) NULL ,
|
||||
[tr_color1] [char] (6) NULL ,
|
||||
[tr_color2] [char] (6) NULL ,
|
||||
[tr_color3] [char] (6) NULL ,
|
||||
[tr_class1] [varchar] (25) NULL ,
|
||||
[tr_class2] [varchar] (25) NULL ,
|
||||
[tr_class3] [varchar] (25) NULL ,
|
||||
[th_color1] [char] (6) NULL ,
|
||||
[th_color2] [char] (6) NULL ,
|
||||
[th_color3] [char] (6) NULL ,
|
||||
[th_class1] [varchar] (25) NULL ,
|
||||
[th_class2] [varchar] (25) NULL ,
|
||||
[th_class3] [varchar] (25) NULL ,
|
||||
[td_color1] [char] (6) NULL ,
|
||||
[td_color2] [char] (6) NULL ,
|
||||
[td_color3] [char] (6) NULL ,
|
||||
[td_class1] [varchar] (25) NULL ,
|
||||
[td_class2] [varchar] (25) NULL ,
|
||||
[td_class3] [varchar] (25) NULL ,
|
||||
[fontface1] [varchar] (50) NULL ,
|
||||
[fontface2] [varchar] (50) NULL ,
|
||||
[fontface3] [varchar] (50) NULL ,
|
||||
[fontsize1] [smallint] NULL ,
|
||||
[fontsize2] [smallint] NULL ,
|
||||
[fontsize3] [smallint] NULL ,
|
||||
[fontcolor1] [char] (6) NULL ,
|
||||
[fontcolor2] [char] (6) NULL ,
|
||||
[fontcolor3] [char] (6) NULL ,
|
||||
[span_class1] [varchar] (25) NULL ,
|
||||
[span_class2] [varchar] (25) NULL ,
|
||||
[span_class3] [varchar] (25) NULL ,
|
||||
[img_size_poll] [smallint] NULL ,
|
||||
[img_size_privmsg] [smallint] NULL
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE TABLE [phpbb_themes_name] (
|
||||
[themes_id] [int] NOT NULL ,
|
||||
[tr_color1_name] [varchar] (50) NULL ,
|
||||
[tr_color2_name] [varchar] (50) NULL ,
|
||||
[tr_color3_name] [varchar] (50) NULL ,
|
||||
[tr_class1_name] [varchar] (50) NULL ,
|
||||
[tr_class2_name] [varchar] (50) NULL ,
|
||||
[tr_class3_name] [varchar] (50) NULL ,
|
||||
[th_color1_name] [varchar] (50) NULL ,
|
||||
[th_color2_name] [varchar] (50) NULL ,
|
||||
[th_color3_name] [varchar] (50) NULL ,
|
||||
[th_class1_name] [varchar] (50) NULL ,
|
||||
[th_class2_name] [varchar] (50) NULL ,
|
||||
[th_class3_name] [varchar] (50) NULL ,
|
||||
[td_color1_name] [varchar] (50) NULL ,
|
||||
[td_color2_name] [varchar] (50) NULL ,
|
||||
[td_color3_name] [varchar] (50) NULL ,
|
||||
[td_class1_name] [varchar] (50) NULL ,
|
||||
[td_class2_name] [varchar] (50) NULL ,
|
||||
[td_class3_name] [varchar] (50) NULL ,
|
||||
[fontface1_name] [varchar] (50) NULL ,
|
||||
[fontface2_name] [varchar] (50) NULL ,
|
||||
[fontface3_name] [varchar] (50) NULL ,
|
||||
[fontsize1_name] [varchar] (50) NULL ,
|
||||
[fontsize2_name] [varchar] (50) NULL ,
|
||||
[fontsize3_name] [varchar] (50) NULL ,
|
||||
[fontcolor1_name] [varchar] (50) NULL ,
|
||||
[fontcolor2_name] [varchar] (50) NULL ,
|
||||
[fontcolor3_name] [varchar] (50) NULL ,
|
||||
[span_class1_name] [varchar] (50) NULL ,
|
||||
[span_class2_name] [varchar] (50) NULL ,
|
||||
[span_class3_name] [varchar] (50) NULL
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE TABLE [phpbb_topics] (
|
||||
[topic_id] [int] IDENTITY (1, 1) NOT NULL ,
|
||||
[forum_id] [int] NOT NULL ,
|
||||
[topic_title] [varchar] (60) NOT NULL ,
|
||||
[topic_poster] [int] NOT NULL ,
|
||||
[topic_time] [int] NOT NULL ,
|
||||
[topic_views] [int] NOT NULL ,
|
||||
[topic_replies] [int] NOT NULL ,
|
||||
[topic_status] [smallint] NOT NULL ,
|
||||
[topic_type] [smallint] NOT NULL ,
|
||||
[topic_vote] [smallint] NOT NULL ,
|
||||
[topic_first_post_id] [int] NULL ,
|
||||
[topic_last_post_id] [int] NULL ,
|
||||
[topic_moved_id] [int] NULL
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE TABLE [phpbb_topics_watch] (
|
||||
[topic_id] [int] NOT NULL ,
|
||||
[user_id] [int] NOT NULL ,
|
||||
[notify_status] [smallint] NOT NULL
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE TABLE [phpbb_user_group] (
|
||||
[group_id] [int] NOT NULL ,
|
||||
[user_id] [int] NOT NULL ,
|
||||
[user_pending] [smallint] NULL
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE TABLE [phpbb_users] (
|
||||
[user_id] [int] NOT NULL ,
|
||||
[user_active] [smallint] NULL ,
|
||||
[username] [varchar] (25) NOT NULL ,
|
||||
[user_password] [varchar] (32) NOT NULL ,
|
||||
[user_session_time] [int] NOT NULL ,
|
||||
[user_session_page] [smallint] NOT NULL ,
|
||||
[user_lastvisit] [int] NOT NULL ,
|
||||
[user_regdate] [int] NOT NULL ,
|
||||
[user_level] [smallint] NOT NULL ,
|
||||
[user_posts] [int] NOT NULL ,
|
||||
[user_timezone] [decimal] (5,2) NOT NULL ,
|
||||
[user_style] [int] NULL ,
|
||||
[user_lang] [varchar] (255) NULL ,
|
||||
[user_dateformat] [varchar] (14) NOT NULL ,
|
||||
[user_new_privmsg] [smallint] NOT NULL ,
|
||||
[user_unread_privmsg] [smallint] NOT NULL ,
|
||||
[user_last_privmsg] [int] NOT NULL ,
|
||||
[user_emailtime] [int] NOT NULL ,
|
||||
[user_viewemail] [smallint] NULL ,
|
||||
[user_attachsig] [smallint] NULL ,
|
||||
[user_allowhtml] [smallint] NULL ,
|
||||
[user_allowbbcode] [smallint] NULL ,
|
||||
[user_allowsmile] [smallint] NULL ,
|
||||
[user_allowavatar] [smallint] NULL ,
|
||||
[user_allow_pm] [smallint] NOT NULL ,
|
||||
[user_allow_viewonline] [smallint] NOT NULL ,
|
||||
[user_notify_pm] [smallint] NOT NULL ,
|
||||
[user_popup_pm] [smallint] NULL ,
|
||||
[user_rank] [int] NULL ,
|
||||
[user_avatar_type] [smallint] NULL ,
|
||||
[user_avatar] [varchar] (100) NULL ,
|
||||
[user_email] [varchar] (255) NULL ,
|
||||
[user_icq] [varchar] (15) NULL ,
|
||||
[user_website] [varchar] (100) NULL ,
|
||||
[user_occ] [varchar] (100) NULL ,
|
||||
[user_from] [varchar] (100) NULL ,
|
||||
[user_sig] [text] NULL ,
|
||||
[user_sig_bbcode_uid] [char] (10) NULL ,
|
||||
[user_aim] [varchar] (255) NULL ,
|
||||
[user_yim] [varchar] (255) NULL ,
|
||||
[user_msnm] [varchar] (255) NULL ,
|
||||
[user_interests] [varchar] (255) NULL ,
|
||||
[user_actkey] [varchar] (32) NULL ,
|
||||
[user_newpasswd] [varchar] (32) NULL ,
|
||||
[user_notify] [smallint] NOT NULL
|
||||
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE TABLE [phpbb_vote_desc] (
|
||||
[vote_id] [int] IDENTITY (1, 1) NOT NULL ,
|
||||
[topic_id] [int] NOT NULL ,
|
||||
[vote_text] [varchar] (255) NOT NULL ,
|
||||
[vote_start] [int] NOT NULL ,
|
||||
[vote_length] [int] NOT NULL
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE TABLE [phpbb_vote_results] (
|
||||
[vote_id] [int] NOT NULL ,
|
||||
[vote_option_id] [int] NOT NULL ,
|
||||
[vote_option_text] [varchar] (255) NOT NULL ,
|
||||
[vote_result] [int] NOT NULL
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE TABLE [phpbb_vote_voters] (
|
||||
[vote_id] [int] NOT NULL ,
|
||||
[vote_user_id] [int] NOT NULL ,
|
||||
[vote_user_ip] [char] (8) NOT NULL
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE TABLE [phpbb_words] (
|
||||
[word_id] [int] IDENTITY (1, 1) NOT NULL ,
|
||||
[word] [varchar] (255) NOT NULL ,
|
||||
[replacement] [varchar] (255) NOT NULL
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
ALTER TABLE [phpbb_banlist] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_phpbb_banlist] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[ban_id]
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
ALTER TABLE [phpbb_categories] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_phpbb_categories] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[cat_id]
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
ALTER TABLE [phpbb_confirm] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_phpbb_confirm] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[session_id],[confirm_id]
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
ALTER TABLE [phpbb_disallow] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_phpbb_disallow] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[disallow_id]
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
ALTER TABLE [phpbb_forum_prune] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_phpbb_forum_prune] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[prune_id]
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
ALTER TABLE [phpbb_forums] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_phpbb_forums] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[forum_id]
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
ALTER TABLE [phpbb_groups] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_phpbb_groups] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[group_id]
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
ALTER TABLE [phpbb_posts] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_phpbb_posts] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[post_id]
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
ALTER TABLE [phpbb_privmsgs] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_phpbb_privmsgs] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[privmsgs_id]
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
ALTER TABLE [phpbb_privmsgs_text] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_phpbb_privmsgs_text] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[privmsgs_text_id]
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
ALTER TABLE [phpbb_ranks] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_phpbb_ranks] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[rank_id]
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
ALTER TABLE [phpbb_search_results] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_phpbb_search_results] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[search_id]
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
ALTER TABLE [phpbb_search_wordlist] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_phpbb_search_wordlist] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[word_id]
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
ALTER TABLE [phpbb_smilies] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_phpbb_smilies] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[smilies_id]
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
ALTER TABLE [phpbb_themes] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_phpbb_themes] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[themes_id]
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
ALTER TABLE [phpbb_themes_name] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_phpbb_themes_name] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[themes_id]
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
ALTER TABLE [phpbb_topics] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_phpbb_topics] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[topic_id]
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
ALTER TABLE [phpbb_users] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_phpbb_users] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[user_id]
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
ALTER TABLE [phpbb_vote_desc] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_phpbb_vote_desc] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[vote_id]
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
ALTER TABLE [phpbb_words] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_phpbb_words] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[word_id]
|
||||
) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
ALTER TABLE [phpbb_auth_access] WITH NOCHECK ADD
|
||||
CONSTRAINT [DF_phpbb_auth_access_auth_view] DEFAULT (0) FOR [auth_view],
|
||||
CONSTRAINT [DF_phpbb_auth_access_auth_read] DEFAULT (0) FOR [auth_read],
|
||||
CONSTRAINT [DF_phpbb_auth_access_auth_post] DEFAULT (0) FOR [auth_post],
|
||||
CONSTRAINT [DF_phpbb_auth_access_auth_reply] DEFAULT (0) FOR [auth_reply],
|
||||
CONSTRAINT [DF_phpbb_auth_access_auth_edit] DEFAULT (0) FOR [auth_edit],
|
||||
CONSTRAINT [DF_phpbb_auth_access_auth_delete] DEFAULT (0) FOR [auth_delete],
|
||||
CONSTRAINT [DF_phpbb_auth_access_auth_sticky] DEFAULT (0) FOR [auth_sticky],
|
||||
CONSTRAINT [DF_phpbb_auth_access_auth_announce] DEFAULT (0) FOR [auth_announce],
|
||||
CONSTRAINT [DF_phpbb_auth_access_auth_vote] DEFAULT (0) FOR [auth_vote],
|
||||
CONSTRAINT [DF_phpbb_auth_access_auth_pollcreate] DEFAULT (0) FOR [auth_pollcreate],
|
||||
CONSTRAINT [DF_phpbb_auth_access_auth_attachments] DEFAULT (0) FOR [auth_attachments],
|
||||
CONSTRAINT [DF_phpbb_auth_access_auth_mod] DEFAULT (0) FOR [auth_mod]
|
||||
GO
|
||||
|
||||
ALTER TABLE [phpbb_forums] WITH NOCHECK ADD
|
||||
CONSTRAINT [DF_phpbb_forums_forum_posts] DEFAULT (0) FOR [forum_posts],
|
||||
CONSTRAINT [DF_phpbb_forums_forum_topics] DEFAULT (0) FOR [forum_topics],
|
||||
CONSTRAINT [DF_phpbb_forums_forum_last_post_id] DEFAULT (0) FOR [forum_last_post_id],
|
||||
CONSTRAINT [DF_phpbb_forums_prune_enable] DEFAULT (0) FOR [prune_enable],
|
||||
CONSTRAINT [DF_phpbb_forums_auth_view] DEFAULT (0) FOR [auth_view],
|
||||
CONSTRAINT [DF_phpbb_forums_auth_read] DEFAULT (0) FOR [auth_read],
|
||||
CONSTRAINT [DF_phpbb_forums_auth_post] DEFAULT (0) FOR [auth_post],
|
||||
CONSTRAINT [DF_phpbb_forums_auth_reply] DEFAULT (0) FOR [auth_reply],
|
||||
CONSTRAINT [DF_phpbb_forums_auth_edit] DEFAULT (0) FOR [auth_edit],
|
||||
CONSTRAINT [DF_phpbb_forums_auth_delete] DEFAULT (0) FOR [auth_delete],
|
||||
CONSTRAINT [DF_phpbb_forums_auth_sticky] DEFAULT (0) FOR [auth_sticky],
|
||||
CONSTRAINT [DF_phpbb_forums_auth_announce] DEFAULT (0) FOR [auth_announce],
|
||||
CONSTRAINT [DF_phpbb_forums_auth_vote] DEFAULT (0) FOR [auth_vote],
|
||||
CONSTRAINT [DF_phpbb_forums_auth_pollcreate] DEFAULT (0) FOR [auth_pollcreate],
|
||||
CONSTRAINT [DF_phpbb_forums_auth_attachments] DEFAULT (0) FOR [auth_attachments]
|
||||
GO
|
||||
|
||||
ALTER TABLE [phpbb_confirm] WITH NOCHECK ADD
|
||||
CONSTRAINT [DF_phpbb_confirm_confirm_id] DEFAULT ('') FOR [confirm_id],
|
||||
CONSTRAINT [DF_phpbb_confirm_session_id] DEFAULT ('') FOR [session_id],
|
||||
CONSTRAINT [DF_phpbb_confirm_code] DEFAULT ('') FOR [code]
|
||||
GO
|
||||
|
||||
ALTER TABLE [phpbb_posts] WITH NOCHECK ADD
|
||||
CONSTRAINT [DF_phpbb_posts_enable_bbcode] DEFAULT (1) FOR [enable_bbcode],
|
||||
CONSTRAINT [DF_phpbb_posts_enable_html] DEFAULT (0) FOR [enable_html],
|
||||
CONSTRAINT [DF_phpbb_posts_enable_smilies] DEFAULT (1) FOR [enable_smilies],
|
||||
CONSTRAINT [DF_phpbb_posts_enable_sig] DEFAULT (1) FOR [enable_sig],
|
||||
CONSTRAINT [DF_phpbb_posts_post_edit_count] DEFAULT (0) FOR [post_edit_count]
|
||||
GO
|
||||
|
||||
ALTER TABLE [phpbb_search_wordlist] WITH NOCHECK ADD
|
||||
CONSTRAINT [DF_phpbb_search_wordlist_word_common] DEFAULT (0) FOR [word_common]
|
||||
GO
|
||||
|
||||
ALTER TABLE [phpbb_topics] WITH NOCHECK ADD
|
||||
CONSTRAINT [DF_phpbb_topics_topic_views] DEFAULT (0) FOR [topic_views],
|
||||
CONSTRAINT [DF_phpbb_topics_topic_replies] DEFAULT (0) FOR [topic_replies],
|
||||
CONSTRAINT [DF_phpbb_topics_topic_status] DEFAULT (0) FOR [topic_status],
|
||||
CONSTRAINT [DF_phpbb_topics_topic_type] DEFAULT (0) FOR [topic_type],
|
||||
CONSTRAINT [DF_phpbb_topics_topic_vote] DEFAULT (0) FOR [topic_vote],
|
||||
CONSTRAINT [DF_phpbb_topics_topic_moved_id] DEFAULT (0) FOR topic_moved_id
|
||||
GO
|
||||
|
||||
ALTER TABLE [phpbb_users] WITH NOCHECK ADD
|
||||
CONSTRAINT [DF_phpbb_users_user_level] DEFAULT (0) FOR [user_level],
|
||||
CONSTRAINT [DF_phpbb_users_user_posts] DEFAULT (0) FOR [user_posts],
|
||||
CONSTRAINT [DF_phpbb_users_user_session_time] DEFAULT (0) FOR [user_session_time],
|
||||
CONSTRAINT [DF_phpbb_users_user_session_page] DEFAULT (0) FOR [user_session_page],
|
||||
CONSTRAINT [DF_phpbb_users_user_lastvisit] DEFAULT (0) FOR [user_lastvisit],
|
||||
CONSTRAINT [DF_phpbb_users_user_new_privmsg] DEFAULT (0) FOR [user_new_privmsg],
|
||||
CONSTRAINT [DF_phpbb_users_user_unread_privmsg] DEFAULT (0) FOR [user_unread_privmsg],
|
||||
CONSTRAINT [DF_phpbb_users_user_last_privmsg] DEFAULT (0) FOR [user_last_privmsg],
|
||||
CONSTRAINT [DF_phpbb_users_user_emailtime] DEFAULT (0) FOR [user_emailtime],
|
||||
CONSTRAINT [DF_phpbb_users_user_viewemail] DEFAULT (1) FOR [user_viewemail],
|
||||
CONSTRAINT [DF_phpbb_users_user_attachsig] DEFAULT (1) FOR [user_attachsig],
|
||||
CONSTRAINT [DF_phpbb_users_user_allowhtml] DEFAULT (0) FOR [user_allowhtml],
|
||||
CONSTRAINT [DF_phpbb_users_user_allowbbcode] DEFAULT (1) FOR [user_allowbbcode],
|
||||
CONSTRAINT [DF_phpbb_users_user_allowsmile] DEFAULT (1) FOR [user_allowsmile],
|
||||
CONSTRAINT [DF_phpbb_users_user_allowavatar] DEFAULT (1) FOR [user_allowavatar],
|
||||
CONSTRAINT [DF_phpbb_users_user_allow_pm] DEFAULT (1) FOR [user_allow_pm],
|
||||
CONSTRAINT [DF_phpbb_users_user_allow_viewonline] DEFAULT (1) FOR [user_allow_viewonline],
|
||||
CONSTRAINT [DF_phpbb_users_user_notify_pm] DEFAULT (0) FOR [user_notify_pm],
|
||||
CONSTRAINT [DF_phpbb_users_user_popup_pm] DEFAULT (1) FOR [user_popup_pm],
|
||||
CONSTRAINT [DF_phpbb_users_user_avatar_type] DEFAULT (0) FOR [user_avatar_type]
|
||||
GO
|
||||
|
||||
CREATE INDEX [IX_phpbb_auth_access] ON [phpbb_auth_access]([group_id], [forum_id]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [IX_phpbb_banlist] ON [phpbb_banlist]([ban_userid], [ban_ip]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [IX_phpbb_categories] ON [phpbb_categories]([cat_order]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [IX_phpbb_forum_prune] ON [phpbb_forum_prune]([forum_id]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [IX_phpbb_forums] ON [phpbb_forums]([cat_id], [forum_order], [forum_last_post_id]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [IX_phpbb_groups] ON [phpbb_groups]([group_single_user]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [IX_phpbb_posts] ON [phpbb_posts]([topic_id], [forum_id], [poster_id]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [IX_phpbb_posts_text] ON [phpbb_posts_text]([post_id]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [IX_phpbb_privmsgs] ON [phpbb_privmsgs]([privmsgs_from_userid], [privmsgs_to_userid]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [IX_phpbb_ranks] ON [phpbb_ranks]([rank_min], [rank_special]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [IX_phpbb_search_results] ON [phpbb_search_results]([session_id]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE UNIQUE INDEX [IX_phpbb_search_wordlist] ON [phpbb_search_wordlist]([word_text]) WITH IGNORE_DUP_KEY ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [IX_phpbb_search_wordlist_1] ON [phpbb_search_wordlist]([word_common]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [IX_phpbb_search_wordmatch] ON [phpbb_search_wordmatch]([post_id]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [IX_phpbb_search_wordmatch_1] ON [phpbb_search_wordmatch]([word_id]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [IX_phpbb_sessions] ON [phpbb_sessions]([session_id], [session_user_id], [session_ip], [session_logged_in]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [IX_phpbb_topics] ON [phpbb_topics]([forum_id], [topic_type], [topic_first_post_id], [topic_last_post_id]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [IX_phpbb_topics_watch] ON [phpbb_topics_watch]([topic_id], [user_id]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [IX_phpbb_users] ON [phpbb_users]([user_session_time]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [IX_phpbb_user_group] ON [phpbb_user_group]([group_id], [user_id]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [IX_phpbb_vote_desc] ON [phpbb_vote_desc]([topic_id]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [IX_phpbb_vote_results] ON [phpbb_vote_results]([vote_id]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [IX_phpbb_vote_results_1] ON [phpbb_vote_results]([vote_option_id]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [IX_phpbb_vote_voters] ON [phpbb_vote_voters]([vote_id]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
CREATE INDEX [IX_phpbb_vote_voters_1] ON [phpbb_vote_voters]([vote_user_id]) ON [PRIMARY]
|
||||
GO
|
||||
|
||||
COMMIT
|
||||
GO
|
185
phpBB/install/schemas/mysql_basic.sql
Normal file
185
phpBB/install/schemas/mysql_basic.sql
Normal file
@@ -0,0 +1,185 @@
|
||||
#
|
||||
# Basic DB data for phpBB2 devel
|
||||
#
|
||||
# $Id$
|
||||
|
||||
# -- Config
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('config_id','1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_disable','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('sitename','yourdomain.com');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('site_desc','A _little_ text to describe your forum');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_name','phpbb2mysql');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_path','/');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_domain','');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_secure','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('session_length','3600');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_html','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_html_tags','b,i,u,pre');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_bbcode','1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_smilies','1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig','1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_namechange','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_theme_create','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_local','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_remote','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_upload','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_confirm', '0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('override_user_style','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('posts_per_page','15');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('topics_per_page','50');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('hot_threshold','25');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_poll_options','10');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_sig_chars','255');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_inbox_privmsgs','50');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_sentbox_privmsgs','25');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_savebox_privmsgs','50');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_email_sig','Thanks, The Management');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_email','youraddress@yourdomain.com');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_delivery','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_host','');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_username','');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_password','');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('sendmail_fix','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('require_activation','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('flood_interval','15');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_email_form','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_filesize','6144');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_max_width','80');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_max_height','80');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_path','images/avatars');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_gallery_path','images/avatars/gallery');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smilies_path','images/smiles');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('default_style','1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('default_dateformat','D M d, Y g:i a');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_timezone','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('prune_enable','1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('privmsg_disable','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('gzip_compress','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('coppa_fax', '');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('coppa_mail', '');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('record_online_users', '0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('record_online_date', '0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_name', 'www.myserver.tld');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_port', '80');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', '/phpBB2/');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '.0.13');
|
||||
|
||||
|
||||
# -- Categories
|
||||
INSERT INTO phpbb_categories (cat_id, cat_title, cat_order) VALUES (1, 'Test category 1', 10);
|
||||
|
||||
|
||||
# -- Forums
|
||||
INSERT INTO phpbb_forums (forum_id, forum_name, forum_desc, cat_id, forum_order, forum_posts, forum_topics, forum_last_post_id, auth_view, auth_read, auth_post, auth_reply, auth_edit, auth_delete, auth_announce, auth_sticky, auth_pollcreate, auth_vote, auth_attachments) VALUES (1, 'Test Forum 1', 'This is just a test forum.', 1, 10, 1, 1, 1, 0, 0, 0, 0, 1, 1, 3, 3, 1, 1, 3);
|
||||
|
||||
|
||||
# -- Users
|
||||
INSERT INTO phpbb_users (user_id, username, user_level, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_viewemail, user_style, user_aim, user_yim, user_msnm, user_posts, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_pm, user_notify_pm, user_allow_viewonline, user_rank, user_avatar, user_lang, user_timezone, user_dateformat, user_actkey, user_newpasswd, user_notify, user_active) VALUES ( -1, 'Anonymous', 0, 0, '', '', '', '', '', '', '', '', 0, NULL, '', '', '', 0, 0, 1, 0, 1, 0, 1, 1, NULL, '', '', 0, '', '', '', 0, 0);
|
||||
|
||||
# -- username: admin password: admin (change this or remove it once everything is working!)
|
||||
INSERT INTO phpbb_users (user_id, username, user_level, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_viewemail, user_style, user_aim, user_yim, user_msnm, user_posts, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_pm, user_notify_pm, user_popup_pm, user_allow_viewonline, user_rank, user_avatar, user_lang, user_timezone, user_dateformat, user_actkey, user_newpasswd, user_notify, user_active) VALUES ( 2, 'Admin', 1, 0, '21232f297a57a5a743894a0e4a801fc3', 'admin@yourdomain.com', '', '', '', '', '', '', 1, 1, '', '', '', 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, '', 'english', 0, 'd M Y h:i a', '', '', 0, 1);
|
||||
|
||||
|
||||
# -- Ranks
|
||||
INSERT INTO phpbb_ranks (rank_id, rank_title, rank_min, rank_special, rank_image) VALUES ( 1, 'Site Admin', -1, 1, NULL);
|
||||
|
||||
|
||||
# -- Groups
|
||||
INSERT INTO phpbb_groups (group_id, group_name, group_description, group_single_user) VALUES (1, 'Anonymous', 'Personal User', 1);
|
||||
INSERT INTO phpbb_groups (group_id, group_name, group_description, group_single_user) VALUES (2, 'Admin', 'Personal User', 1);
|
||||
|
||||
|
||||
# -- User -> Group
|
||||
INSERT INTO phpbb_user_group (group_id, user_id, user_pending) VALUES (1, -1, 0);
|
||||
INSERT INTO phpbb_user_group (group_id, user_id, user_pending) VALUES (2, 2, 0);
|
||||
|
||||
|
||||
# -- Demo Topic
|
||||
INSERT INTO phpbb_topics (topic_id, topic_title, topic_poster, topic_time, topic_views, topic_replies, forum_id, topic_status, topic_type, topic_vote, topic_first_post_id, topic_last_post_id) VALUES (1, 'Welcome to phpBB 2', 2, '972086460', 0, 0, 1, 0, 0, 0, 1, 1);
|
||||
|
||||
|
||||
# -- Demo Post
|
||||
INSERT INTO phpbb_posts (post_id, topic_id, forum_id, poster_id, post_time, post_username, poster_ip) VALUES (1, 1, 1, 2, 972086460, NULL, '7F000001');
|
||||
INSERT INTO phpbb_posts_text (post_id, post_subject, post_text) VALUES (1, NULL, 'This is an example post in your phpBB 2 installation. You may delete this post, this topic and even this forum if you like since everything seems to be working!');
|
||||
|
||||
|
||||
# -- Themes
|
||||
INSERT INTO phpbb_themes (themes_id, template_name, style_name, head_stylesheet, body_background, body_bgcolor, body_text, body_link, body_vlink, body_alink, body_hlink, tr_color1, tr_color2, tr_color3, tr_class1, tr_class2, tr_class3, th_color1, th_color2, th_color3, th_class1, th_class2, th_class3, td_color1, td_color2, td_color3, td_class1, td_class2, td_class3, fontface1, fontface2, fontface3, fontsize1, fontsize2, fontsize3, fontcolor1, fontcolor2, fontcolor3, span_class1, span_class2, span_class3) VALUES (1, 'subSilver', 'subSilver', 'subSilver.css', '', 'E5E5E5', '000000', '006699', '5493B4', '', 'DD6900', 'EFEFEF', 'DEE3E7', 'D1D7DC', '', '', '', '98AAB1', '006699', 'FFFFFF', 'cellpic1.gif', 'cellpic3.gif', 'cellpic2.jpg', 'FAFAFA', 'FFFFFF', '', 'row1', 'row2', '', 'Verdana, Arial, Helvetica, sans-serif', 'Trebuchet MS', 'Courier, \'Courier New\', sans-serif', 10, 11, 12, '444444', '006600', 'FFA34F', '', '', '');
|
||||
|
||||
INSERT INTO phpbb_themes_name (themes_id, tr_color1_name, tr_color2_name, tr_color3_name, tr_class1_name, tr_class2_name, tr_class3_name, th_color1_name, th_color2_name, th_color3_name, th_class1_name, th_class2_name, th_class3_name, td_color1_name, td_color2_name, td_color3_name, td_class1_name, td_class2_name, td_class3_name, fontface1_name, fontface2_name, fontface3_name, fontsize1_name, fontsize2_name, fontsize3_name, fontcolor1_name, fontcolor2_name, fontcolor3_name, span_class1_name, span_class2_name, span_class3_name) VALUES (1, 'The lightest row colour', 'The medium row color', 'The darkest row colour', '', '', '', 'Border round the whole page', 'Outer table border', 'Inner table border', 'Silver gradient picture', 'Blue gradient picture', 'Fade-out gradient on index', 'Background for quote boxes', 'All white areas', '', 'Background for topic posts', '2nd background for topic posts', '', 'Main fonts', 'Additional topic title font', 'Form fonts', 'Smallest font size', 'Medium font size', 'Normal font size (post body etc)', 'Quote & copyright text', 'Code text colour', 'Main table header text colour', '', '', '');
|
||||
|
||||
|
||||
# -- Smilies
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 1, ':D', 'icon_biggrin.gif', 'Very Happy');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 2, ':-D', 'icon_biggrin.gif', 'Very Happy');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 3, ':grin:', 'icon_biggrin.gif', 'Very Happy');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 4, ':)', 'icon_smile.gif', 'Smile');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 5, ':-)', 'icon_smile.gif', 'Smile');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 6, ':smile:', 'icon_smile.gif', 'Smile');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 7, ':(', 'icon_sad.gif', 'Sad');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 8, ':-(', 'icon_sad.gif', 'Sad');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 9, ':sad:', 'icon_sad.gif', 'Sad');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 10, ':o', 'icon_surprised.gif', 'Surprised');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 11, ':-o', 'icon_surprised.gif', 'Surprised');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 12, ':eek:', 'icon_surprised.gif', 'Surprised');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 13, ':shock:', 'icon_eek.gif', 'Shocked');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 14, ':?', 'icon_confused.gif', 'Confused');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 15, ':-?', 'icon_confused.gif', 'Confused');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 16, ':???:', 'icon_confused.gif', 'Confused');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 17, '8)', 'icon_cool.gif', 'Cool');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 18, '8-)', 'icon_cool.gif', 'Cool');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 19, ':cool:', 'icon_cool.gif', 'Cool');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 20, ':lol:', 'icon_lol.gif', 'Laughing');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 21, ':x', 'icon_mad.gif', 'Mad');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 22, ':-x', 'icon_mad.gif', 'Mad');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 23, ':mad:', 'icon_mad.gif', 'Mad');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 24, ':P', 'icon_razz.gif', 'Razz');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 25, ':-P', 'icon_razz.gif', 'Razz');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 26, ':razz:', 'icon_razz.gif', 'Razz');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 27, ':oops:', 'icon_redface.gif', 'Embarassed');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 28, ':cry:', 'icon_cry.gif', 'Crying or Very sad');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 29, ':evil:', 'icon_evil.gif', 'Evil or Very Mad');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 30, ':twisted:', 'icon_twisted.gif', 'Twisted Evil');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 31, ':roll:', 'icon_rolleyes.gif', 'Rolling Eyes');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 32, ':wink:', 'icon_wink.gif', 'Wink');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 33, ';)', 'icon_wink.gif', 'Wink');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 34, ';-)', 'icon_wink.gif', 'Wink');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 35, ':!:', 'icon_exclaim.gif', 'Exclamation');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 36, ':?:', 'icon_question.gif', 'Question');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 37, ':idea:', 'icon_idea.gif', 'Idea');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 38, ':arrow:', 'icon_arrow.gif', 'Arrow');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 39, ':|', 'icon_neutral.gif', 'Neutral');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 40, ':-|', 'icon_neutral.gif', 'Neutral');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 41, ':neutral:', 'icon_neutral.gif', 'Neutral');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 42, ':mrgreen:', 'icon_mrgreen.gif', 'Mr. Green');
|
||||
|
||||
|
||||
# -- wordlist
|
||||
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 1, 'example', 0 );
|
||||
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 2, 'post', 0 );
|
||||
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 3, 'phpbb', 0 );
|
||||
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 4, 'installation', 0 );
|
||||
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 5, 'delete', 0 );
|
||||
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 6, 'topic', 0 );
|
||||
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 7, 'forum', 0 );
|
||||
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 8, 'since', 0 );
|
||||
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 9, 'everything', 0 );
|
||||
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 10, 'seems', 0 );
|
||||
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 11, 'working', 0 );
|
||||
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 12, 'welcome', 0 );
|
||||
|
||||
|
||||
# -- wordmatch
|
||||
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 1, 1, 0 );
|
||||
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 2, 1, 0 );
|
||||
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 3, 1, 0 );
|
||||
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 4, 1, 0 );
|
||||
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 5, 1, 0 );
|
||||
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 6, 1, 0 );
|
||||
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 7, 1, 0 );
|
||||
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 8, 1, 0 );
|
||||
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 9, 1, 0 );
|
||||
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 10, 1, 0 );
|
||||
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 11, 1, 0 );
|
||||
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 12, 1, 1 );
|
||||
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 3, 1, 1 );
|
566
phpBB/install/schemas/mysql_schema.sql
Normal file
566
phpBB/install/schemas/mysql_schema.sql
Normal file
@@ -0,0 +1,566 @@
|
||||
#
|
||||
# phpBB2 - MySQL schema
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
#
|
||||
# Table structure for table 'phpbb_auth_access'
|
||||
#
|
||||
CREATE TABLE phpbb_auth_access (
|
||||
group_id mediumint(8) DEFAULT '0' NOT NULL,
|
||||
forum_id smallint(5) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
auth_view tinyint(1) DEFAULT '0' NOT NULL,
|
||||
auth_read tinyint(1) DEFAULT '0' NOT NULL,
|
||||
auth_post tinyint(1) DEFAULT '0' NOT NULL,
|
||||
auth_reply tinyint(1) DEFAULT '0' NOT NULL,
|
||||
auth_edit tinyint(1) DEFAULT '0' NOT NULL,
|
||||
auth_delete tinyint(1) DEFAULT '0' NOT NULL,
|
||||
auth_sticky tinyint(1) DEFAULT '0' NOT NULL,
|
||||
auth_announce tinyint(1) DEFAULT '0' NOT NULL,
|
||||
auth_vote tinyint(1) DEFAULT '0' NOT NULL,
|
||||
auth_pollcreate tinyint(1) DEFAULT '0' NOT NULL,
|
||||
auth_attachments tinyint(1) DEFAULT '0' NOT NULL,
|
||||
auth_mod tinyint(1) DEFAULT '0' NOT NULL,
|
||||
KEY group_id (group_id),
|
||||
KEY forum_id (forum_id)
|
||||
);
|
||||
|
||||
|
||||
#
|
||||
# Table structure for table 'phpbb_user_group'
|
||||
#
|
||||
CREATE TABLE phpbb_user_group (
|
||||
group_id mediumint(8) DEFAULT '0' NOT NULL,
|
||||
user_id mediumint(8) DEFAULT '0' NOT NULL,
|
||||
user_pending tinyint(1),
|
||||
KEY group_id (group_id),
|
||||
KEY user_id (user_id)
|
||||
);
|
||||
|
||||
#
|
||||
# Table structure for table 'phpbb_groups'
|
||||
#
|
||||
CREATE TABLE phpbb_groups (
|
||||
group_id mediumint(8) NOT NULL auto_increment,
|
||||
group_type tinyint(4) DEFAULT '1' NOT NULL,
|
||||
group_name varchar(40) NOT NULL,
|
||||
group_description varchar(255) NOT NULL,
|
||||
group_moderator mediumint(8) DEFAULT '0' NOT NULL,
|
||||
group_single_user tinyint(1) DEFAULT '1' NOT NULL,
|
||||
PRIMARY KEY (group_id),
|
||||
KEY group_single_user (group_single_user)
|
||||
);
|
||||
|
||||
|
||||
# --------------------------------------------------------
|
||||
#
|
||||
# Table structure for table 'phpbb_banlist'
|
||||
#
|
||||
CREATE TABLE phpbb_banlist (
|
||||
ban_id mediumint(8) UNSIGNED NOT NULL auto_increment,
|
||||
ban_userid mediumint(8) NOT NULL,
|
||||
ban_ip char(8) NOT NULL,
|
||||
ban_email varchar(255),
|
||||
PRIMARY KEY (ban_id),
|
||||
KEY ban_ip_user_id (ban_ip, ban_userid)
|
||||
);
|
||||
|
||||
|
||||
# --------------------------------------------------------
|
||||
#
|
||||
# Table structure for table 'phpbb_categories'
|
||||
#
|
||||
CREATE TABLE phpbb_categories (
|
||||
cat_id mediumint(8) UNSIGNED NOT NULL auto_increment,
|
||||
cat_title varchar(100),
|
||||
cat_order mediumint(8) UNSIGNED NOT NULL,
|
||||
PRIMARY KEY (cat_id),
|
||||
KEY cat_order (cat_order)
|
||||
);
|
||||
|
||||
|
||||
# --------------------------------------------------------
|
||||
#
|
||||
# Table structure for table 'phpbb_config'
|
||||
#
|
||||
CREATE TABLE phpbb_config (
|
||||
config_name varchar(255) NOT NULL,
|
||||
config_value varchar(255) NOT NULL,
|
||||
PRIMARY KEY (config_name)
|
||||
);
|
||||
|
||||
|
||||
# --------------------------------------------------------
|
||||
#
|
||||
# Table structure for table 'phpbb_confirm'
|
||||
#
|
||||
CREATE TABLE phpbb_confirm (
|
||||
confirm_id char(32) DEFAULT '' NOT NULL,
|
||||
session_id char(32) DEFAULT '' NOT NULL,
|
||||
code char(6) DEFAULT '' NOT NULL,
|
||||
PRIMARY KEY (session_id,confirm_id)
|
||||
);
|
||||
|
||||
|
||||
# --------------------------------------------------------
|
||||
#
|
||||
# Table structure for table 'phpbb_disallow'
|
||||
#
|
||||
CREATE TABLE phpbb_disallow (
|
||||
disallow_id mediumint(8) UNSIGNED NOT NULL auto_increment,
|
||||
disallow_username varchar(25) DEFAULT '' NOT NULL,
|
||||
PRIMARY KEY (disallow_id)
|
||||
);
|
||||
|
||||
|
||||
# --------------------------------------------------------
|
||||
#
|
||||
# Table structure for table 'phpbb_forum_prune'
|
||||
#
|
||||
CREATE TABLE phpbb_forum_prune (
|
||||
prune_id mediumint(8) UNSIGNED NOT NULL auto_increment,
|
||||
forum_id smallint(5) UNSIGNED NOT NULL,
|
||||
prune_days smallint(5) UNSIGNED NOT NULL,
|
||||
prune_freq smallint(5) UNSIGNED NOT NULL,
|
||||
PRIMARY KEY(prune_id),
|
||||
KEY forum_id (forum_id)
|
||||
);
|
||||
|
||||
|
||||
# --------------------------------------------------------
|
||||
#
|
||||
# Table structure for table 'phpbb_forums'
|
||||
#
|
||||
CREATE TABLE phpbb_forums (
|
||||
forum_id smallint(5) UNSIGNED NOT NULL,
|
||||
cat_id mediumint(8) UNSIGNED NOT NULL,
|
||||
forum_name varchar(150),
|
||||
forum_desc text,
|
||||
forum_status tinyint(4) DEFAULT '0' NOT NULL,
|
||||
forum_order mediumint(8) UNSIGNED DEFAULT '1' NOT NULL,
|
||||
forum_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
forum_topics mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
forum_last_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
prune_next int(11),
|
||||
prune_enable tinyint(1) DEFAULT '0' NOT NULL,
|
||||
auth_view tinyint(2) DEFAULT '0' NOT NULL,
|
||||
auth_read tinyint(2) DEFAULT '0' NOT NULL,
|
||||
auth_post tinyint(2) DEFAULT '0' NOT NULL,
|
||||
auth_reply tinyint(2) DEFAULT '0' NOT NULL,
|
||||
auth_edit tinyint(2) DEFAULT '0' NOT NULL,
|
||||
auth_delete tinyint(2) DEFAULT '0' NOT NULL,
|
||||
auth_sticky tinyint(2) DEFAULT '0' NOT NULL,
|
||||
auth_announce tinyint(2) DEFAULT '0' NOT NULL,
|
||||
auth_vote tinyint(2) DEFAULT '0' NOT NULL,
|
||||
auth_pollcreate tinyint(2) DEFAULT '0' NOT NULL,
|
||||
auth_attachments tinyint(2) DEFAULT '0' NOT NULL,
|
||||
PRIMARY KEY (forum_id),
|
||||
KEY forums_order (forum_order),
|
||||
KEY cat_id (cat_id),
|
||||
KEY forum_last_post_id (forum_last_post_id)
|
||||
);
|
||||
|
||||
|
||||
# --------------------------------------------------------
|
||||
#
|
||||
# Table structure for table 'phpbb_posts'
|
||||
#
|
||||
CREATE TABLE phpbb_posts (
|
||||
post_id mediumint(8) UNSIGNED NOT NULL auto_increment,
|
||||
topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
forum_id smallint(5) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
poster_id mediumint(8) DEFAULT '0' NOT NULL,
|
||||
post_time int(11) DEFAULT '0' NOT NULL,
|
||||
poster_ip char(8) NOT NULL,
|
||||
post_username varchar(25),
|
||||
enable_bbcode tinyint(1) DEFAULT '1' NOT NULL,
|
||||
enable_html tinyint(1) DEFAULT '0' NOT NULL,
|
||||
enable_smilies tinyint(1) DEFAULT '1' NOT NULL,
|
||||
enable_sig tinyint(1) DEFAULT '1' NOT NULL,
|
||||
post_edit_time int(11),
|
||||
post_edit_count smallint(5) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
PRIMARY KEY (post_id),
|
||||
KEY forum_id (forum_id),
|
||||
KEY topic_id (topic_id),
|
||||
KEY poster_id (poster_id),
|
||||
KEY post_time (post_time)
|
||||
);
|
||||
|
||||
|
||||
# --------------------------------------------------------
|
||||
#
|
||||
# Table structure for table 'phpbb_posts_text'
|
||||
#
|
||||
CREATE TABLE phpbb_posts_text (
|
||||
post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
bbcode_uid char(10) NOT NULL,
|
||||
post_subject char(60),
|
||||
post_text text,
|
||||
PRIMARY KEY (post_id)
|
||||
);
|
||||
|
||||
|
||||
# --------------------------------------------------------
|
||||
#
|
||||
# Table structure for table 'phpbb_privmsgs'
|
||||
#
|
||||
CREATE TABLE phpbb_privmsgs (
|
||||
privmsgs_id mediumint(8) UNSIGNED NOT NULL auto_increment,
|
||||
privmsgs_type tinyint(4) DEFAULT '0' NOT NULL,
|
||||
privmsgs_subject varchar(255) DEFAULT '0' NOT NULL,
|
||||
privmsgs_from_userid mediumint(8) DEFAULT '0' NOT NULL,
|
||||
privmsgs_to_userid mediumint(8) DEFAULT '0' NOT NULL,
|
||||
privmsgs_date int(11) DEFAULT '0' NOT NULL,
|
||||
privmsgs_ip char(8) NOT NULL,
|
||||
privmsgs_enable_bbcode tinyint(1) DEFAULT '1' NOT NULL,
|
||||
privmsgs_enable_html tinyint(1) DEFAULT '0' NOT NULL,
|
||||
privmsgs_enable_smilies tinyint(1) DEFAULT '1' NOT NULL,
|
||||
privmsgs_attach_sig tinyint(1) DEFAULT '1' NOT NULL,
|
||||
PRIMARY KEY (privmsgs_id),
|
||||
KEY privmsgs_from_userid (privmsgs_from_userid),
|
||||
KEY privmsgs_to_userid (privmsgs_to_userid)
|
||||
);
|
||||
|
||||
|
||||
# --------------------------------------------------------
|
||||
#
|
||||
# Table structure for table 'phpbb_privmsgs_text'
|
||||
#
|
||||
CREATE TABLE phpbb_privmsgs_text (
|
||||
privmsgs_text_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
privmsgs_bbcode_uid char(10) DEFAULT '0' NOT NULL,
|
||||
privmsgs_text text,
|
||||
PRIMARY KEY (privmsgs_text_id)
|
||||
);
|
||||
|
||||
|
||||
# --------------------------------------------------------
|
||||
#
|
||||
# Table structure for table 'phpbb_ranks'
|
||||
#
|
||||
CREATE TABLE phpbb_ranks (
|
||||
rank_id smallint(5) UNSIGNED NOT NULL auto_increment,
|
||||
rank_title varchar(50) NOT NULL,
|
||||
rank_min mediumint(8) DEFAULT '0' NOT NULL,
|
||||
rank_special tinyint(1) DEFAULT '0',
|
||||
rank_image varchar(255),
|
||||
PRIMARY KEY (rank_id)
|
||||
);
|
||||
|
||||
|
||||
# --------------------------------------------------------
|
||||
#
|
||||
# Table structure for table `phpbb_search_results`
|
||||
#
|
||||
CREATE TABLE phpbb_search_results (
|
||||
search_id int(11) UNSIGNED NOT NULL default '0',
|
||||
session_id char(32) NOT NULL default '',
|
||||
search_array text NOT NULL,
|
||||
PRIMARY KEY (search_id),
|
||||
KEY session_id (session_id)
|
||||
);
|
||||
|
||||
|
||||
# --------------------------------------------------------
|
||||
#
|
||||
# Table structure for table `phpbb_search_wordlist`
|
||||
#
|
||||
CREATE TABLE phpbb_search_wordlist (
|
||||
word_text varchar(50) binary NOT NULL default '',
|
||||
word_id mediumint(8) UNSIGNED NOT NULL auto_increment,
|
||||
word_common tinyint(1) unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (word_text),
|
||||
KEY word_id (word_id)
|
||||
);
|
||||
|
||||
# --------------------------------------------------------
|
||||
#
|
||||
# Table structure for table `phpbb_search_wordmatch`
|
||||
#
|
||||
CREATE TABLE phpbb_search_wordmatch (
|
||||
post_id mediumint(8) UNSIGNED NOT NULL default '0',
|
||||
word_id mediumint(8) UNSIGNED NOT NULL default '0',
|
||||
title_match tinyint(1) NOT NULL default '0',
|
||||
KEY post_id (post_id),
|
||||
KEY word_id (word_id)
|
||||
);
|
||||
|
||||
|
||||
# --------------------------------------------------------
|
||||
#
|
||||
# Table structure for table 'phpbb_sessions'
|
||||
#
|
||||
# Note that if you're running 3.23.x you may want to make
|
||||
# this table a type HEAP. This type of table is stored
|
||||
# within system memory and therefore for big busy boards
|
||||
# is likely to be noticeably faster than continually
|
||||
# writing to disk ...
|
||||
#
|
||||
CREATE TABLE phpbb_sessions (
|
||||
session_id char(32) DEFAULT '' NOT NULL,
|
||||
session_user_id mediumint(8) DEFAULT '0' NOT NULL,
|
||||
session_start int(11) DEFAULT '0' NOT NULL,
|
||||
session_time int(11) DEFAULT '0' NOT NULL,
|
||||
session_ip char(8) DEFAULT '0' NOT NULL,
|
||||
session_page int(11) DEFAULT '0' NOT NULL,
|
||||
session_logged_in tinyint(1) DEFAULT '0' NOT NULL,
|
||||
PRIMARY KEY (session_id),
|
||||
KEY session_user_id (session_user_id),
|
||||
KEY session_id_ip_user_id (session_id, session_ip, session_user_id)
|
||||
);
|
||||
|
||||
|
||||
# --------------------------------------------------------
|
||||
#
|
||||
# Table structure for table 'phpbb_smilies'
|
||||
#
|
||||
CREATE TABLE phpbb_smilies (
|
||||
smilies_id smallint(5) UNSIGNED NOT NULL auto_increment,
|
||||
code varchar(50),
|
||||
smile_url varchar(100),
|
||||
emoticon varchar(75),
|
||||
PRIMARY KEY (smilies_id)
|
||||
);
|
||||
|
||||
|
||||
# --------------------------------------------------------
|
||||
#
|
||||
# Table structure for table 'phpbb_themes'
|
||||
#
|
||||
CREATE TABLE phpbb_themes (
|
||||
themes_id mediumint(8) UNSIGNED NOT NULL auto_increment,
|
||||
template_name varchar(30) NOT NULL default '',
|
||||
style_name varchar(30) NOT NULL default '',
|
||||
head_stylesheet varchar(100) default NULL,
|
||||
body_background varchar(100) default NULL,
|
||||
body_bgcolor varchar(6) default NULL,
|
||||
body_text varchar(6) default NULL,
|
||||
body_link varchar(6) default NULL,
|
||||
body_vlink varchar(6) default NULL,
|
||||
body_alink varchar(6) default NULL,
|
||||
body_hlink varchar(6) default NULL,
|
||||
tr_color1 varchar(6) default NULL,
|
||||
tr_color2 varchar(6) default NULL,
|
||||
tr_color3 varchar(6) default NULL,
|
||||
tr_class1 varchar(25) default NULL,
|
||||
tr_class2 varchar(25) default NULL,
|
||||
tr_class3 varchar(25) default NULL,
|
||||
th_color1 varchar(6) default NULL,
|
||||
th_color2 varchar(6) default NULL,
|
||||
th_color3 varchar(6) default NULL,
|
||||
th_class1 varchar(25) default NULL,
|
||||
th_class2 varchar(25) default NULL,
|
||||
th_class3 varchar(25) default NULL,
|
||||
td_color1 varchar(6) default NULL,
|
||||
td_color2 varchar(6) default NULL,
|
||||
td_color3 varchar(6) default NULL,
|
||||
td_class1 varchar(25) default NULL,
|
||||
td_class2 varchar(25) default NULL,
|
||||
td_class3 varchar(25) default NULL,
|
||||
fontface1 varchar(50) default NULL,
|
||||
fontface2 varchar(50) default NULL,
|
||||
fontface3 varchar(50) default NULL,
|
||||
fontsize1 tinyint(4) default NULL,
|
||||
fontsize2 tinyint(4) default NULL,
|
||||
fontsize3 tinyint(4) default NULL,
|
||||
fontcolor1 varchar(6) default NULL,
|
||||
fontcolor2 varchar(6) default NULL,
|
||||
fontcolor3 varchar(6) default NULL,
|
||||
span_class1 varchar(25) default NULL,
|
||||
span_class2 varchar(25) default NULL,
|
||||
span_class3 varchar(25) default NULL,
|
||||
img_size_poll smallint(5) UNSIGNED,
|
||||
img_size_privmsg smallint(5) UNSIGNED,
|
||||
PRIMARY KEY (themes_id)
|
||||
);
|
||||
|
||||
|
||||
# --------------------------------------------------------
|
||||
#
|
||||
# Table structure for table 'phpbb_themes_name'
|
||||
#
|
||||
CREATE TABLE phpbb_themes_name (
|
||||
themes_id smallint(5) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
tr_color1_name char(50),
|
||||
tr_color2_name char(50),
|
||||
tr_color3_name char(50),
|
||||
tr_class1_name char(50),
|
||||
tr_class2_name char(50),
|
||||
tr_class3_name char(50),
|
||||
th_color1_name char(50),
|
||||
th_color2_name char(50),
|
||||
th_color3_name char(50),
|
||||
th_class1_name char(50),
|
||||
th_class2_name char(50),
|
||||
th_class3_name char(50),
|
||||
td_color1_name char(50),
|
||||
td_color2_name char(50),
|
||||
td_color3_name char(50),
|
||||
td_class1_name char(50),
|
||||
td_class2_name char(50),
|
||||
td_class3_name char(50),
|
||||
fontface1_name char(50),
|
||||
fontface2_name char(50),
|
||||
fontface3_name char(50),
|
||||
fontsize1_name char(50),
|
||||
fontsize2_name char(50),
|
||||
fontsize3_name char(50),
|
||||
fontcolor1_name char(50),
|
||||
fontcolor2_name char(50),
|
||||
fontcolor3_name char(50),
|
||||
span_class1_name char(50),
|
||||
span_class2_name char(50),
|
||||
span_class3_name char(50),
|
||||
PRIMARY KEY (themes_id)
|
||||
);
|
||||
|
||||
|
||||
# --------------------------------------------------------
|
||||
#
|
||||
# Table structure for table 'phpbb_topics'
|
||||
#
|
||||
CREATE TABLE phpbb_topics (
|
||||
topic_id mediumint(8) UNSIGNED NOT NULL auto_increment,
|
||||
forum_id smallint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
topic_title char(60) NOT NULL,
|
||||
topic_poster mediumint(8) DEFAULT '0' NOT NULL,
|
||||
topic_time int(11) DEFAULT '0' NOT NULL,
|
||||
topic_views mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
topic_replies mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
topic_status tinyint(3) DEFAULT '0' NOT NULL,
|
||||
topic_vote tinyint(1) DEFAULT '0' NOT NULL,
|
||||
topic_type tinyint(3) DEFAULT '0' NOT NULL,
|
||||
topic_first_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
topic_last_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
topic_moved_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
PRIMARY KEY (topic_id),
|
||||
KEY forum_id (forum_id),
|
||||
KEY topic_moved_id (topic_moved_id),
|
||||
KEY topic_status (topic_status),
|
||||
KEY topic_type (topic_type)
|
||||
);
|
||||
|
||||
|
||||
# --------------------------------------------------------
|
||||
#
|
||||
# Table structure for table 'phpbb_topics_watch'
|
||||
#
|
||||
CREATE TABLE phpbb_topics_watch (
|
||||
topic_id mediumint(8) UNSIGNED NOT NULL DEFAULT '0',
|
||||
user_id mediumint(8) NOT NULL DEFAULT '0',
|
||||
notify_status tinyint(1) NOT NULL default '0',
|
||||
KEY topic_id (topic_id),
|
||||
KEY user_id (user_id),
|
||||
KEY notify_status (notify_status)
|
||||
);
|
||||
|
||||
|
||||
# --------------------------------------------------------
|
||||
#
|
||||
# Table structure for table 'phpbb_users'
|
||||
#
|
||||
CREATE TABLE phpbb_users (
|
||||
user_id mediumint(8) NOT NULL,
|
||||
user_active tinyint(1) DEFAULT '1',
|
||||
username varchar(25) NOT NULL,
|
||||
user_password varchar(32) NOT NULL,
|
||||
user_session_time int(11) DEFAULT '0' NOT NULL,
|
||||
user_session_page smallint(5) DEFAULT '0' NOT NULL,
|
||||
user_lastvisit int(11) DEFAULT '0' NOT NULL,
|
||||
user_regdate int(11) DEFAULT '0' NOT NULL,
|
||||
user_level tinyint(4) DEFAULT '0',
|
||||
user_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
user_timezone decimal(5,2) DEFAULT '0' NOT NULL,
|
||||
user_style tinyint(4),
|
||||
user_lang varchar(255),
|
||||
user_dateformat varchar(14) DEFAULT 'd M Y H:i' NOT NULL,
|
||||
user_new_privmsg smallint(5) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
user_unread_privmsg smallint(5) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
user_last_privmsg int(11) DEFAULT '0' NOT NULL,
|
||||
user_emailtime int(11),
|
||||
user_viewemail tinyint(1),
|
||||
user_attachsig tinyint(1),
|
||||
user_allowhtml tinyint(1) DEFAULT '1',
|
||||
user_allowbbcode tinyint(1) DEFAULT '1',
|
||||
user_allowsmile tinyint(1) DEFAULT '1',
|
||||
user_allowavatar tinyint(1) DEFAULT '1' NOT NULL,
|
||||
user_allow_pm tinyint(1) DEFAULT '1' NOT NULL,
|
||||
user_allow_viewonline tinyint(1) DEFAULT '1' NOT NULL,
|
||||
user_notify tinyint(1) DEFAULT '1' NOT NULL,
|
||||
user_notify_pm tinyint(1) DEFAULT '0' NOT NULL,
|
||||
user_popup_pm tinyint(1) DEFAULT '0' NOT NULL,
|
||||
user_rank int(11) DEFAULT '0',
|
||||
user_avatar varchar(100),
|
||||
user_avatar_type tinyint(4) DEFAULT '0' NOT NULL,
|
||||
user_email varchar(255),
|
||||
user_icq varchar(15),
|
||||
user_website varchar(100),
|
||||
user_from varchar(100),
|
||||
user_sig text,
|
||||
user_sig_bbcode_uid char(10),
|
||||
user_aim varchar(255),
|
||||
user_yim varchar(255),
|
||||
user_msnm varchar(255),
|
||||
user_occ varchar(100),
|
||||
user_interests varchar(255),
|
||||
user_actkey varchar(32),
|
||||
user_newpasswd varchar(32),
|
||||
PRIMARY KEY (user_id),
|
||||
KEY user_session_time (user_session_time)
|
||||
);
|
||||
|
||||
|
||||
# --------------------------------------------------------
|
||||
#
|
||||
# Table structure for table 'phpbb_vote_desc'
|
||||
#
|
||||
CREATE TABLE phpbb_vote_desc (
|
||||
vote_id mediumint(8) UNSIGNED NOT NULL auto_increment,
|
||||
topic_id mediumint(8) UNSIGNED NOT NULL DEFAULT '0',
|
||||
vote_text text NOT NULL,
|
||||
vote_start int(11) NOT NULL DEFAULT '0',
|
||||
vote_length int(11) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (vote_id),
|
||||
KEY topic_id (topic_id)
|
||||
);
|
||||
|
||||
|
||||
# --------------------------------------------------------
|
||||
#
|
||||
# Table structure for table 'phpbb_vote_results'
|
||||
#
|
||||
CREATE TABLE phpbb_vote_results (
|
||||
vote_id mediumint(8) UNSIGNED NOT NULL DEFAULT '0',
|
||||
vote_option_id tinyint(4) UNSIGNED NOT NULL DEFAULT '0',
|
||||
vote_option_text varchar(255) NOT NULL,
|
||||
vote_result int(11) NOT NULL DEFAULT '0',
|
||||
KEY vote_option_id (vote_option_id),
|
||||
KEY vote_id (vote_id)
|
||||
);
|
||||
|
||||
|
||||
# --------------------------------------------------------
|
||||
#
|
||||
# Table structure for table 'phpbb_vote_voters'
|
||||
#
|
||||
CREATE TABLE phpbb_vote_voters (
|
||||
vote_id mediumint(8) UNSIGNED NOT NULL DEFAULT '0',
|
||||
vote_user_id mediumint(8) NOT NULL DEFAULT '0',
|
||||
vote_user_ip char(8) NOT NULL,
|
||||
KEY vote_id (vote_id),
|
||||
KEY vote_user_id (vote_user_id),
|
||||
KEY vote_user_ip (vote_user_ip)
|
||||
);
|
||||
|
||||
|
||||
# --------------------------------------------------------
|
||||
#
|
||||
# Table structure for table 'phpbb_words'
|
||||
#
|
||||
CREATE TABLE phpbb_words (
|
||||
word_id mediumint(8) UNSIGNED NOT NULL auto_increment,
|
||||
word char(100) NOT NULL,
|
||||
replacement char(100) NOT NULL,
|
||||
PRIMARY KEY (word_id)
|
||||
);
|
184
phpBB/install/schemas/postgres_basic.sql
Normal file
184
phpBB/install/schemas/postgres_basic.sql
Normal file
@@ -0,0 +1,184 @@
|
||||
/*
|
||||
* Basic DB data for phpBB2 devel
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
-- Config
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('config_id','1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_disable','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('sitename','yourdomain.com');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('site_desc','A _little_ text to describe your forum');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_name','phpbb2mysql');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_path','/');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_domain','');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('cookie_secure','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('session_length','3600');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_html','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_html_tags','b,i,u,pre');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_bbcode','1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_smilies','1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_sig','1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_namechange','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_theme_create','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_local','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_remote','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_upload','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_confirm', '0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('override_user_style','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('posts_per_page','15');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('topics_per_page','50');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('hot_threshold','25');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_poll_options','10');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_sig_chars','255');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_inbox_privmsgs','50');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_sentbox_privmsgs','25');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_savebox_privmsgs','50');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_email_sig','Thanks, The Management');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_email','youraddress@yourdomain.com');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_delivery','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_host','');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_username','');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_password','');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('sendmail_fix','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('require_activation','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('flood_interval','15');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_email_form','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_filesize','6144');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_max_width','80');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_max_height','80');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_path','images/avatars');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_gallery_path','images/avatars/gallery');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('smilies_path','images/smiles');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('default_style','1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('default_dateformat','D M d, Y g:i a');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_timezone','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('prune_enable','1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('privmsg_disable','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('gzip_compress','0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('coppa_fax', '');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('coppa_mail', '');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('record_online_users', '0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('record_online_date', '0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_name', 'www.yourdomain.tld');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_port', '80');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', '/phpBB2/');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '.0.13');
|
||||
|
||||
-- Categories
|
||||
INSERT INTO phpbb_categories (cat_id, cat_title, cat_order) VALUES (1, 'Test category 1', 10);
|
||||
|
||||
|
||||
-- Forums
|
||||
INSERT INTO phpbb_forums (forum_id, forum_name, forum_desc, cat_id, forum_order, forum_posts, forum_topics, forum_last_post_id, auth_view, auth_read, auth_post, auth_reply, auth_edit, auth_delete, auth_announce, auth_sticky, auth_pollcreate, auth_vote, auth_attachments) VALUES (1, 'Test Forum 1', 'This is just a test forum.', 1, 10, 1, 1, 1, 0, 0, 0, 0, 1, 1, 3, 3, 1, 1, 3);
|
||||
|
||||
-- Users
|
||||
INSERT INTO phpbb_users (user_id, username, user_level, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_viewemail, user_style, user_aim, user_yim, user_msnm, user_posts, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_pm, user_notify_pm, user_allow_viewonline, user_rank, user_avatar, user_lang, user_timezone, user_dateformat, user_actkey, user_newpasswd, user_notify, user_active) VALUES ( -1, 'Anonymous', 0, 0, '', '', '', '', '', '', '', '', 0, NULL, '', '', '', 0, 0, 1, 0, 1, 0, 1, 1, NULL, '', '', 0, '', '', '', 0, 0);
|
||||
|
||||
-- username: admin password: admin (change this or remove it once everything is working!)
|
||||
INSERT INTO phpbb_users (user_id, username, user_level, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_viewemail, user_style, user_aim, user_yim, user_msnm, user_posts, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_pm, user_notify_pm, user_popup_pm, user_allow_viewonline, user_rank, user_avatar, user_lang, user_timezone, user_dateformat, user_actkey, user_newpasswd, user_notify, user_active) VALUES ( 2, 'Admin', 1, 0, '21232f297a57a5a743894a0e4a801fc3', 'admin@yourdomain.com', '', '', '', '', '', '', 1, 1, '', '', '', 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, '', 'english', 0, 'd M Y h:i a', '', '', 0, 1);
|
||||
|
||||
|
||||
-- Ranks
|
||||
INSERT INTO phpbb_ranks (rank_id, rank_title, rank_min, rank_special, rank_image) VALUES ( 1, 'Site Admin', -1, 1, NULL);
|
||||
|
||||
|
||||
-- Groups
|
||||
INSERT INTO phpbb_groups (group_id, group_name, group_description, group_single_user) VALUES (1, 'Anonymous', 'Personal User', 1);
|
||||
INSERT INTO phpbb_groups (group_id, group_name, group_description, group_single_user) VALUES (2, 'Admin', 'Personal User', 1);
|
||||
|
||||
|
||||
-- User -> Group
|
||||
INSERT INTO phpbb_user_group (group_id, user_id, user_pending) VALUES (1, -1, 0);
|
||||
INSERT INTO phpbb_user_group (group_id, user_id, user_pending) VALUES (2, 2, 0);
|
||||
|
||||
|
||||
-- Demo Topic
|
||||
INSERT INTO phpbb_topics (topic_id, topic_title, topic_poster, topic_time, topic_views, topic_replies, forum_id, topic_status, topic_type, topic_vote, topic_first_post_id, topic_last_post_id) VALUES (1, 'Welcome to phpBB 2', 2, '972086460', 0, 0, 1, 0, 0, 0, 1, 1);
|
||||
|
||||
|
||||
-- Demo Post
|
||||
INSERT INTO phpbb_posts (post_id, topic_id, forum_id, poster_id, post_time, post_username, poster_ip) VALUES (1, 1, 1, 2, 972086460, NULL, '7F000001');
|
||||
INSERT INTO phpbb_posts_text (post_id, post_subject, post_text) VALUES (1, NULL, 'This is an example post in your phpBB 2 installation. You may delete this post, this topic and even this forum if you like since everything seems to be working!');
|
||||
|
||||
|
||||
-- Themes
|
||||
INSERT INTO phpbb_themes (themes_id, template_name, style_name, head_stylesheet, body_background, body_bgcolor, body_text, body_link, body_vlink, body_alink, body_hlink, tr_color1, tr_color2, tr_color3, tr_class1, tr_class2, tr_class3, th_color1, th_color2, th_color3, th_class1, th_class2, th_class3, td_color1, td_color2, td_color3, td_class1, td_class2, td_class3, fontface1, fontface2, fontface3, fontsize1, fontsize2, fontsize3, fontcolor1, fontcolor2, fontcolor3, span_class1, span_class2, span_class3) VALUES (1, 'subSilver', 'subSilver', 'subSilver.css', NULL, 'E5E5E5', '000000', '006699', '5493B4', '', 'DD6900', 'EFEFEF', 'DEE3E7', 'D1D7DC', NULL, NULL, NULL, '98AAB1', '006699', 'FFFFFF', 'cellpic1.gif', 'cellpic3.gif', 'cellpic2.jpg', 'FAFAFA', 'FFFFFF', NULL, 'row1', 'row2', NULL, 'Verdana, Arial, Helvetica, sans-serif', 'Trebuchet MS', 'Courier, ''Courier New'', sans-serif', 10, 11, 12, '444444', '006600', 'FFA34F', NULL, NULL, NULL);
|
||||
|
||||
INSERT INTO phpbb_themes_name (themes_id, tr_color1_name, tr_color2_name, tr_color3_name, tr_class1_name, tr_class2_name, tr_class3_name, th_color1_name, th_color2_name, th_color3_name, th_class1_name, th_class2_name, th_class3_name, td_color1_name, td_color2_name, td_color3_name, td_class1_name, td_class2_name, td_class3_name, fontface1_name, fontface2_name, fontface3_name, fontsize1_name, fontsize2_name, fontsize3_name, fontcolor1_name, fontcolor2_name, fontcolor3_name, span_class1_name, span_class2_name, span_class3_name) VALUES (1, 'The lightest row colour', 'The medium row color', 'The darkest row colour', NULL, NULL, NULL, 'Border round the whole page', 'Outer table border', 'Inner table border', 'Silver gradient picture', 'Blue gradient picture', 'Fade-out gradient on index', 'Background for quote boxes', 'All white areas', NULL, 'Background for topic posts', '2nd background for topic posts', NULL, 'Main fonts', 'Additional topic title font', 'Form fonts', 'Smallest font size', 'Medium font size', 'Normal font size (post body etc)', 'Quote & copyright text', 'Code text colour', 'Main table header text colour', NULL, NULL, NULL);
|
||||
|
||||
|
||||
-- Smilies
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 1, ':D', 'icon_biggrin.gif', 'Very Happy');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 2, ':-D', 'icon_biggrin.gif', 'Very Happy');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 3, ':grin:', 'icon_biggrin.gif', 'Very Happy');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 4, ':)', 'icon_smile.gif', 'Smile');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 5, ':-)', 'icon_smile.gif', 'Smile');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 6, ':smile:', 'icon_smile.gif', 'Smile');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 7, ':(', 'icon_sad.gif', 'Sad');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 8, ':-(', 'icon_sad.gif', 'Sad');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 9, ':sad:', 'icon_sad.gif', 'Sad');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 10, ':o', 'icon_surprised.gif', 'Surprised');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 11, ':-o', 'icon_surprised.gif', 'Surprised');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 12, ':eek:', 'icon_surprised.gif', 'Surprised');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 13, ':shock:', 'icon_eek.gif', 'Shocked');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 14, ':?', 'icon_confused.gif', 'Confused');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 15, ':-?', 'icon_confused.gif', 'Confused');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 16, ':???:', 'icon_confused.gif', 'Confused');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 17, '8)', 'icon_cool.gif', 'Cool');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 18, '8-)', 'icon_cool.gif', 'Cool');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 19, ':cool:', 'icon_cool.gif', 'Cool');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 20, ':lol:', 'icon_lol.gif', 'Laughing');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 21, ':x', 'icon_mad.gif', 'Mad');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 22, ':-x', 'icon_mad.gif', 'Mad');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 23, ':mad:', 'icon_mad.gif', 'Mad');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 24, ':P', 'icon_razz.gif', 'Razz');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 25, ':-P', 'icon_razz.gif', 'Razz');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 26, ':razz:', 'icon_razz.gif', 'Razz');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 27, ':oops:', 'icon_redface.gif', 'Embarassed');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 28, ':cry:', 'icon_cry.gif', 'Crying or Very sad');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 29, ':evil:', 'icon_evil.gif', 'Evil or Very Mad');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 30, ':twisted:', 'icon_twisted.gif', 'Twisted Evil');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 31, ':roll:', 'icon_rolleyes.gif', 'Rolling Eyes');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 32, ':wink:', 'icon_wink.gif', 'Wink');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 33, ';)', 'icon_wink.gif', 'Wink');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 34, ';-)', 'icon_wink.gif', 'Wink');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 35, ':!:', 'icon_exclaim.gif', 'Exclamation');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 36, ':?:', 'icon_question.gif', 'Question');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 37, ':idea:', 'icon_idea.gif', 'Idea');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 38, ':arrow:', 'icon_arrow.gif', 'Arrow');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 39, ':|', 'icon_neutral.gif', 'Neutral');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 40, ':-|', 'icon_neutral.gif', 'Neutral');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 41, ':neutral:', 'icon_neutral.gif', 'Neutral');
|
||||
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 42, ':mrgreen:', 'icon_mrgreen.gif', 'Mr. Green');
|
||||
|
||||
|
||||
-- wordlist
|
||||
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 1, 'example', 0 );
|
||||
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 2, 'post', 0 );
|
||||
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 3, 'phpbb', 0 );
|
||||
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 4, 'installation', 0 );
|
||||
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 5, 'delete', 0 );
|
||||
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 6, 'topic', 0 );
|
||||
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 7, 'forum', 0 );
|
||||
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 8, 'since', 0 );
|
||||
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 9, 'everything', 0 );
|
||||
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 10, 'seems', 0 );
|
||||
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 11, 'working', 0 );
|
||||
INSERT INTO phpbb_search_wordlist (word_id, word_text, word_common) VALUES ( 12, 'welcome', 0 );
|
||||
|
||||
|
||||
-- wordmatch
|
||||
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 1, 1, 0 );
|
||||
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 2, 1, 0 );
|
||||
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 3, 1, 0 );
|
||||
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 4, 1, 0 );
|
||||
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 5, 1, 0 );
|
||||
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 6, 1, 0 );
|
||||
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 7, 1, 0 );
|
||||
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 8, 1, 0 );
|
||||
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 9, 1, 0 );
|
||||
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 10, 1, 0 );
|
||||
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 11, 1, 0 );
|
||||
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 12, 1, 1 );
|
||||
INSERT INTO phpbb_search_wordmatch (word_id, post_id, title_match) VALUES ( 3, 1, 1 );
|
549
phpBB/install/schemas/postgres_schema.sql
Normal file
549
phpBB/install/schemas/postgres_schema.sql
Normal file
@@ -0,0 +1,549 @@
|
||||
/*
|
||||
phpBB2 PostgreSQL DB schema - phpBB group 2001
|
||||
|
||||
|
||||
$Id$
|
||||
*/
|
||||
|
||||
CREATE SEQUENCE phpbb_banlist_id_seq start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
|
||||
CREATE SEQUENCE phpbb_categories_id_seq start 2 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
|
||||
CREATE SEQUENCE phpbb_disallow_id_seq start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
|
||||
CREATE SEQUENCE phpbb_posts_id_seq start 2 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
|
||||
CREATE SEQUENCE phpbb_privmsgs_id_seq start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
|
||||
CREATE SEQUENCE phpbb_ranks_id_seq start 2 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
|
||||
CREATE SEQUENCE phpbb_search_wordlist_id_seq start 13 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
|
||||
CREATE SEQUENCE phpbb_smilies_id_seq start 42 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
|
||||
CREATE SEQUENCE phpbb_themes_id_seq start 7 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
|
||||
CREATE SEQUENCE phpbb_topics_id_seq start 2 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
|
||||
CREATE SEQUENCE phpbb_users_id_seq start 3 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
|
||||
CREATE SEQUENCE phpbb_words_id_seq start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
|
||||
CREATE SEQUENCE phpbb_groups_id_seq start 3 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
|
||||
CREATE SEQUENCE phpbb_forum_prune_id_seq start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
|
||||
CREATE SEQUENCE phpbb_vote_desc_id_seq start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
|
||||
|
||||
/* --------------------------------------------------------
|
||||
Table structure for table phpbb_auth_access
|
||||
-------------------------------------------------------- */
|
||||
CREATE TABLE phpbb_auth_access (
|
||||
group_id int DEFAULT '0' NOT NULL,
|
||||
forum_id int2 DEFAULT '0' NOT NULL,
|
||||
auth_view int2 DEFAULT '0' NOT NULL,
|
||||
auth_read int2 DEFAULT '0' NOT NULL,
|
||||
auth_post int2 DEFAULT '0' NOT NULL,
|
||||
auth_reply int2 DEFAULT '0' NOT NULL,
|
||||
auth_edit int2 DEFAULT '0' NOT NULL,
|
||||
auth_delete int2 DEFAULT '0' NOT NULL,
|
||||
auth_sticky int2 DEFAULT '0' NOT NULL,
|
||||
auth_announce int2 DEFAULT '0' NOT NULL,
|
||||
auth_vote int2 DEFAULT '0' NOT NULL,
|
||||
auth_pollcreate int2 DEFAULT '0' NOT NULL,
|
||||
auth_attachments int2 DEFAULT '0' NOT NULL,
|
||||
auth_mod int2 DEFAULT '0' NOT NULL,
|
||||
CONSTRAINT phpbb_auth_access_pkey PRIMARY KEY (group_id, forum_id)
|
||||
);
|
||||
|
||||
|
||||
/* --------------------------------------------------------
|
||||
Table structure for table phpbb_confirm
|
||||
-------------------------------------------------------- */
|
||||
CREATE TABLE phpbb_confirm (
|
||||
confirm_id char(32) DEFAULT '' NOT NULL,
|
||||
session_id char(32) DEFAULT '' NOT NULL,
|
||||
code char(6) DEFAULT '' NOT NULL,
|
||||
CONSTRAINT phpbb_confirm_pkey PRIMARY KEY (session_id, confirm_id)
|
||||
);
|
||||
|
||||
|
||||
/* --------------------------------------------------------
|
||||
Table structure for table phpbb_groups
|
||||
-------------------------------------------------------- */
|
||||
CREATE TABLE phpbb_groups (
|
||||
group_id int DEFAULT nextval('phpbb_groups_id_seq'::text) NOT NULL,
|
||||
group_name varchar(40) NOT NULL,
|
||||
group_type int2 DEFAULT '1' NOT NULL,
|
||||
group_description varchar(255) NOT NULL,
|
||||
group_moderator int4 DEFAULT '0' NOT NULL,
|
||||
group_single_user int2 DEFAULT '0' NOT NULL,
|
||||
CONSTRAINT phpbb_groups_pkey PRIMARY KEY (group_id)
|
||||
);
|
||||
|
||||
|
||||
/* --------------------------------------------------------
|
||||
Table structure for table phpbb_banlist
|
||||
-------------------------------------------------------- */
|
||||
CREATE TABLE phpbb_banlist (
|
||||
ban_id int4 DEFAULT nextval('phpbb_banlist_id_seq'::text) NOT NULL,
|
||||
ban_userid int4,
|
||||
ban_ip char(8),
|
||||
ban_email varchar(255),
|
||||
CONSTRAINT phpbb_banlist_pkey PRIMARY KEY (ban_id)
|
||||
);
|
||||
CREATE INDEX ban_userid_phpbb_banlist_index ON phpbb_banlist (ban_userid);
|
||||
|
||||
|
||||
/* --------------------------------------------------------
|
||||
Table structure for table phpbb_categories
|
||||
-------------------------------------------------------- */
|
||||
CREATE TABLE phpbb_categories (
|
||||
cat_id int4 DEFAULT nextval('phpbb_categories_id_seq'::text) NOT NULL,
|
||||
cat_title varchar(100),
|
||||
cat_order int4,
|
||||
CONSTRAINT phpbb_categories_pkey PRIMARY KEY (cat_id)
|
||||
);
|
||||
|
||||
|
||||
/* --------------------------------------------------------
|
||||
Table structure for table phpbb_config
|
||||
-------------------------------------------------------- */
|
||||
CREATE TABLE phpbb_config (
|
||||
config_name varchar(255) NOT NULL,
|
||||
config_value varchar(255) NOT NULL,
|
||||
CONSTRAINT phpbb_config_pkey PRIMARY KEY (config_name)
|
||||
);
|
||||
|
||||
|
||||
/* --------------------------------------------------------
|
||||
Table structure for table phpbb_disallow
|
||||
-------------------------------------------------------- */
|
||||
CREATE TABLE phpbb_disallow (
|
||||
disallow_id int4 DEFAULT nextval('phpbb_disallow_id_seq'::text) NOT NULL,
|
||||
disallow_username varchar(25),
|
||||
CONSTRAINT phpbb_disallow_pkey PRIMARY KEY (disallow_id)
|
||||
);
|
||||
|
||||
|
||||
/* --------------------------------------------------------
|
||||
Table structure for table phpbb_forums
|
||||
-------------------------------------------------------- */
|
||||
CREATE TABLE phpbb_forums (
|
||||
forum_id int4 DEFAULT '0' NOT NULL,
|
||||
cat_id int4,
|
||||
forum_name varchar(150),
|
||||
forum_desc text,
|
||||
forum_status int2 DEFAULT '0' NOT NULL,
|
||||
forum_order int4 DEFAULT '1' NOT NULL,
|
||||
forum_posts int4 DEFAULT '0' NOT NULL,
|
||||
forum_topics int4 DEFAULT '0' NOT NULL,
|
||||
forum_last_post_id int4 DEFAULT '0' NOT NULL,
|
||||
prune_enable int2 DEFAULT '0' NOT NULL,
|
||||
prune_next int,
|
||||
auth_view int2 DEFAULT '0' NOT NULL,
|
||||
auth_read int2 DEFAULT '0' NOT NULL,
|
||||
auth_post int2 DEFAULT '0' NOT NULL,
|
||||
auth_reply int2 DEFAULT '0' NOT NULL,
|
||||
auth_edit int2 DEFAULT '0' NOT NULL,
|
||||
auth_delete int2 DEFAULT '0' NOT NULL,
|
||||
auth_announce int2 DEFAULT '0' NOT NULL,
|
||||
auth_sticky int2 DEFAULT '0' NOT NULL,
|
||||
auth_pollcreate int2 DEFAULT '0' NOT NULL,
|
||||
auth_vote int2 DEFAULT '0' NOT NULL,
|
||||
auth_attachments int2 DEFAULT '0' NOT NULL,
|
||||
CONSTRAINT phpbb_forums_pkey PRIMARY KEY (forum_id)
|
||||
);
|
||||
CREATE INDEX cat_id_phpbb_forums_index ON phpbb_forums (cat_id);
|
||||
CREATE INDEX forum_id_phpbb_forums_index ON phpbb_forums (forum_id);
|
||||
CREATE INDEX forums_order_phpbb_forums_index ON phpbb_forums (forum_order);
|
||||
CREATE INDEX forum_last_post_id_phpbb_forums_index ON phpbb_forums (forum_last_post_id);
|
||||
|
||||
|
||||
/* --------------------------------------------------------
|
||||
Table structure for table phpbb_forum_prune
|
||||
-------------------------------------------------------- */
|
||||
CREATE TABLE phpbb_forum_prune (
|
||||
prune_id int4 DEFAULT nextval('phpbb_forum_prune_id_seq'::text) NOT NULL,
|
||||
forum_id int4 NOT NULL,
|
||||
prune_days int4 NOT NULL,
|
||||
prune_freq int4 NOT NULL,
|
||||
CONSTRAINT phpbb_forum_prune_pkey PRIMARY KEY (prune_id)
|
||||
);
|
||||
CREATE INDEX prune_id_phpbb_forum_prune_index ON phpbb_forum_prune (prune_id);
|
||||
CREATE INDEX forum_id_phpbb_forum_prune_index ON phpbb_forum_prune (forum_id);
|
||||
|
||||
|
||||
/* --------------------------------------------------------
|
||||
Table structure for table phpbb_posts
|
||||
-------------------------------------------------------- */
|
||||
CREATE TABLE phpbb_posts (
|
||||
post_id int4 DEFAULT nextval('phpbb_posts_id_seq'::text) NOT NULL,
|
||||
topic_id int4 DEFAULT '0' NOT NULL,
|
||||
forum_id int4 DEFAULT '0' NOT NULL,
|
||||
poster_id int4 DEFAULT '0' NOT NULL,
|
||||
post_time int4 DEFAULT '0' NOT NULL,
|
||||
post_username varchar(25),
|
||||
poster_ip char(8) DEFAULT '' NOT NULL,
|
||||
enable_bbcode int2 DEFAULT '1' NOT NULL,
|
||||
enable_html int2 DEFAULT '0' NOT NULL,
|
||||
enable_smilies int2 DEFAULT '1' NOT NULL,
|
||||
enable_sig int2 DEFAULT '1' NOT NULL,
|
||||
post_edit_time int4,
|
||||
post_edit_count int2 DEFAULT '0' NOT NULL,
|
||||
CONSTRAINT phpbb_posts_pkey PRIMARY KEY (post_id)
|
||||
);
|
||||
CREATE INDEX forum_id_phpbb_posts_index ON phpbb_posts (forum_id);
|
||||
CREATE INDEX post_time_phpbb_posts_index ON phpbb_posts (post_time);
|
||||
CREATE INDEX poster_id_phpbb_posts_index ON phpbb_posts (poster_id);
|
||||
CREATE INDEX topic_id_phpbb_posts_index ON phpbb_posts (topic_id);
|
||||
|
||||
|
||||
/* --------------------------------------------------------
|
||||
Table structure for table phpbb_posts_text
|
||||
-------------------------------------------------------- */
|
||||
CREATE TABLE phpbb_posts_text (
|
||||
post_id int4 DEFAULT '0' NOT NULL,
|
||||
bbcode_uid varchar(10) DEFAULT '' NOT NULL,
|
||||
post_subject varchar(60),
|
||||
post_text text,
|
||||
CONSTRAINT phpbb_posts_text_pkey PRIMARY KEY (post_id)
|
||||
);
|
||||
|
||||
|
||||
/* --------------------------------------------------------
|
||||
Table structure for table phpbb_privmsgs
|
||||
-------------------------------------------------------- */
|
||||
CREATE TABLE phpbb_privmsgs (
|
||||
privmsgs_id int4 DEFAULT nextval('phpbb_privmsgs_id_seq'::text) NOT NULL,
|
||||
privmsgs_type int2 DEFAULT '0' NOT NULL,
|
||||
privmsgs_subject varchar(255) DEFAULT '0' NOT NULL,
|
||||
privmsgs_from_userid int4 DEFAULT '0' NOT NULL,
|
||||
privmsgs_to_userid int4 DEFAULT '0' NOT NULL,
|
||||
privmsgs_date int4 DEFAULT '0' NOT NULL,
|
||||
privmsgs_ip char(8) NOT NULL,
|
||||
privmsgs_enable_bbcode int2 DEFAULT '1' NOT NULL,
|
||||
privmsgs_enable_html int2 DEFAULT '0' NOT NULL,
|
||||
privmsgs_enable_smilies int2 DEFAULT '1' NOT NULL,
|
||||
privmsgs_attach_sig int2 DEFAULT '1' NOT NULL,
|
||||
CONSTRAINT phpbb_privmsgs_pkey PRIMARY KEY (privmsgs_id)
|
||||
);
|
||||
CREATE INDEX privmsgs_from_userid_phpbb_privmsgs_index ON phpbb_privmsgs (privmsgs_from_userid);
|
||||
CREATE INDEX privmsgs_to_userid_phpbb_privmsgs_index ON phpbb_privmsgs (privmsgs_to_userid);
|
||||
|
||||
|
||||
/* --------------------------------------------------------
|
||||
Table structure for table phpbb_privmsgs_text
|
||||
-------------------------------------------------------- */
|
||||
CREATE TABLE phpbb_privmsgs_text (
|
||||
privmsgs_text_id int4 DEFAULT '0' NOT NULL,
|
||||
privmsgs_bbcode_uid char(10) DEFAULT '0' NOT NULL,
|
||||
privmsgs_text text,
|
||||
CONSTRAINT phpbb_privmsgs_text_pkey PRIMARY KEY (privmsgs_text_id)
|
||||
);
|
||||
|
||||
|
||||
/* --------------------------------------------------------
|
||||
Table structure for table phpbb_ranks
|
||||
-------------------------------------------------------- */
|
||||
CREATE TABLE phpbb_ranks (
|
||||
rank_id int4 DEFAULT nextval('phpbb_ranks_id_seq'::text) NOT NULL,
|
||||
rank_title varchar(50) DEFAULT '' NOT NULL,
|
||||
rank_min int4 DEFAULT '0' NOT NULL,
|
||||
rank_special int2 DEFAULT '0',
|
||||
rank_image varchar(255),
|
||||
CONSTRAINT phpbb_ranks_pkey PRIMARY KEY (rank_id)
|
||||
);
|
||||
|
||||
|
||||
/* --------------------------------------------------------
|
||||
Table structure for table phpbb_search_results
|
||||
-------------------------------------------------------- */
|
||||
CREATE TABLE phpbb_search_results (
|
||||
search_id int4 NOT NULL default '0',
|
||||
session_id char(32) NOT NULL default '',
|
||||
search_array text NOT NULL,
|
||||
CONSTRAINT phpbb_search_results_pkey PRIMARY KEY (search_id)
|
||||
);
|
||||
CREATE INDEX session_id_phpbb_search_results_index ON phpbb_search_results (session_id);
|
||||
|
||||
|
||||
/* --------------------------------------------------------
|
||||
Table structure for table phpbb_search_wordlist
|
||||
-------------------------------------------------------- */
|
||||
CREATE TABLE phpbb_search_wordlist (
|
||||
word_id int4 DEFAULT nextval('phpbb_search_wordlist_id_seq'::text) NOT NULL,
|
||||
word_text varchar(50) NOT NULL DEFAULT '',
|
||||
word_common int2 NOT NULL DEFAULT '0',
|
||||
CONSTRAINT phpbb_search_wordlist_pkey PRIMARY KEY (word_text)
|
||||
);
|
||||
CREATE INDEX word_id_phpbb_search_wordlist_index ON phpbb_search_wordlist (word_id);
|
||||
|
||||
|
||||
/* --------------------------------------------------------
|
||||
Table structure for table phpbb_search_wordmatch
|
||||
-------------------------------------------------------- */
|
||||
CREATE TABLE phpbb_search_wordmatch (
|
||||
post_id int4 NOT NULL default '0',
|
||||
word_id int4 NOT NULL default '0',
|
||||
title_match int2 NOT NULL default '0'
|
||||
);
|
||||
CREATE INDEX word_id_phpbb_search_wordmatch_index ON phpbb_search_wordmatch (word_id);
|
||||
CREATE INDEX post_id_phpbb_search_wordmatch_index ON phpbb_search_wordmatch (post_id);
|
||||
|
||||
|
||||
/* --------------------------------------------------------
|
||||
Table structure for table phpbb_sessions
|
||||
-------------------------------------------------------- */
|
||||
CREATE TABLE phpbb_sessions (
|
||||
session_id char(32) DEFAULT '0' NOT NULL,
|
||||
session_user_id int4 DEFAULT '0' NOT NULL,
|
||||
session_start int4 DEFAULT '0' NOT NULL,
|
||||
session_time int4 DEFAULT '0' NOT NULL,
|
||||
session_ip char(8) DEFAULT '0' NOT NULL,
|
||||
session_page int4 DEFAULT '0' NOT NULL,
|
||||
session_logged_in int2 DEFAULT '0' NOT NULL,
|
||||
CONSTRAINT phpbb_session_pkey PRIMARY KEY (session_id)
|
||||
);
|
||||
CREATE INDEX session_user_id_phpbb_sessions_index ON phpbb_sessions (session_user_id);
|
||||
CREATE INDEX session_id_ip_user_id_phpbb_sessions_index ON phpbb_sessions (session_id, session_ip, session_user_id);
|
||||
|
||||
|
||||
/* --------------------------------------------------------
|
||||
Table structure for table phpbb_smilies
|
||||
-------------------------------------------------------- */
|
||||
CREATE TABLE phpbb_smilies (
|
||||
smilies_id int4 DEFAULT nextval('phpbb_smilies_id_seq'::text) NOT NULL,
|
||||
code varchar(50),
|
||||
smile_url varchar(100),
|
||||
emoticon varchar(75),
|
||||
CONSTRAINT phpbb_smilies_pkey PRIMARY KEY (smilies_id)
|
||||
);
|
||||
|
||||
|
||||
/* --------------------------------------------------------
|
||||
Table structure for table phpbb_themes
|
||||
-------------------------------------------------------- */
|
||||
CREATE TABLE phpbb_themes (
|
||||
themes_id int4 DEFAULT nextval('phpbb_themes_id_seq'::text) NOT NULL,
|
||||
style_name varchar(30),
|
||||
template_name varchar(30) NOT NULL DEFAULT '',
|
||||
head_stylesheet varchar(100),
|
||||
body_background varchar(100),
|
||||
body_bgcolor char(6),
|
||||
body_text char(6),
|
||||
body_link char(6),
|
||||
body_vlink char(6),
|
||||
body_alink char(6),
|
||||
body_hlink char(6),
|
||||
tr_color1 char(6),
|
||||
tr_color2 char(6),
|
||||
tr_color3 char(6),
|
||||
tr_class1 varchar(25),
|
||||
tr_class2 varchar(25),
|
||||
tr_class3 varchar(25),
|
||||
th_color1 char(6),
|
||||
th_color2 char(6),
|
||||
th_color3 char(6),
|
||||
th_class1 varchar(25),
|
||||
th_class2 varchar(25),
|
||||
th_class3 varchar(25),
|
||||
td_color1 char(6),
|
||||
td_color2 char(6),
|
||||
td_color3 char(6),
|
||||
td_class1 varchar(25),
|
||||
td_class2 varchar(25),
|
||||
td_class3 varchar(25),
|
||||
fontface1 varchar(50),
|
||||
fontface2 varchar(50),
|
||||
fontface3 varchar(50),
|
||||
fontsize1 int2,
|
||||
fontsize2 int2,
|
||||
fontsize3 int2,
|
||||
fontcolor1 char(6),
|
||||
fontcolor2 char(6),
|
||||
fontcolor3 char(6),
|
||||
span_class1 varchar(25),
|
||||
span_class2 varchar(25),
|
||||
span_class3 varchar(25),
|
||||
img_size_poll int2,
|
||||
img_size_privmsg int2,
|
||||
CONSTRAINT phpbb_themes_pkey PRIMARY KEY (themes_id)
|
||||
);
|
||||
|
||||
|
||||
/* --------------------------------------------------------
|
||||
Table structure for table phpbb_themes_name
|
||||
-------------------------------------------------------- */
|
||||
CREATE TABLE phpbb_themes_name (
|
||||
themes_id int4 DEFAULT '0' NOT NULL,
|
||||
tr_color1_name char(50),
|
||||
tr_color2_name char(50),
|
||||
tr_color3_name char(50),
|
||||
tr_class1_name varchar(50),
|
||||
tr_class2_name varchar(50),
|
||||
tr_class3_name varchar(50),
|
||||
th_color1_name char(50),
|
||||
th_color2_name char(50),
|
||||
th_color3_name char(50),
|
||||
th_class1_name varchar(50),
|
||||
th_class2_name varchar(50),
|
||||
th_class3_name varchar(50),
|
||||
td_color1_name char(50),
|
||||
td_color2_name char(50),
|
||||
td_color3_name char(50),
|
||||
td_class1_name varchar(50),
|
||||
td_class2_name varchar(50),
|
||||
td_class3_name varchar(50),
|
||||
fontface1_name varchar(50),
|
||||
fontface2_name varchar(50),
|
||||
fontface3_name varchar(50),
|
||||
fontsize1_name varchar(50),
|
||||
fontsize2_name varchar(50),
|
||||
fontsize3_name varchar(50),
|
||||
fontcolor1_name char(50),
|
||||
fontcolor2_name char(50),
|
||||
fontcolor3_name char(50),
|
||||
span_class1_name varchar(50),
|
||||
span_class2_name varchar(50),
|
||||
span_class3_name varchar(50),
|
||||
CONSTRAINT phpbb_themes_name_pkey PRIMARY KEY (themes_id)
|
||||
);
|
||||
|
||||
|
||||
/* --------------------------------------------------------
|
||||
Table structure for table phpbb_topics
|
||||
-------------------------------------------------------- */
|
||||
CREATE TABLE phpbb_topics (
|
||||
topic_id int4 DEFAULT nextval('phpbb_topics_id_seq'::text) NOT NULL,
|
||||
forum_id int4 DEFAULT '0' NOT NULL,
|
||||
topic_title varchar(60) DEFAULT '' NOT NULL,
|
||||
topic_poster int4 DEFAULT '0' NOT NULL,
|
||||
topic_time int4 DEFAULT '0' NOT NULL,
|
||||
topic_views int4 DEFAULT '0' NOT NULL,
|
||||
topic_replies int4 DEFAULT '0' NOT NULL,
|
||||
topic_status int2 DEFAULT '0' NOT NULL,
|
||||
topic_vote int2 DEFAULT '0' NOT NULL,
|
||||
topic_type int2 DEFAULT '0' NOT NULL,
|
||||
topic_first_post_id int4 DEFAULT '0' NOT NULL,
|
||||
topic_last_post_id int4 DEFAULT '0' NOT NULL,
|
||||
topic_moved_id int4 DEFAULT '0' NOT NULL,
|
||||
CONSTRAINT phpbb_topics_pkey PRIMARY KEY (topic_id)
|
||||
);
|
||||
CREATE INDEX forum_id_phpbb_topics_index ON phpbb_topics (forum_id);
|
||||
CREATE INDEX topic_moved_id_phpbb_topics_index ON phpbb_topics (topic_moved_id);
|
||||
CREATE INDEX topic_first_post_id_phpbb_topics_index ON phpbb_topics (topic_first_post_id);
|
||||
CREATE INDEX topic_last_post_id_phpbb_topics_index ON phpbb_topics (topic_last_post_id);
|
||||
CREATE INDEX topic_status_phpbb_topics_index ON phpbb_topics (topic_status);
|
||||
CREATE INDEX topic_type_phpbb_topics_index ON phpbb_topics (topic_type);
|
||||
|
||||
|
||||
/* --------------------------------------------------------
|
||||
Table structure for table phpbb_topics_watch
|
||||
-------------------------------------------------------- */
|
||||
CREATE TABLE phpbb_topics_watch (
|
||||
topic_id int4,
|
||||
user_id int4,
|
||||
notify_status int2 NOT NULL default '0'
|
||||
);
|
||||
CREATE INDEX topic_id_phpbb_topics_watch_index ON phpbb_topics_watch (topic_id);
|
||||
CREATE INDEX user_id_phpbb_topics_watch_index ON phpbb_topics_watch (user_id);
|
||||
|
||||
|
||||
/* --------------------------------------------------------
|
||||
Table structure for table phpbb_user_group
|
||||
-------------------------------------------------------- */
|
||||
CREATE TABLE phpbb_user_group (
|
||||
group_id int DEFAULT '0' NOT NULL,
|
||||
user_id int DEFAULT '0' NOT NULL,
|
||||
user_pending int2
|
||||
);
|
||||
CREATE INDEX group_id_phpbb_user_group_index ON phpbb_user_group (group_id);
|
||||
CREATE INDEX user_id_phpbb_user_group_index ON phpbb_user_group (user_id);
|
||||
|
||||
|
||||
/* --------------------------------------------------------
|
||||
Table structure for table phpbb_users
|
||||
-------------------------------------------------------- */
|
||||
CREATE TABLE phpbb_users (
|
||||
user_id int4 DEFAULT nextval('phpbb_users_id_seq'::text) NOT NULL,
|
||||
user_active int2,
|
||||
username varchar(25) DEFAULT '' NOT NULL,
|
||||
user_regdate int4 DEFAULT '0' NOT NULL,
|
||||
user_password varchar(32) DEFAULT '' NOT NULL,
|
||||
user_session_time int4 DEFAULT '0' NOT NULL,
|
||||
user_session_page int2 DEFAULT '0' NOT NULL,
|
||||
user_lastvisit int4 DEFAULT '0' NOT NULL,
|
||||
user_email varchar(255),
|
||||
user_icq varchar(15),
|
||||
user_website varchar(100),
|
||||
user_occ varchar(100),
|
||||
user_from varchar(100),
|
||||
user_interests varchar(255),
|
||||
user_sig text,
|
||||
user_sig_bbcode_uid char(10),
|
||||
user_style int4,
|
||||
user_aim varchar(255),
|
||||
user_yim varchar(255),
|
||||
user_msnm varchar(255),
|
||||
user_posts int4 DEFAULT '0' NOT NULL,
|
||||
user_new_privmsg int2 DEFAULT '0' NOT NULL,
|
||||
user_unread_privmsg int2 DEFAULT '0' NOT NULL,
|
||||
user_last_privmsg int4 DEFAULT '0' NOT NULL,
|
||||
user_emailtime int4,
|
||||
user_viewemail int2,
|
||||
user_attachsig int2,
|
||||
user_allowhtml int2 DEFAULT '1',
|
||||
user_allowbbcode int2 DEFAULT '1',
|
||||
user_allowsmile int2 DEFAULT '1',
|
||||
user_allow_pm int2 DEFAULT '1' NOT NULL,
|
||||
user_allowavatar int2 DEFAULT '1' NOT NULL,
|
||||
user_allow_viewonline int2 DEFAULT '1' NOT NULL,
|
||||
user_rank int4 DEFAULT '0',
|
||||
user_avatar varchar(100),
|
||||
user_avatar_type int2 DEFAULT '0' NOT NULL,
|
||||
user_level int4 DEFAULT '1',
|
||||
user_lang varchar(255),
|
||||
user_timezone decimal(5) DEFAULT '0' NOT NULL,
|
||||
user_dateformat varchar(14) DEFAULT 'd M Y H:m' NOT NULL,
|
||||
user_notify_pm int2 DEFAULT '0' NOT NULL,
|
||||
user_popup_pm int2 DEFAULT '0' NOT NULL,
|
||||
user_notify int2,
|
||||
user_actkey varchar(32),
|
||||
user_newpasswd varchar(32),
|
||||
CONSTRAINT phpbb_users_pkey PRIMARY KEY (user_id)
|
||||
);
|
||||
|
||||
CREATE INDEX user_session_time_phpbb_users_index ON phpbb_users (user_session_time);
|
||||
|
||||
/* --------------------------------------------------------
|
||||
Table structure for table phpbb_vote_desc
|
||||
-------------------------------------------------------- */
|
||||
CREATE TABLE phpbb_vote_desc (
|
||||
vote_id int4 DEFAULT nextval('phpbb_vote_desc_id_seq'::text) NOT NULL ,
|
||||
topic_id int4 NOT NULL DEFAULT '0',
|
||||
vote_text text NOT NULL,
|
||||
vote_start int4 DEFAULT '0' NOT NULL,
|
||||
vote_length int4 DEFAULT '0' NOT NULL,
|
||||
CONSTRAINT phpbb_vote_dsc_pkey PRIMARY KEY (vote_id)
|
||||
);
|
||||
CREATE INDEX topic_id_phpbb_vote_desc_index ON phpbb_vote_desc (topic_id);
|
||||
|
||||
/* --------------------------------------------------------
|
||||
Table structure for table phpbb_vote_results
|
||||
-------------------------------------------------------- */
|
||||
CREATE TABLE phpbb_vote_results (
|
||||
vote_id int4 NOT NULL DEFAULT '0',
|
||||
vote_option_id int4 NOT NULL DEFAULT '0',
|
||||
vote_option_text varchar(255) NOT NULL,
|
||||
vote_result int4 NOT NULL DEFAULT '0'
|
||||
);
|
||||
CREATE INDEX option_id_phpbb_vote_results_index ON phpbb_vote_results (vote_option_id);
|
||||
|
||||
/* --------------------------------------------------------
|
||||
Table structure for table phpbb_vote_voters
|
||||
-------------------------------------------------------- */
|
||||
CREATE TABLE phpbb_vote_voters (
|
||||
vote_id int4 NOT NULL DEFAULT '0',
|
||||
vote_user_id int4 NOT NULL DEFAULT '0',
|
||||
vote_user_ip char(8) NOT NULL
|
||||
);
|
||||
CREATE INDEX vote_id_phpbb_vote_voters_index ON phpbb_vote_voters (vote_id);
|
||||
CREATE INDEX vote_user_id_phpbb_vote_voters_index ON phpbb_vote_voters (vote_user_id);
|
||||
CREATE INDEX vote_user_ip_phpbb_vote_voters_index ON phpbb_vote_voters (vote_user_ip);
|
||||
|
||||
/* --------------------------------------------------------
|
||||
Table structure for table phpbb_words
|
||||
-------------------------------------------------------- */
|
||||
CREATE TABLE phpbb_words (
|
||||
word_id int4 DEFAULT nextval('phpbb_words_id_seq'::text) NOT NULL,
|
||||
word varchar(100) DEFAULT '' NOT NULL,
|
||||
replacement varchar(100) DEFAULT '' NOT NULL,
|
||||
CONSTRAINT phpbb_words_pkey PRIMARY KEY (word_id)
|
||||
);
|
964
phpBB/install/update_to_latest.php
Normal file
964
phpBB/install/update_to_latest.php
Normal file
@@ -0,0 +1,964 @@
|
||||
<?php
|
||||
/***************************************************************************
|
||||
* update_to_xxx.php
|
||||
* -------------------
|
||||
* begin : Wednesday, May 16, 2002
|
||||
* copyright : (C) 2001 The phpBB Group
|
||||
* email : support@phpbb.com
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
function _sql($sql, &$errored, &$error_ary, $echo_dot = true)
|
||||
{
|
||||
global $db;
|
||||
|
||||
if (!($result = $db->sql_query($sql)))
|
||||
{
|
||||
$errored = true;
|
||||
$error_ary['sql'][] = (is_array($sql)) ? $sql[$i] : $sql;
|
||||
$error_ary['error_code'][] = $db->sql_error();
|
||||
}
|
||||
|
||||
if ($echo_dot)
|
||||
{
|
||||
echo ". \n";
|
||||
flush();
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
@set_time_limit(120);
|
||||
|
||||
define('IN_PHPBB', 1);
|
||||
$phpbb_root_path = './../';
|
||||
include($phpbb_root_path . 'extension.inc');
|
||||
include($phpbb_root_path . 'config.'.$phpEx);
|
||||
if(!isset($dbms))
|
||||
{
|
||||
die("Please read: <a href='../docs/INSTALL.html'>INSTALL.html</a> before attempting to update.");
|
||||
}
|
||||
include($phpbb_root_path . 'includes/constants.'.$phpEx);
|
||||
include($phpbb_root_path . 'includes/functions.'.$phpEx);
|
||||
include($phpbb_root_path . 'includes/functions_admin.'.$phpEx);
|
||||
include($phpbb_root_path . 'includes/functions_search.'.$phpEx);
|
||||
include($phpbb_root_path . 'includes/db.'.$phpEx);
|
||||
|
||||
|
||||
//
|
||||
//
|
||||
//
|
||||
$updates_to_version = '.0.13';
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
?>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html;">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
|
||||
font,th,td,p,body { font-family: "Courier New", courier; font-size: 11pt }
|
||||
|
||||
a:link,a:active,a:visited { color : #006699; }
|
||||
a:hover { text-decoration: underline; color : #DD6900;}
|
||||
|
||||
hr { height: 0px; border: solid #D1D7DC 0px; border-top-width: 1px;}
|
||||
|
||||
.maintitle,h1,h2 {font-weight: bold; font-size: 22px; font-family: "Trebuchet MS",Verdana, Arial, Helvetica, sans-serif; text-decoration: none; line-height : 120%; color : #000000;}
|
||||
|
||||
.ok {color:green}
|
||||
|
||||
/* Import the fancy styles for IE only (NS4.x doesn't use the @import function) */
|
||||
@import url("../templates/subSilver/formIE.css");
|
||||
-->
|
||||
</style>
|
||||
</head>
|
||||
<body bgcolor="#FFFFFF" text="#000000" link="#006699" vlink="#5584AA">
|
||||
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="10" align="center">
|
||||
<tr>
|
||||
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><img src="../templates/subSilver/images/logo_phpBB.gif" border="0" alt="Forum Home" vspace="1" /></td>
|
||||
<td align="center" width="100%" valign="middle"><span class="maintitle">Updating to latest stable release</span></td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br clear="all" />
|
||||
|
||||
<h2>Information</h2>
|
||||
|
||||
<?php
|
||||
|
||||
echo '<p>Database type :: <b>' . SQL_LAYER . '</b><br />';
|
||||
|
||||
$sql = "SELECT config_value
|
||||
FROM " . CONFIG_TABLE . "
|
||||
WHERE config_name = 'version'";
|
||||
if (!($result = $db->sql_query($sql)))
|
||||
{
|
||||
die("Couldn't obtain version info");
|
||||
}
|
||||
|
||||
$row = $db->sql_fetchrow($result);
|
||||
|
||||
$sql = array();
|
||||
|
||||
switch ($row['config_value'])
|
||||
{
|
||||
case '':
|
||||
echo 'Previous version :: <b>< RC-3</b></p><br />';
|
||||
break;
|
||||
case 'RC-3':
|
||||
echo 'Previous version :: <b>RC-3</b></p><br />';
|
||||
break;
|
||||
case 'RC-4':
|
||||
echo 'Previous version :: <b>RC-4</b></p><br />';
|
||||
break;
|
||||
default:
|
||||
echo 'Previous version :: <b>2' . $row['config_value'] . '</b><br />';
|
||||
break;
|
||||
}
|
||||
|
||||
echo 'Updated version :: <b>2' . $updates_to_version . '</b></p>' ."\n";
|
||||
|
||||
//
|
||||
// Schema updates
|
||||
//
|
||||
switch ($row['config_value'])
|
||||
{
|
||||
case '':
|
||||
switch (SQL_LAYER)
|
||||
{
|
||||
case 'mysql':
|
||||
case 'mysql4':
|
||||
$sql[] = "ALTER TABLE " . USERS_TABLE . " DROP
|
||||
COLUMN user_autologin_key";
|
||||
|
||||
$sql[] = "ALTER TABLE " . RANKS_TABLE . " DROP
|
||||
COLUMN rank_max";
|
||||
|
||||
$sql[] = "ALTER TABLE " . USERS_TABLE . "
|
||||
ADD COLUMN user_session_time int(11) DEFAULT '0' NOT NULL,
|
||||
ADD COLUMN user_session_page smallint(5) DEFAULT '0' NOT NULL,
|
||||
ADD INDEX (user_session_time)";
|
||||
$sql[] = "ALTER TABLE " . SEARCH_TABLE . "
|
||||
MODIFY search_id int(11) NOT NULL";
|
||||
|
||||
$sql[] = "ALTER TABLE " . TOPICS_TABLE . "
|
||||
MODIFY topic_moved_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
ADD COLUMN topic_first_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
ADD INDEX (topic_first_post_id)";
|
||||
|
||||
$sql[] = "ALTER TABLE " . THEMES_NAME_TABLE . "
|
||||
ADD COLUMN tr_class1_name varchar(50) NULL,
|
||||
ADD COLUMN tr_class2_name varchar(50) NULL,
|
||||
ADD COLUMN tr_class3_name varchar(50) NULL,
|
||||
ADD COLUMN th_class1_name varchar(50) NULL,
|
||||
ADD COLUMN th_class2_name varchar(50) NULL,
|
||||
ADD COLUMN th_class3_name varchar(50) NULL,
|
||||
ADD COLUMN td_class1_name varchar(50) NULL,
|
||||
ADD COLUMN td_class2_name varchar(50) NULL,
|
||||
ADD COLUMN td_class3_name varchar(50) NULL,
|
||||
ADD COLUMN span_class1_name varchar(50) NULL,
|
||||
ADD COLUMN span_class2_name varchar(50) NULL,
|
||||
ADD COLUMN span_class3_name varchar(50) NULL";
|
||||
break;
|
||||
case 'postgresql':
|
||||
$sql[] = "ALTER TABLE " . USERS_TABLE . "
|
||||
ADD COLUMN user_session_time int4";
|
||||
$sql[] = "ALTER TABLE " . USERS_TABLE . "
|
||||
ADD COLUMN user_session_page int2";
|
||||
$sql[] = "ALTER TABLE " . USERS_TABLE . "
|
||||
ALTER COLUMN user_session_time SET DEFAULT '0'";
|
||||
$sql[] = "ALTER TABLE " . USERS_TABLE . "
|
||||
ALTER COLUMN user_session_page SET DEFAULT '0'";
|
||||
$sql[] = "CREATE INDEX user_session_time_" . $table_prefix . "users_index
|
||||
ON " . USERS_TABLE . " (user_session_time)";
|
||||
|
||||
$sql[] = "ALTER TABLE " . TOPICS_TABLE . "
|
||||
ADD COLUMN topic_first_post_id int4";
|
||||
$sql[] = "CREATE INDEX topic_first_post_id_" . $table_prefix . "topics_index
|
||||
ON " . TOPICS_TABLE . " (topic_first_post_id)";
|
||||
|
||||
$sql[] = "ALTER TABLE " . THEMES_NAME_TABLE . "
|
||||
ADD COLUMN tr_class1_name varchar(50) NULL";
|
||||
$sql[] = "ALTER TABLE " . THEMES_NAME_TABLE . "
|
||||
ADD COLUMN tr_class2_name varchar(50) NULL";
|
||||
$sql[] = "ALTER TABLE " . THEMES_NAME_TABLE . "
|
||||
ADD COLUMN tr_class3_name varchar(50) NULL";
|
||||
$sql[] = "ALTER TABLE " . THEMES_NAME_TABLE . "
|
||||
ADD COLUMN th_class1_name varchar(50) NULL";
|
||||
$sql[] = "ALTER TABLE " . THEMES_NAME_TABLE . "
|
||||
ADD COLUMN th_class2_name varchar(50) NULL";
|
||||
$sql[] = "ALTER TABLE " . THEMES_NAME_TABLE . "
|
||||
ADD COLUMN th_class3_name varchar(50) NULL";
|
||||
$sql[] = "ALTER TABLE " . THEMES_NAME_TABLE . "
|
||||
ADD COLUMN td_class1_name varchar(50) NULL";
|
||||
$sql[] = "ALTER TABLE " . THEMES_NAME_TABLE . "
|
||||
ADD COLUMN td_class2_name varchar(50) NULL";
|
||||
$sql[] = "ALTER TABLE " . THEMES_NAME_TABLE . "
|
||||
ADD COLUMN td_class3_name varchar(50) NULL";
|
||||
$sql[] = "ALTER TABLE " . THEMES_NAME_TABLE . "
|
||||
ADD COLUMN span_class1_name varchar(50) NULL";
|
||||
$sql[] = "ALTER TABLE " . THEMES_NAME_TABLE . "
|
||||
ADD COLUMN span_class2_name varchar(50) NULL";
|
||||
$sql[] = "ALTER TABLE " . THEMES_NAME_TABLE . "
|
||||
ADD COLUMN span_class3_name varchar(50) NULL";
|
||||
break;
|
||||
|
||||
case 'mssql-odbc':
|
||||
case 'mssql':
|
||||
$sql[] = "ALTER TABLE " . USERS_TABLE . " DROP
|
||||
COLUMN user_autologin_key";
|
||||
|
||||
$sql[] = "ALTER TABLE " . USERS_TABLE . " ADD
|
||||
user_session_time int NOT NULL,
|
||||
user_session_page smallint NOT NULL,
|
||||
CONSTRAINT [DF_" . $table_prefix . "users_user_session_time] DEFAULT (0) FOR [user_session_time],
|
||||
CONSTRAINT [DF_" . $table_prefix . "users_user_session_page] DEFAULT (0) FOR [user_session_page]";
|
||||
$sql[] = "CREATE INDEX [IX_" . $table_prefix . "users]
|
||||
ON [" . USERS_TABLE . "]([user_session_time]) ON [PRIMARY]";
|
||||
|
||||
/* ---------------------------------------------------------------------
|
||||
DROP FORUM TABLE -- if this may cause you problems you can safely
|
||||
comment it out, remember to manually remove the IDENTITY setting on
|
||||
the forum_id column
|
||||
--------------------------------------------------------------------- */
|
||||
$sql [] = "ALTER TABLE " . FORUMS_TABLE . " DROP
|
||||
CONSTRAINT [DF_" . $table_prefix . "forums_forum_posts],
|
||||
CONSTRAINT [DF_" . $table_prefix . "forums_forum_topics],
|
||||
CONSTRAINT [DF_" . $table_prefix . "forums_forum_last_post_id],
|
||||
CONSTRAINT [DF_" . $table_prefix . "forums_prune_enable],
|
||||
CONSTRAINT [DF_" . $table_prefix . "forums_auth_view],
|
||||
CONSTRAINT [DF_" . $table_prefix . "forums_auth_read],
|
||||
CONSTRAINT [DF_" . $table_prefix . "forums_auth_post],
|
||||
CONSTRAINT [DF_" . $table_prefix . "forums_auth_reply],
|
||||
CONSTRAINT [DF_" . $table_prefix . "forums_auth_edit],
|
||||
CONSTRAINT [DF_" . $table_prefix . "forums_auth_delete],
|
||||
CONSTRAINT [DF_" . $table_prefix . "forums_auth_sticky],
|
||||
CONSTRAINT [DF_" . $table_prefix . "forums_auth_announce],
|
||||
CONSTRAINT [DF_" . $table_prefix . "forums_auth_vote],
|
||||
CONSTRAINT [DF_" . $table_prefix . "forums_auth_pollcreate],
|
||||
CONSTRAINT [DF_" . $table_prefix . "forums_auth_attachments]";
|
||||
$sql[] = "CREATE TABLE Tmp_" . FORUMS_TABLE . "
|
||||
(forum_id int NOT NULL, cat_id int NOT NULL, forum_name varchar(100) NOT NULL, forum_desc varchar(255) NULL, forum_status smallint NOT NULL, forum_order int NOT NULL, forum_posts int NOT NULL, forum_topics smallint NOT NULL, forum_last_post_id int NOT NULL, prune_next int NULL, prune_enable smallint NOT NULL, auth_view smallint NOT NULL, auth_read smallint NOT NULL, auth_post smallint NOT NULL, auth_reply smallint NOT NULL, auth_edit smallint NOT NULL, auth_delete smallint NOT NULL, auth_sticky smallint NOT NULL, auth_announce smallint NOT NULL, auth_vote smallint NOT NULL, auth_pollcreate smallint NOT NULL, auth_attachments smallint NOT NULL) ON [PRIMARY]";
|
||||
$sql[] = "ALTER TABLE [Tmp_" . FORUMS_TABLE . "] WITH NOCHECK ADD
|
||||
CONSTRAINT [DF_" . $table_prefix . "forums_forum_posts] DEFAULT (0) FOR [forum_posts],
|
||||
CONSTRAINT [DF_" . $table_prefix . "forums_forum_topics] DEFAULT (0) FOR [forum_topics],
|
||||
CONSTRAINT [DF_" . $table_prefix . "forums_forum_last_post_id] DEFAULT (0) FOR [forum_last_post_id],
|
||||
CONSTRAINT [DF_" . $table_prefix . "forums_prune_enable] DEFAULT (0) FOR [prune_enable],
|
||||
CONSTRAINT [DF_" . $table_prefix . "forums_auth_view] DEFAULT (0) FOR [auth_view],
|
||||
CONSTRAINT [DF_" . $table_prefix . "forums_auth_read] DEFAULT (0) FOR [auth_read],
|
||||
CONSTRAINT [DF_" . $table_prefix . "forums_auth_post] DEFAULT (0) FOR [auth_post],
|
||||
CONSTRAINT [DF_" . $table_prefix . "forums_auth_reply] DEFAULT (0) FOR [auth_reply],
|
||||
CONSTRAINT [DF_" . $table_prefix . "forums_auth_edit] DEFAULT (0) FOR [auth_edit],
|
||||
CONSTRAINT [DF_" . $table_prefix . "forums_auth_delete] DEFAULT (0) FOR [auth_delete],
|
||||
CONSTRAINT [DF_" . $table_prefix . "forums_auth_sticky] DEFAULT (0) FOR [auth_sticky],
|
||||
CONSTRAINT [DF_" . $table_prefix . "forums_auth_announce] DEFAULT (0) FOR [auth_announce],
|
||||
CONSTRAINT [DF_" . $table_prefix . "forums_auth_vote] DEFAULT (0) FOR [auth_vote],
|
||||
CONSTRAINT [DF_" . $table_prefix . "forums_auth_pollcreate] DEFAULT (0) FOR [auth_pollcreate],
|
||||
CONSTRAINT [DF_" . $table_prefix . "forums_auth_attachments] DEFAULT (0) FOR [auth_attachments]";
|
||||
$sql[] = "INSERT INTO Tmp_" . FORUMS_TABLE . " (forum_id, cat_id, forum_name, forum_desc, forum_status, forum_order, forum_posts, forum_topics, forum_last_post_id, prune_next, prune_enable, auth_view, auth_read, auth_post, auth_reply, auth_edit, auth_delete, auth_sticky, auth_announce, auth_vote, auth_pollcreate, auth_attachments)
|
||||
SELECT forum_id, cat_id, forum_name, forum_desc, forum_status, forum_order, forum_posts, forum_topics, forum_last_post_id, prune_next, prune_enable, auth_view, auth_read, auth_post, auth_reply, auth_edit, auth_delete, auth_sticky, auth_announce, auth_vote, auth_pollcreate, auth_attachments FROM " . FORUMS_TABLE . " TABLOCKX";
|
||||
$sql[] = "DROP TABLE " . FORUMS_TABLE;
|
||||
$sql[] = "EXECUTE sp_rename N'Tmp_" . FORUMS_TABLE . "', N'" . FORUMS_TABLE . "', 'OBJECT'";
|
||||
$sql[] = "ALTER TABLE " . FORUMS_TABLE . " ADD
|
||||
CONSTRAINT [PK_" . $table_prefix . "forums] PRIMARY KEY CLUSTERED (forum_id) ON [PRIMARY]";
|
||||
$sql[] = "CREATE NONCLUSTERED INDEX [IX_" . $table_prefix . "forums]
|
||||
ON " . FORUMS_TABLE . " (cat_id, forum_order, forum_last_post_id) ON [PRIMARY]";
|
||||
/* --------------------------------------------------------------
|
||||
END OF DROP FORUM -- don't remove anything after this point!
|
||||
-------------------------------------------------------------- */
|
||||
|
||||
$sql[] = "DROP INDEX " . RANKS_TABLE . ".IX_" . $table_prefix . "ranks";
|
||||
$sql[] = "ALTER TABLE " . RANKS_TABLE . " DROP
|
||||
COLUMN rank_max";
|
||||
$sql[] = "CREATE INDEX [IX_" . $table_prefix . "ranks]
|
||||
ON [" . RANKS_TABLE . "]([rank_min], [rank_special]) ON [PRIMARY]";
|
||||
|
||||
$sql[] = "DROP INDEX " . TOPICS_TABLE . ".IX_" . $table_prefix . "topics";
|
||||
$sql[] = "ALTER TABLE " . TOPICS_TABLE . " ADD
|
||||
topic_first_post_id int NULL,
|
||||
CONSTRAINT [DF_" . $table_prefix . "topics_topic_first_post_id] FOR [topic_first_post_id]";
|
||||
$sql[] = "CREATE INDEX [IX_" . $table_prefix . "topics]
|
||||
ON [" . TOPICS_TABLE . "]([forum_id], [topic_type], [topic_first_post_id], [topic_last_post_id]) ON [PRIMARY]";
|
||||
|
||||
$sql[] = "ALTER TABLE " . SEARCH_WORD_TABLE . " DROP
|
||||
CONSTRAINT [PK_" . $table_prefix . "search_wordlist]";
|
||||
$sql[] = "CREATE UNIQUE INDEX [IX_" . $table_prefix . "search_wordlist]
|
||||
ON [" . SEARCH_WORD_TABLE . "]([word_text]) WITH IGNORE_DUP_KEY ON [PRIMARY]";
|
||||
$sql[] = "CREATE INDEX [IX_" . $table_prefix . "search_wordlist_1]
|
||||
ON [" . SEARCH_WORD_TABLE . "]([word_common]) ON [PRIMARY]";
|
||||
|
||||
$sql[] = "CREATE INDEX [IX_" . $table_prefix . "search_wordmatch_1]
|
||||
ON [" . SEARCH_MATCH_TABLE . "]([word_id]) ON [PRIMARY]";
|
||||
|
||||
$sql[] = "ALTER TABLE " . THEMES_NAME_TABLE . " ADD
|
||||
tr_class1_name varchar(50) NULL,
|
||||
tr_class2_name varchar(50) NULL,
|
||||
tr_class3_name varchar(50) NULL,
|
||||
th_class1_name varchar(50) NULL,
|
||||
th_class2_name varchar(50) NULL,
|
||||
th_class3_name varchar(50) NULL,
|
||||
td_class1_name varchar(50) NULL,
|
||||
td_class2_name varchar(50) NULL,
|
||||
td_class3_name varchar(50) NULL,
|
||||
span_class1_name varchar(50) NULL,
|
||||
span_class2_name varchar(50) NULL,
|
||||
span_class3_name varchar(50) NULL";
|
||||
break;
|
||||
|
||||
case 'msaccess':
|
||||
$sql[] = "ALTER TABLE " . USERS_TABLE . " DROP
|
||||
COLUMN user_autologin_key";
|
||||
|
||||
$sql[] = "ALTER TABLE " . USERS_TABLE . " ADD
|
||||
user_session_time int NOT NULL,
|
||||
user_session_page smallint NOT NULL";
|
||||
$sql[] = "CREATE INDEX user_session_time
|
||||
ON " . USERS_TABLE . " (user_session_time)";
|
||||
|
||||
$sql[] = "ALTER TABLE " . TOPICS_TABLE . " ADD
|
||||
topic_first_post_id int NULL";
|
||||
$sql[] = "CREATE INDEX topic_first_post_id
|
||||
ON " . TOPICS_TABLE . " (topic_first_post_id)";
|
||||
|
||||
$sql[] = "ALTER TABLE " . THEMES_NAME_TABLE . " ADD
|
||||
tr_class1_name varchar(50) NULL,
|
||||
tr_class2_name varchar(50) NULL,
|
||||
tr_class3_name varchar(50) NULL,
|
||||
th_class1_name varchar(50) NULL,
|
||||
th_class2_name varchar(50) NULL,
|
||||
th_class3_name varchar(50) NULL,
|
||||
td_class1_name varchar(50) NULL,
|
||||
td_class2_name varchar(50) NULL,
|
||||
td_class3_name varchar(50) NULL,
|
||||
span_class1_name varchar(50) NULL,
|
||||
span_class2_name varchar(50) NULL,
|
||||
span_class3_name varchar(50) NULL";
|
||||
break;
|
||||
|
||||
default:
|
||||
die("No DB LAYER found!");
|
||||
break;
|
||||
}
|
||||
|
||||
case 'RC-3':
|
||||
case 'RC-4':
|
||||
case '.0.0':
|
||||
switch (SQL_LAYER)
|
||||
{
|
||||
case 'mysql':
|
||||
case 'mysql4':
|
||||
$sql[] = "ALTER TABLE " . USERS_TABLE . "
|
||||
MODIFY COLUMN user_id mediumint(8) NOT NULL,
|
||||
MODIFY COLUMN user_timezone decimal(5,2) DEFAULT '0' NOT NULL";
|
||||
break;
|
||||
case 'postgresql':
|
||||
$sql[] = "ALTER TABLE " . USERS_TABLE . "
|
||||
RENAME COLUMN user_timezone TO user_timezone_old";
|
||||
$sql[] = "ALTER TABLE " . USERS_TABLE . "
|
||||
ADD COLUMN user_timezone decimal(5)";
|
||||
break;
|
||||
case 'mssql':
|
||||
case 'mssql-odbc':
|
||||
$sql[] = "ALTER TABLE " . USERS_TABLE . "
|
||||
ALTER COLUMN [user_timezone] [decimal] (5,2) NOT NULL";
|
||||
break;
|
||||
}
|
||||
|
||||
case '.0.1':
|
||||
switch (SQL_LAYER)
|
||||
{
|
||||
case 'mysql':
|
||||
case 'mysql4':
|
||||
$sql[] = "ALTER TABLE " . GROUPS_TABLE . "
|
||||
MODIFY COLUMN group_id mediumint(8) NOT NULL auto_increment";
|
||||
break;
|
||||
case 'mssql':
|
||||
case 'mssql-odbc':
|
||||
/* ---------------------------------------------------------------------
|
||||
DROP GROUP TABLE -- if this may cause you problems you can safely
|
||||
comment it out, remember to manually add the IDENTITY setting on
|
||||
the group_id column
|
||||
--------------------------------------------------------------------- */
|
||||
$sql[] = "CREATE TABLE Tmp_" . GROUPS_TABLE . "
|
||||
(group_id int IDENTITY (1, 1) NOT NULL, group_type smallint NULL, group_name varchar(50) NOT NULL, group_description varchar(255) NOT NULL, group_moderator int NULL, group_single_user smallint NOT NULL) ON [PRIMARY]";
|
||||
$sql[] = "SET IDENTITY_INSERT " . GROUPS_TABLE . " ON";
|
||||
$sql[] = "INSERT INTO Tmp_" . GROUPS_TABLE . " (group_id, group_type, group_name, group_description, group_moderator, group_single_user)
|
||||
SELECT group_id, group_type, group_name, group_description, group_moderator, group_single_user FROM " . GROUPS_TABLE . " TABLOCKX";
|
||||
$sql[] = "SET IDENTITY_INSERT " . GROUPS_TABLE . " OFF";
|
||||
$sql[] = "DROP TABLE " . GROUPS_TABLE;
|
||||
$sql[] = "EXECUTE sp_rename N'Tmp_" . GROUPS_TABLE . "', N'" . GROUPS_TABLE . "', 'OBJECT'";
|
||||
$sql[] = "ALTER TABLE " . GROUPS_TABLE . " ADD
|
||||
CONSTRAINT [PK_" . $table_prefix . "groups] PRIMARY KEY CLUSTERED (group_id) ON [PRIMARY]";
|
||||
$sql[] = "CREATE INDEX [IX_" . $table_prefix . "groups]
|
||||
ON " . GROUPS_TABLE . " (group_single_user) ON [PRIMARY]";
|
||||
/* --------------------------------------------------------------
|
||||
END OF DROP GROUP -- don't remove anything after this point!
|
||||
-------------------------------------------------------------- */
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
case '.0.3':
|
||||
|
||||
switch (SQL_LAYER)
|
||||
{
|
||||
case 'mysql':
|
||||
case 'mysql4':
|
||||
// Add indexes to post_id in search match table (+ word_id for MS Access)
|
||||
$sql[] = "ALTER TABLE " . SEARCH_MATCH_TABLE . "
|
||||
ADD INDEX post_id (post_id)";
|
||||
|
||||
// Modify user_timezone to decimal(5,2) for mysql ... mysql4/mssql/pgsql/msaccess
|
||||
// should be completely unaffected
|
||||
// Change default user_notify to 0
|
||||
$sql[] = "ALTER TABLE " . USERS_TABLE . "
|
||||
MODIFY COLUMN user_timezone decimal(5,2) DEFAULT '0' NOT NULL,
|
||||
MODIFY COLUMN user_notify tinyint(1) DEFAULT '0' NOT NULL";
|
||||
|
||||
// Adjust field type for prune_days, prune_freq ... was too small
|
||||
$sql[] = "ALTER TABLE " . PRUNE_TABLE . "
|
||||
MODIFY COLUMN prune_days smallint(5) UNSIGNED NOT NULL,
|
||||
MODIFY COLUMN prune_freq smallint(5) UNSIGNED NOT NULL";
|
||||
break;
|
||||
|
||||
case 'msaccess':
|
||||
// Add indexes to post_id in search match table (+ word_id for MS Access)
|
||||
$sql[] = "CREATE INDEX " . SEARCH_MATCH_TABLE . "
|
||||
ON " . SEARCH_MATCH_TABLE . " ([post_id])";
|
||||
$sql[] = "CREATE INDEX " . SEARCH_MATCH_TABLE . "_1
|
||||
ON " . SEARCH_MATCH_TABLE . " ([word_id])";
|
||||
break;
|
||||
|
||||
case 'postgresql':
|
||||
// Add indexes to post_id in search match table (+ word_id for MS Access)
|
||||
$sql[] = "CREATE INDEX post_id_" . SEARCH_MATCH_TABLE . "
|
||||
ON " . SEARCH_MATCH_TABLE . " (post_id)";
|
||||
|
||||
// Regenerate groups table with incremented group_id for pgsql
|
||||
// ... missing in 2.0.3 ...
|
||||
$sql[] = "CREATE SEQUENCE " . GROUPS_TABLE . "_id_seq start 3 increment 1 maxvalue 2147483647 minvalue 1 cache 1";
|
||||
$sql[] = "CREATE TABLE tmp_" . GROUPS_TABLE . "
|
||||
AS SELECT group_id, group_name, group_type, group_description, group_moderator, group_single_user
|
||||
FROM " . GROUPS_TABLE;
|
||||
$sql[] = "DROP TABLE " . GROUPS_TABLE;
|
||||
$sql[] = "CREATE TABLE phpbb_groups (group_id int DEFAULT nextval('" . GROUPS_TABLE . "_id_seq'::text) NOT NULL, group_name varchar(40) NOT NULL, group_type int2 DEFAULT '1' NOT NULL, group_description varchar(255) NOT NULL, group_moderator int4 DEFAULT '0' NOT NULL, group_single_user int2 DEFAULT '0' NOT NULL, CONSTRAINT phpbb_groups_pkey PRIMARY KEY (group_id))";
|
||||
$sql[] = "INSERT INTO " . GROUPS_TABLE . " (group_id, group_name, group_type, group_description, group_moderator, group_single_user)
|
||||
SELECT group_id, group_name, group_type, group_description, group_moderator, group_single_user
|
||||
FROM tmp_" . GROUPS_TABLE;
|
||||
$sql[] = "DROP TABLE tmp_" . GROUPS_TABLE;
|
||||
break;
|
||||
}
|
||||
|
||||
case '.0.4':
|
||||
|
||||
switch (SQL_LAYER)
|
||||
{
|
||||
case 'mssql':
|
||||
case 'mssql-odbc':
|
||||
// Add missing defaults to MSSQL post table schema, failed in previous updates
|
||||
$sql[] = "ALTER TABLE [" . POSTS_TABLE . "] WITH NOCHECK ADD
|
||||
CONSTRAINT [DF_" . POSTS_TABLE . "_enable_bbcode] DEFAULT (1) FOR [enable_bbcode],
|
||||
CONSTRAINT [DF_" . POSTS_TABLE . "_enable_html] DEFAULT (0) FOR [enable_html],
|
||||
CONSTRAINT [DF_" . POSTS_TABLE . "_enable_smilies] DEFAULT (1) FOR [enable_smilies],
|
||||
CONSTRAINT [DF_" . POSTS_TABLE . "_enable_sig] DEFAULT (1) FOR [enable_sig],
|
||||
CONSTRAINT [DF_" . POSTS_TABLE . "_post_edit_count] DEFAULT (0) FOR [post_edit_count]";
|
||||
break;
|
||||
}
|
||||
|
||||
// Add tables for visual confirmation ... saves me the trouble of writing a seperate
|
||||
// script :D
|
||||
switch (SQL_LAYER)
|
||||
{
|
||||
case 'mysql':
|
||||
case 'mysql4':
|
||||
$sql[] = 'CREATE TABLE ' . $table_prefix . 'confirm (confirm_id char(32) DEFAULT \'\' NOT NULL, session_id char(32) DEFAULT \'\' NOT NULL, code char(6) DEFAULT \'\' NOT NULL, PRIMARY KEY (session_id, confirm_id))';
|
||||
break;
|
||||
|
||||
case 'mssql':
|
||||
case 'mssql-odbc':
|
||||
$sql[] = 'CREATE TABLE [' . $table_prefix . 'confirm] ([confirm_id] [char] (32) NOT NULL , [session_id] [char] (32) NOT NULL , [code] [char] (6) NOT NULL ) ON [PRIMARY]';
|
||||
$sql[] = 'ALTER TABLE [' . $table_prefix . 'confirm] WITH NOCHECK ADD CONSTRAINT [PK_' . $table_prefix . 'confirm] PRIMARY KEY CLUSTERED ( [session_id],[confirm_id]) ON [PRIMARY]';
|
||||
$sql[] = 'ALTER TABLE [' . $table_prefix . 'confirm] WITH NOCHECK ADD CONSTRAINT [DF_' . $table_prefix . 'confirm_confirm_id] DEFAULT (\'\') FOR [confirm_id], CONSTRAINT [DF_' . $table_prefix . 'confirm_session_id] DEFAULT (\'\') FOR [session_id], CONSTRAINT [DF_' . $table_prefix . 'confirm_code] DEFAULT (\'\') FOR [code]';
|
||||
break;
|
||||
|
||||
case 'msaccess':
|
||||
$sql[] = 'CREATE TABLE ' . $table_prefix . 'confirm (confirm_id char(32) NOT NULL, session_id char(32) NOT NULL, code char(6) NOT NULL)';
|
||||
$sql[] = 'ALTER TABLE ' . $table_prefix . 'confirm ADD (PRIMARY KEY (session_id, confirm_id))';
|
||||
break;
|
||||
|
||||
case 'postgresql':
|
||||
$sql[] = 'CREATE TABLE ' . $table_prefix . 'confirm (confirm_id char(32) DEFAULT \'\' NOT NULL, session_id char(32) DEFAULT \'\' NOT NULL, code char(6) DEFAULT \'\' NOT NULL, CONSTRAINT phpbb_confirm_pkey PRIMARY KEY (session_id, confirm_id))';
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
echo "<h2>Updating database schema</h2>\n";
|
||||
echo "<p>Progress :: <b>";
|
||||
flush();
|
||||
|
||||
$error_ary = array();
|
||||
$errored = false;
|
||||
if (count($sql))
|
||||
{
|
||||
for ($i = 0; $i < count($sql); $i++)
|
||||
{
|
||||
_sql($sql[$i], $errored, $error_ary);
|
||||
}
|
||||
|
||||
echo "</b> <b class=\"ok\">Done</b><br />Result :: \n";
|
||||
|
||||
if ($errored)
|
||||
{
|
||||
echo " <b>Some queries failed, the statements and errors are listing below</b>\n<ul>";
|
||||
|
||||
for ($i = 0; $i < count($error_ary['sql']); $i++)
|
||||
{
|
||||
echo "<li>Error :: <b>" . $error_ary['error_code'][$i]['message'] . "</b><br />";
|
||||
echo "SQL :: <b>" . $error_ary['sql'][$i] . "</b><br /><br /></li>";
|
||||
}
|
||||
|
||||
echo "</ul>\n<p>This is probably nothing to worry about, update will continue. Should this fail to complete you may need to seek help at our development board. See <a href=\"docs\README.html\">README</a> for details on how to obtain advice.</p>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<b>No errors</b>\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo " No updates required</b></p>\n";
|
||||
}
|
||||
|
||||
//
|
||||
// Data updates
|
||||
//
|
||||
unset($sql);
|
||||
$error_ary = array();
|
||||
$errored = false;
|
||||
|
||||
echo "<h2>Updating data</h2>\n";
|
||||
echo "<p>Progress :: <b>";
|
||||
flush();
|
||||
|
||||
switch ($row['config_value'])
|
||||
{
|
||||
case '':
|
||||
$sql = "SELECT themes_id
|
||||
FROM " . THEMES_TABLE . "
|
||||
WHERE template_name = 'subSilver'";
|
||||
$result = _sql($sql, $errored, $error_ary);
|
||||
|
||||
if ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$theme_id = $row['themes_id'];
|
||||
|
||||
$sql = "UPDATE " . THEMES_TABLE . "
|
||||
SET head_stylesheet = 'subSilver.css', body_background = '', body_bgcolor = 'E5E5E5', body_text = '000000', body_link = '006699', body_vlink = '5493B4', body_alink = '', body_hlink = 'DD6900', tr_color1 = 'EFEFEF', tr_color2 = 'DEE3E7', tr_color3 = 'D1D7DC', tr_class1 = '', tr_class2 = '', tr_class3 = '', th_color1 = '98AAB1', th_color2 = '006699', th_color3 = 'FFFFFF', th_class1 = 'cellpic1.gif', th_class2 = 'cellpic3.gif', th_class3 = 'cellpic2.jpg', td_color1 = 'FAFAFA', td_color2 = 'FFFFFF', td_color3 = '', td_class1 = 'row1', td_class2 = 'row2', td_class3 = '', fontface1 = 'Verdana, Arial, Helvetica, sans-serif', fontface2 = 'Trebuchet MS', fontface3 = 'Courier, ''Courier New'', sans-serif', fontsize1 = 10, fontsize2 = 11, fontsize3 = 12, fontcolor1 = '444444', fontcolor2 = '006600', fontcolor3 = 'FFA34F', span_class1 = '', span_class2 = '', span_class3 = ''
|
||||
WHERE themes_id = $theme_id";
|
||||
_sql($sql, $errored, $error_ary);
|
||||
|
||||
$sql = "DELETE FROM " . THEMES_NAME_TABLE . "
|
||||
WHERE themes_id = $theme_id";
|
||||
_sql($sql, $errored, $error_ary);
|
||||
|
||||
$sql = "INSERT INTO " . THEMES_NAME_TABLE . " (themes_id, tr_color1_name, tr_color2_name, tr_color3_name, tr_class1_name, tr_class2_name, tr_class3_name, th_color1_name, th_color2_name, th_color3_name, th_class1_name, th_class2_name, th_class3_name, td_color1_name, td_color2_name, td_color3_name, td_class1_name, td_class2_name, td_class3_name, fontface1_name, fontface2_name, fontface3_name, fontsize1_name, fontsize2_name, fontsize3_name, fontcolor1_name, fontcolor2_name, fontcolor3_name, span_class1_name, span_class2_name, span_class3_name)
|
||||
VALUES ($theme_id, 'The lightest row colour', 'The medium row color', 'The darkest row colour', '', '', '', 'Border round the whole page', 'Outer table border', 'Inner table border', 'Silver gradient picture', 'Blue gradient picture', 'Fade-out gradient on index', 'Background for quote boxes', 'All white areas', '', 'Background for topic posts', '2nd background for topic posts', '', 'Main fonts', 'Additional topic title font', 'Form fonts', 'Smallest font size', 'Medium font size', 'Normal font size (post body etc)', 'Quote & copyright text', 'Code text colour', 'Main table header text colour', '', '', '')";
|
||||
_sql($sql, $errored, $error_ary);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$sql = "SELECT MIN(post_id) AS first_post_id, topic_id
|
||||
FROM " . POSTS_TABLE . "
|
||||
GROUP BY topic_id
|
||||
ORDER BY topic_id ASC";
|
||||
$result = _sql($sql, $errored, $error_ary);
|
||||
|
||||
if ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
do
|
||||
{
|
||||
$sql = "UPDATE " . TOPICS_TABLE . "
|
||||
SET topic_first_post_id = " . $row['first_post_id'] . "
|
||||
WHERE topic_id = " . $row['topic_id'];
|
||||
_sql($sql, $errored, $error_ary);
|
||||
}
|
||||
while ($row = $db->sql_fetchrow($result));
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$sql = "SELECT DISTINCT u.user_id
|
||||
FROM " . USERS_TABLE . " u, " . USER_GROUP_TABLE . " ug, " . AUTH_ACCESS_TABLE . " aa
|
||||
WHERE aa.auth_mod = 1
|
||||
AND ug.group_id = aa.group_id
|
||||
AND u.user_id = ug.user_id
|
||||
AND u.user_level <> " . ADMIN;
|
||||
$result = _sql($sql, $errored, $error_ary);
|
||||
|
||||
$mod_user = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$mod_user[] = $row['user_id'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (count($mod_user))
|
||||
{
|
||||
$sql = "UPDATE " . USERS_TABLE . "
|
||||
SET user_level = " . MOD . "
|
||||
WHERE user_id IN (" . implode(', ', $mod_user) . ")";
|
||||
_sql($sql, $errored, $error_ary);
|
||||
}
|
||||
|
||||
$sql = "INSERT INTO " . CONFIG_TABLE . " (config_name, config_value)
|
||||
VALUES ('server_name', 'www.myserver.tld')";
|
||||
_sql($sql, $errored, $error_ary);
|
||||
|
||||
$sql = "INSERT INTO " . CONFIG_TABLE . " (config_name, config_value)
|
||||
VALUES ('script_path', '/phpBB2/')";
|
||||
_sql($sql, $errored, $error_ary);
|
||||
|
||||
$sql = "INSERT INTO " . CONFIG_TABLE . " (config_name, config_value)
|
||||
VALUES ('server_port', '80')";
|
||||
_sql($sql, $errored, $error_ary);
|
||||
|
||||
$sql = "INSERT INTO " . CONFIG_TABLE . " (config_name, config_value)
|
||||
VALUES ('record_online_users', '1')";
|
||||
_sql($sql, $errored, $error_ary);
|
||||
|
||||
$sql = "INSERT INTO " . CONFIG_TABLE . " (config_name, config_value)
|
||||
VALUES ('record_online_date', '" . time() . "')";
|
||||
_sql($sql, $errored, $error_ary);
|
||||
|
||||
case 'RC-3':
|
||||
case 'RC-4':
|
||||
case '.0.0':
|
||||
case '.0.1':
|
||||
if (SQL_LAYER == 'postgresql')
|
||||
{
|
||||
$sql = "SELECT user_id, user_timezone_old
|
||||
FROM " . USERS_TABLE;
|
||||
$result = _sql($sql, $errored, $error_ary);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$sql = "UPDATE " . USERS_TABLE . "
|
||||
SET user_timezone = " . $row['user_timezone_old'] . "
|
||||
WHERE user_id = " . $row['user_id'];
|
||||
_sql($sql, $errored, $error_ary);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
$sql = "SELECT topic_id, topic_moved_id
|
||||
FROM " . TOPICS_TABLE . "
|
||||
WHERE topic_moved_id <> 0
|
||||
AND topic_status = " . TOPIC_MOVED;
|
||||
$result = _sql($sql, $errored, $error_ary);
|
||||
|
||||
$topic_ary = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$topic_ary[$row['topic_id']] = $row['topic_moved_id'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
while (list($topic_id, $topic_moved_id) = each($topic_ary))
|
||||
{
|
||||
$sql = "SELECT MAX(post_id) AS last_post, MIN(post_id) AS first_post, COUNT(post_id) AS total_posts
|
||||
FROM " . POSTS_TABLE . "
|
||||
WHERE topic_id = $topic_moved_id";
|
||||
$result = _sql($sql, $errored, $error_ary);
|
||||
|
||||
$sql = ($row = $db->sql_fetchrow($result)) ? "UPDATE " . TOPICS_TABLE . " SET topic_replies = " . ($row['total_posts'] - 1) . ", topic_first_post_id = " . $row['first_post'] . ", topic_last_post_id = " . $row['last_post'] . " WHERE topic_id = $topic_id" : "DELETE FROM " . TOPICS_TABLE . " WHERE topic_id = " . $row['topic_id'];
|
||||
_sql($sql, $errored, $error_ary);
|
||||
}
|
||||
|
||||
unset($sql);
|
||||
|
||||
sync('all forums');
|
||||
|
||||
case '.0.2':
|
||||
|
||||
case '.0.3':
|
||||
|
||||
// Topics will resync automatically
|
||||
|
||||
// Remove stop words from search match and search words
|
||||
$dirname = 'language';
|
||||
$dir = opendir($phpbb_root_path . $dirname);
|
||||
|
||||
while ($file = readdir($dir))
|
||||
{
|
||||
if (preg_match("#^lang_#i", $file) && !is_file($phpbb_root_path . $dirname . "/" . $file) && !is_link($phpbb_root_path . $dirname . "/" . $file) && file_exists($phpbb_root_path . $dirname . "/" . $file . '/search_stopwords.txt'))
|
||||
{
|
||||
|
||||
$stopword_list = trim(preg_replace('#([\w\.\-_\+\'<27><>-<2D>\\\]+?)[ \n\r]*?(,|$)#', '\'\1\'\2', str_replace("'", "\'", implode(', ', file($phpbb_root_path . $dirname . "/" . $file . '/search_stopwords.txt')))));
|
||||
|
||||
$sql = "SELECT word_id
|
||||
FROM " . SEARCH_WORD_TABLE . "
|
||||
WHERE word_text IN ($stopword_list)";
|
||||
$result = _sql($sql, $errored, $error_ary);
|
||||
|
||||
$word_id_sql = '';
|
||||
if ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
do
|
||||
{
|
||||
$word_id_sql .= (($word_id_sql != '') ? ', ' : '') . $row['word_id'];
|
||||
}
|
||||
while ($row = $db->sql_fetchrow($result));
|
||||
|
||||
$sql = "DELETE FROM " . SEARCH_WORD_TABLE . "
|
||||
WHERE word_id IN ($word_id_sql)";
|
||||
_sql($sql, $errored, $error_ary);
|
||||
|
||||
$sql = "DELETE FROM " . SEARCH_MATCH_TABLE . "
|
||||
WHERE word_id IN ($word_id_sql)";
|
||||
_sql($sql, $errored, $error_ary);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
}
|
||||
closedir($dir);
|
||||
|
||||
// Mark common words ...
|
||||
remove_common('global', 4/10);
|
||||
|
||||
// remove superfluous polls ... grab polls with topics then delete polls
|
||||
// not in that list
|
||||
$sql = "SELECT v.vote_id
|
||||
FROM " . TOPICS_TABLE . " t, " . VOTE_DESC_TABLE . " v
|
||||
WHERE v.topic_id = t.topic_id";
|
||||
$result = _sql($sql, $errored, $error_ary);
|
||||
|
||||
$vote_id_sql = '';
|
||||
if ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
do
|
||||
{
|
||||
$vote_id_sql .= (($vote_id_sql != '') ? ', ' : '') . $row['vote_id'];
|
||||
}
|
||||
while ($row = $db->sql_fetchrow($result));
|
||||
|
||||
$sql = "DELETE FROM " . VOTE_DESC_TABLE . "
|
||||
WHERE vote_id NOT IN ($vote_id_sql)";
|
||||
_sql($sql, $errored, $error_ary);
|
||||
|
||||
$sql = "DELETE FROM " . VOTE_RESULTS_TABLE . "
|
||||
WHERE vote_id NOT IN ($vote_id_sql)";
|
||||
_sql($sql, $errored, $error_ary);
|
||||
|
||||
$sql = "DELETE FROM " . VOTE_USERS_TABLE . "
|
||||
WHERE vote_id NOT IN ($vote_id_sql)";
|
||||
_sql($sql, $errored, $error_ary);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// update pm counters
|
||||
$sql = "SELECT privmsgs_to_userid, COUNT(privmsgs_id) AS unread_count
|
||||
FROM " . PRIVMSGS_TABLE . "
|
||||
WHERE privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . "
|
||||
GROUP BY privmsgs_to_userid";
|
||||
$result = _sql($sql, $errored, $error_ary);
|
||||
|
||||
if ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$update_users = array();
|
||||
do
|
||||
{
|
||||
$update_users[$row['unread_count']][] = $row['privmsgs_to_userid'];
|
||||
}
|
||||
while ($row = $db->sql_fetchrow($result));
|
||||
|
||||
while (list($num, $user_ary) = each($update_users))
|
||||
{
|
||||
$user_ids = implode(', ', $user_ary);
|
||||
|
||||
$sql = "UPDATE " . USERS_TABLE . "
|
||||
SET user_unread_privmsg = $num
|
||||
WHERE user_id IN ($user_ids)";
|
||||
_sql($sql, $errored, $error_ary);
|
||||
}
|
||||
unset($update_list);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$sql = "SELECT privmsgs_to_userid, COUNT(privmsgs_id) AS new_count
|
||||
FROM " . PRIVMSGS_TABLE . "
|
||||
WHERE privmsgs_type = " . PRIVMSGS_NEW_MAIL . "
|
||||
GROUP BY privmsgs_to_userid";
|
||||
$result = _sql($sql, $errored, $error_ary);
|
||||
|
||||
if ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$update_users = array();
|
||||
do
|
||||
{
|
||||
$update_users[$row['new_count']][] = $row['privmsgs_to_userid'];
|
||||
}
|
||||
while ($row = $db->sql_fetchrow($result));
|
||||
|
||||
while (list($num, $user_ary) = each($update_users))
|
||||
{
|
||||
$user_ids = implode(', ', $user_ary);
|
||||
|
||||
$sql = "UPDATE " . USERS_TABLE . "
|
||||
SET user_new_privmsg = $num
|
||||
WHERE user_id IN ($user_ids)";
|
||||
_sql($sql, $errored, $error_ary);
|
||||
}
|
||||
unset($update_list);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// Remove superfluous watched topics
|
||||
$sql = "SELECT t.topic_id
|
||||
FROM " . TOPICS_TABLE . " t, " . TOPICS_WATCH_TABLE . " w
|
||||
WHERE w.topic_id = t.topic_id";
|
||||
$result = _sql($sql, $errored, $error_ary);
|
||||
|
||||
$topic_id_sql = '';
|
||||
if ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
do
|
||||
{
|
||||
$topic_id_sql .= (($topic_id_sql != '') ? ', ' : '') . $row['topic_id'];
|
||||
}
|
||||
while ($row = $db->sql_fetchrow($result));
|
||||
|
||||
$sql = "DELETE FROM " . TOPICS_WATCH_TABLE . "
|
||||
WHERE topic_id NOT IN ($topic_id_sql)";
|
||||
_sql($sql, $errored, $error_ary);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// Reset any email addresses which are non-compliant ... something
|
||||
// not done in the upgrade script and thus which may affect some
|
||||
// mysql users
|
||||
switch (SQL_LAYER)
|
||||
{
|
||||
case 'mysql':
|
||||
$sql = "UPDATE " . USERS_TABLE . "
|
||||
SET user_email = ''
|
||||
WHERE user_email NOT REGEXP '^[a-zA-Z0-9_\+\.\-]+@.*[a-zA-Z0-9_\-]+\.[a-zA-Z]{2,}$'";
|
||||
_sql($sql, $errored, $error_ary);
|
||||
}
|
||||
|
||||
case '.0.4':
|
||||
|
||||
// Add the confirmation code switch ... save time and trouble elsewhere
|
||||
$sql = 'INSERT INTO ' . CONFIG_TABLE . " (config_name, config_value)
|
||||
VALUES ('enable_confirm', '0')";
|
||||
_sql($sql, $errored, $error_ary);
|
||||
|
||||
$sql = "INSERT INTO " . CONFIG_TABLE . " (config_name, config_value)
|
||||
VALUES ('sendmail_fix', '0')";
|
||||
_sql($sql, $errored, $error_ary);
|
||||
|
||||
case '.0.5':
|
||||
|
||||
$sql = "SELECT user_id, username
|
||||
FROM " . USERS_TABLE;
|
||||
$result = _sql($sql, $errored, $error_ary);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
if (!preg_match('#(>)|(<)|(")|(&)#', $row['username']))
|
||||
{
|
||||
if ($row['username'] != htmlspecialchars($row['username']))
|
||||
{
|
||||
$sql = "UPDATE " . USERS_TABLE . "
|
||||
SET username = '" . str_replace("'", "''", htmlspecialchars($row['username'])) . "'
|
||||
WHERE user_id = " . $row['user_id'];
|
||||
_sql($sql, $errored, $error_ary);
|
||||
}
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
echo " No updates where required</b></p>\n";
|
||||
break;
|
||||
}
|
||||
|
||||
echo "<h2>Updating version and optimizing tables</h2>\n";
|
||||
echo "<p>Progress :: <b>";
|
||||
flush();
|
||||
|
||||
// update the version
|
||||
$sql = "UPDATE " . CONFIG_TABLE . "
|
||||
SET config_value = '$updates_to_version'
|
||||
WHERE config_name = 'version'";
|
||||
_sql($sql, $errored, $error_ary);
|
||||
|
||||
// Optimize/vacuum analyze the tables where appropriate
|
||||
// this should be done for each version in future along with
|
||||
// the version number update
|
||||
switch (SQL_LAYER)
|
||||
{
|
||||
case 'mysql':
|
||||
case 'mysql4':
|
||||
$sql = 'OPTIMIZE TABLE ' . $table_prefix . 'auth_access, ' . $table_prefix . 'banlist, ' . $table_prefix . 'categories, ' . $table_prefix . 'config, ' . $table_prefix . 'disallow, ' . $table_prefix . 'forum_prune, ' . $table_prefix . 'forums, ' . $table_prefix . 'groups, ' . $table_prefix . 'posts, ' . $table_prefix . 'posts_text, ' . $table_prefix . 'privmsgs, ' . $table_prefix . 'privmsgs_text, ' . $table_prefix . 'ranks, ' . $table_prefix . 'search_results, ' . $table_prefix . 'search_wordlist, ' . $table_prefix . 'search_wordmatch, ' . $table_prefix . 'smilies, ' . $table_prefix . 'themes, ' . $table_prefix . 'themes_name, ' . $table_prefix . 'topics, ' . $table_prefix . 'topics_watch, ' . $table_prefix . 'user_group, ' . $table_prefix . 'users, ' . $table_prefix . 'vote_desc, ' . $table_prefix . 'vote_results, ' . $table_prefix . 'vote_voters, ' . $table_prefix . 'words';
|
||||
_sql($sql, $errored, $error_ary);
|
||||
break;
|
||||
|
||||
case 'postgresql':
|
||||
_sql("VACUUM ANALYZE", $errored, $error_ary);
|
||||
break;
|
||||
}
|
||||
|
||||
echo "</b> <b class=\"ok\">Done</b><br />Result :: \n";
|
||||
|
||||
if ($errored)
|
||||
{
|
||||
echo " <b>Some queries failed, the statements and errors are listing below</b>\n<ul>";
|
||||
|
||||
for ($i = 0; $i < count($error_ary['sql']); $i++)
|
||||
{
|
||||
echo "<li>Error :: <b>" . $error_ary['error_code'][$i]['message'] . "</b><br />";
|
||||
echo "SQL :: <b>" . $error_ary['sql'][$i] . "</b><br /><br /></li>";
|
||||
}
|
||||
|
||||
echo "</ul>\n<p>This is probably nothing to worry about, update will continue. Should this fail to complete you may need to seek help at our development board. See <a href=\"docs\README.html\">README</a> for details on how to obtain advice.</p>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<b>No errors</b>\n";
|
||||
}
|
||||
|
||||
echo "<h2>Update completed</h2>\n";
|
||||
echo "\n" . '<p style="color:red">Please make sure you have updated your board files too, this file is only updating your database.</p>';
|
||||
echo "\n<p>You should now visit the General Configuration settings page in the <a href=\"../admin/\">Administration Panel</a> and check the General Configuration of the board. If you updated from versions prior to RC-3 you <b>must</b> update some entries. If you do not do this emails sent from the board will contain incorrect information. Don't forget to delete this file!</p>\n";
|
||||
|
||||
?>
|
||||
|
||||
<br clear="all" />
|
||||
|
||||
</body>
|
||||
</html>
|
1942
phpBB/install/upgrade.php
Normal file
1942
phpBB/install/upgrade.php
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user