mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
Primary key bad, key good ...
git-svn-id: file:///svn/phpbb/trunk@879 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
f8d5fd6422
commit
0bc2d131aa
2 changed files with 65 additions and 56 deletions
|
@ -286,6 +286,17 @@ CREATE TABLE phpbb_ranks (
|
||||||
#
|
#
|
||||||
# Table structure for table 'phpbb_session'
|
# Table structure for table 'phpbb_session'
|
||||||
#
|
#
|
||||||
|
# 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 ...
|
||||||
|
#
|
||||||
|
# I must admit I read about this type on vB's board.
|
||||||
|
# Hey, I never said you cannot get basic ideas from
|
||||||
|
# competing boards, just that I find it's best not to
|
||||||
|
# look at any code ... !
|
||||||
|
#
|
||||||
DROP TABLE IF EXISTS phpbb_session;
|
DROP TABLE IF EXISTS phpbb_session;
|
||||||
CREATE TABLE phpbb_session (
|
CREATE TABLE phpbb_session (
|
||||||
session_id char(32) DEFAULT '' NOT NULL,
|
session_id char(32) DEFAULT '' NOT NULL,
|
||||||
|
@ -416,7 +427,6 @@ CREATE TABLE phpbb_topics (
|
||||||
topic_status tinyint(3) DEFAULT '0' NOT NULL,
|
topic_status tinyint(3) DEFAULT '0' NOT NULL,
|
||||||
topic_type tinyint(3) DEFAULT '0' NOT NULL,
|
topic_type tinyint(3) DEFAULT '0' NOT NULL,
|
||||||
topic_last_post_id int(11) DEFAULT '0' NOT NULL,
|
topic_last_post_id int(11) DEFAULT '0' NOT NULL,
|
||||||
topic_moved_id int(10),
|
|
||||||
topic_notify tinyint(1) DEFAULT '0' NOT NULL,
|
topic_notify tinyint(1) DEFAULT '0' NOT NULL,
|
||||||
PRIMARY KEY (topic_id),
|
PRIMARY KEY (topic_id),
|
||||||
KEY forum_id (forum_id),
|
KEY forum_id (forum_id),
|
||||||
|
@ -433,7 +443,7 @@ CREATE TABLE phpbb_topics_watch (
|
||||||
topic_id int(11) NOT NULL DEFAULT '0',
|
topic_id int(11) NOT NULL DEFAULT '0',
|
||||||
user_id int(11) NOT NULL DEFAULT '0',
|
user_id int(11) NOT NULL DEFAULT '0',
|
||||||
notify_status tinyint(1) NOT NULL default '0',
|
notify_status tinyint(1) NOT NULL default '0',
|
||||||
PRIMARY KEY (topic_id),
|
KEY topic_id (topic_id),
|
||||||
KEY user_id (user_id)
|
KEY user_id (user_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -412,7 +412,6 @@ CREATE TABLE phpbb_topics (
|
||||||
topic_type int2 DEFAULT '0' NOT NULL,
|
topic_type int2 DEFAULT '0' NOT NULL,
|
||||||
topic_notify int2 DEFAULT '0',
|
topic_notify int2 DEFAULT '0',
|
||||||
topic_last_post_id int4 DEFAULT '0' NOT NULL,
|
topic_last_post_id int4 DEFAULT '0' NOT NULL,
|
||||||
topic_moved_id int4,
|
|
||||||
CONSTRAINT phpbb_topics_pkey PRIMARY KEY (topic_id)
|
CONSTRAINT phpbb_topics_pkey PRIMARY KEY (topic_id)
|
||||||
);
|
);
|
||||||
CREATE INDEX _phpbb_topics_index ON phpbb_topics (forum_id, topic_id);
|
CREATE INDEX _phpbb_topics_index ON phpbb_topics (forum_id, topic_id);
|
||||||
|
@ -426,7 +425,7 @@ CREATE TABLE phpbb_topics_watch (
|
||||||
topic_id int4,
|
topic_id int4,
|
||||||
user_id int4,
|
user_id int4,
|
||||||
notify_status int2 NOT NULL default '0',
|
notify_status int2 NOT NULL default '0',
|
||||||
CONSTRAINT phpbb_topics_watch_pkey PRIMARY KEY (topic_id),
|
KEY topic_id (topic_id),
|
||||||
KEY user_id (user_id)
|
KEY user_id (user_id)
|
||||||
);
|
);
|
||||||
CREATE INDEX _phpbb_topics_watch_index ON phpbb_topics_watch (topic_id, user_id);
|
CREATE INDEX _phpbb_topics_watch_index ON phpbb_topics_watch (topic_id, user_id);
|
||||||
|
|
Loading…
Add table
Reference in a new issue