mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
Fixed postgres schema so it works with polls
git-svn-id: file:///svn/phpbb/trunk@1002 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
3d72b78424
commit
289e45ae6f
2 changed files with 44 additions and 6 deletions
|
@ -5,13 +5,13 @@
|
|||
*/
|
||||
|
||||
-- Config
|
||||
INSERT INTO phpbb_config (config_id, board_disable, sitename, cookie_name, cookie_path, cookie_domain, cookie_secure, session_length, allow_html, allow_bbcode, allow_smilies, allow_sig, allow_namechange, posts_per_page, hot_threshold, topics_per_page, flood_interval, allow_theme_create, override_themes, email_sig, email_from, default_theme, default_lang, default_dateformat, system_timezone, sys_template, avatar_filesize, avatar_path, allow_avatar_upload, avatar_max_width, avatar_max_height, allow_avatar_local, allow_avatar_remote) VALUES ( '1', '0', 'phpbb.com', 'phpbb2mysql', '/', '', '0', 600, '0', '1', '1', '1', '0', '10', '10', '25', '10', '0', '0', '', '', '2', 'english', 'd M Y H:i', '0', 'PSO', '6144', 'images/avatars', '0', '70', '70', '0', '0');
|
||||
INSERT INTO phpbb_config (config_id, board_disable, sitename, cookie_name, cookie_path, cookie_domain, cookie_secure, session_length, allow_html, allow_bbcode, allow_smilies, allow_sig, allow_namechange, posts_per_page, hot_threshold, topics_per_page, flood_interval, allow_theme_create, override_themes, email_sig, email_from, default_theme, default_lang, default_dateformat, system_timezone, sys_template, avatar_filesize, avatar_path, allow_avatar_upload, avatar_max_width, avatar_max_height, allow_avatar_local, allow_avatar_remote, max_poll_options) VALUES ( '1', '0', 'phpbb.com', 'phpbb2mysql', '/', '', '0', 600, '0', '1', '1', '1', '0', '10', '10', '25', '10', '0', '0', '', '', '2', 'english', 'd M Y H:i', '0', 'PSO', '6144', 'images/avatars', '0', '70', '70', '0', '0', '10');
|
||||
|
||||
-- Categories
|
||||
INSERT INTO phpbb_categories (cat_id, cat_title, cat_order) VALUES (1, 'Test category 1', 1);
|
||||
|
||||
-- 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_votecreate, auth_vote, auth_attachments) VALUES (1, 'Test Forum 1', 'This is just a test forum, nothing special here.', 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 3, 3, 3, 3, 3);
|
||||
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, nothing special here.', 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 3, 3, 3, 3, 3);
|
||||
|
||||
-- Users
|
||||
INSERT INTO phpbb_users (user_id, username, user_level, user_regdate, user_password, user_autologin_key, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_viewemail, user_theme, 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, user_template) VALUES ( '-1', 'Anonymous', '0', '972086460', '', '', '', '', '', '', '', '', '', '0', '0', '', '', '', '', '', '', '', '0', '0', '1', '', '', '', '', '', '', '', '', '0', '0', '');
|
||||
|
@ -35,7 +35,7 @@ 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);
|
||||
|
||||
-- User Access (admin is set as ... an admin)
|
||||
INSERT INTO phpbb_auth_access (group_id, forum_id, auth_view, auth_read, auth_post, auth_reply, auth_edit, auth_delete, auth_announce, auth_sticky, auth_votecreate, auth_vote, auth_mod) VALUES (2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
|
||||
INSERT INTO phpbb_auth_access (group_id, forum_id, auth_view, auth_read, auth_post, auth_reply, auth_edit, auth_delete, auth_announce, auth_sticky, auth_pollcreate, auth_vote, auth_mod) VALUES (2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
|
||||
|
||||
-- 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_last_post_id) VALUES (1, 'Demo Topic', 2, EXTRACT(EPOCH FROM TIMESTAMP 'now'), 0, 0, 1, 0, 0, 1);
|
||||
|
|
|
@ -20,6 +20,7 @@ CREATE SEQUENCE phpbb_users_id_seq start 1 increment 1 maxvalue 2147483647 minva
|
|||
CREATE SEQUENCE phpbb_words_id_seq start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1;
|
||||
CREATE SEQUENCE phpbb_groups_id_seq start 1 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
|
||||
|
@ -35,7 +36,7 @@ CREATE TABLE phpbb_auth_access (
|
|||
auth_delete int2 DEFAULT '0' NOT NULL,
|
||||
auth_announce int2 DEFAULT '0' NOT NULL,
|
||||
auth_sticky int2 DEFAULT '0' NOT NULL,
|
||||
auth_votecreate int2 DEFAULT '0' NOT NULL,
|
||||
auth_pollcreate int2 DEFAULT '0' NOT NULL,
|
||||
auth_attachments int2 DEFAULT '0' NOT NULL,
|
||||
auth_vote int2 DEFAULT '0' NOT NULL,
|
||||
auth_mod int2 DEFAULT '0' NOT NULL,
|
||||
|
@ -108,6 +109,7 @@ CREATE TABLE phpbb_config (
|
|||
posts_per_page int2 NOT NULL,
|
||||
topics_per_page int2 NOT NULL,
|
||||
hot_threshold int2 NOT NULL,
|
||||
max_poll_options int,
|
||||
email_sig varchar(255) NOT NULL,
|
||||
email_from varchar(100) NOT NULL,
|
||||
smtp_delivery int2 DEFAULT '0' NOT NULL,
|
||||
|
@ -164,7 +166,7 @@ CREATE TABLE phpbb_forums (
|
|||
auth_delete int2 DEFAULT '0' NOT NULL,
|
||||
auth_announce int2 DEFAULT '0' NOT NULL,
|
||||
auth_sticky int2 DEFAULT '0' NOT NULL,
|
||||
auth_votecreate 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)
|
||||
|
@ -202,6 +204,7 @@ CREATE TABLE phpbb_posts (
|
|||
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,
|
||||
bbcode_uid varchar(10) DEFAULT '' NOT NULL,
|
||||
post_edit_time int4,
|
||||
post_edit_count int2 DEFAULT '0' NOT NULL,
|
||||
|
@ -399,8 +402,8 @@ CREATE TABLE phpbb_topics (
|
|||
topic_replies int4 DEFAULT '0' NOT NULL,
|
||||
forum_id 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_notify int2 DEFAULT '0',
|
||||
topic_moved_id int4,
|
||||
topic_last_post_id int4 DEFAULT '0' NOT NULL,
|
||||
CONSTRAINT phpbb_topics_pkey PRIMARY KEY (topic_id)
|
||||
|
@ -477,6 +480,41 @@ CREATE TABLE phpbb_users (
|
|||
CONSTRAINT phpbb_users_pkey PRIMARY KEY (user_id)
|
||||
);
|
||||
|
||||
/* --------------------------------------------------------
|
||||
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
|
||||
|
|
Loading…
Add table
Reference in a new issue