mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/10411] Add new table for teampage
PHPBB3-10411
This commit is contained in:
parent
ff7465e75f
commit
df735f4603
9 changed files with 142 additions and 10 deletions
|
@ -1669,6 +1669,17 @@ function get_schema_struct()
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$schema_data['phpbb_teampage'] = array(
|
||||||
|
'COLUMNS' => array(
|
||||||
|
'teampage_id' => array('UINT', NULL, 'auto_increment'),
|
||||||
|
'group_id' => array('UINT', 0),
|
||||||
|
'teampage_name' => array('VCHAR_UNI:255', ''),
|
||||||
|
'teampage_position' => array('UINT', 0),
|
||||||
|
'teampage_parent' => array('UINT', 0),
|
||||||
|
),
|
||||||
|
'PRIMARY_KEY' => 'teampage_id',
|
||||||
|
);
|
||||||
|
|
||||||
$schema_data['phpbb_topics'] = array(
|
$schema_data['phpbb_topics'] = array(
|
||||||
'COLUMNS' => array(
|
'COLUMNS' => array(
|
||||||
'topic_id' => array('UINT', NULL, 'auto_increment'),
|
'topic_id' => array('UINT', NULL, 'auto_increment'),
|
||||||
|
|
|
@ -267,6 +267,7 @@ define('STYLES_TEMPLATE_DATA_TABLE',$table_prefix . 'styles_template_data');
|
||||||
define('STYLES_THEME_TABLE', $table_prefix . 'styles_theme');
|
define('STYLES_THEME_TABLE', $table_prefix . 'styles_theme');
|
||||||
define('STYLES_IMAGESET_TABLE', $table_prefix . 'styles_imageset');
|
define('STYLES_IMAGESET_TABLE', $table_prefix . 'styles_imageset');
|
||||||
define('STYLES_IMAGESET_DATA_TABLE',$table_prefix . 'styles_imageset_data');
|
define('STYLES_IMAGESET_DATA_TABLE',$table_prefix . 'styles_imageset_data');
|
||||||
|
define('TEAMPAGE_TABLE', $table_prefix . 'teampage');
|
||||||
define('TOPICS_TABLE', $table_prefix . 'topics');
|
define('TOPICS_TABLE', $table_prefix . 'topics');
|
||||||
define('TOPICS_POSTED_TABLE', $table_prefix . 'topics_posted');
|
define('TOPICS_POSTED_TABLE', $table_prefix . 'topics_posted');
|
||||||
define('TOPICS_TRACK_TABLE', $table_prefix . 'topics_track');
|
define('TOPICS_TRACK_TABLE', $table_prefix . 'topics_track');
|
||||||
|
|
|
@ -912,8 +912,8 @@ CREATE TABLE phpbb_reports (
|
||||||
report_time INTEGER DEFAULT 0 NOT NULL,
|
report_time INTEGER DEFAULT 0 NOT NULL,
|
||||||
report_text BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
|
report_text BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
|
||||||
reported_post_text BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
|
reported_post_text BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL,
|
||||||
reported_post_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL,
|
reported_post_uid VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL,
|
||||||
reported_post_uid VARCHAR(8) CHARACTER SET NONE DEFAULT '' NOT NULL
|
reported_post_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL
|
||||||
);;
|
);;
|
||||||
|
|
||||||
ALTER TABLE phpbb_reports ADD PRIMARY KEY (report_id);;
|
ALTER TABLE phpbb_reports ADD PRIMARY KEY (report_id);;
|
||||||
|
@ -1111,6 +1111,29 @@ BEGIN
|
||||||
END;;
|
END;;
|
||||||
|
|
||||||
|
|
||||||
|
# Table: 'phpbb_teampage'
|
||||||
|
CREATE TABLE phpbb_teampage (
|
||||||
|
teampage_id INTEGER NOT NULL,
|
||||||
|
group_id INTEGER DEFAULT 0 NOT NULL,
|
||||||
|
teampage_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
|
||||||
|
teampage_position INTEGER DEFAULT 0 NOT NULL,
|
||||||
|
teampage_parent INTEGER DEFAULT 0 NOT NULL
|
||||||
|
);;
|
||||||
|
|
||||||
|
ALTER TABLE phpbb_teampage ADD PRIMARY KEY (teampage_id);;
|
||||||
|
|
||||||
|
|
||||||
|
CREATE GENERATOR phpbb_teampage_gen;;
|
||||||
|
SET GENERATOR phpbb_teampage_gen TO 0;;
|
||||||
|
|
||||||
|
CREATE TRIGGER t_phpbb_teampage FOR phpbb_teampage
|
||||||
|
BEFORE INSERT
|
||||||
|
AS
|
||||||
|
BEGIN
|
||||||
|
NEW.teampage_id = GEN_ID(phpbb_teampage_gen, 1);
|
||||||
|
END;;
|
||||||
|
|
||||||
|
|
||||||
# Table: 'phpbb_topics'
|
# Table: 'phpbb_topics'
|
||||||
CREATE TABLE phpbb_topics (
|
CREATE TABLE phpbb_topics (
|
||||||
topic_id INTEGER NOT NULL,
|
topic_id INTEGER NOT NULL,
|
||||||
|
|
|
@ -1111,8 +1111,8 @@ CREATE TABLE [phpbb_reports] (
|
||||||
[report_time] [int] DEFAULT (0) NOT NULL ,
|
[report_time] [int] DEFAULT (0) NOT NULL ,
|
||||||
[report_text] [text] DEFAULT ('') NOT NULL ,
|
[report_text] [text] DEFAULT ('') NOT NULL ,
|
||||||
[reported_post_text] [text] DEFAULT ('') NOT NULL ,
|
[reported_post_text] [text] DEFAULT ('') NOT NULL ,
|
||||||
[reported_post_bitfield] [varchar] (255) DEFAULT ('') NOT NULL ,
|
[reported_post_uid] [varchar] (8) DEFAULT ('') NOT NULL ,
|
||||||
[reported_post_uid] [varchar] (8) DEFAULT ('') NOT NULL
|
[reported_post_bitfield] [varchar] (255) DEFAULT ('') NOT NULL
|
||||||
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
|
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
|
||||||
GO
|
GO
|
||||||
|
|
||||||
|
@ -1344,6 +1344,26 @@ CREATE UNIQUE INDEX [style_name] ON [phpbb_styles]([style_name]) ON [PRIMARY]
|
||||||
GO
|
GO
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
Table: 'phpbb_teampage'
|
||||||
|
*/
|
||||||
|
CREATE TABLE [phpbb_teampage] (
|
||||||
|
[teampage_id] [int] IDENTITY (1, 1) NOT NULL ,
|
||||||
|
[group_id] [int] DEFAULT (0) NOT NULL ,
|
||||||
|
[teampage_name] [varchar] (255) DEFAULT ('') NOT NULL ,
|
||||||
|
[teampage_position] [int] DEFAULT (0) NOT NULL ,
|
||||||
|
[teampage_parent] [int] DEFAULT (0) NOT NULL
|
||||||
|
) ON [PRIMARY]
|
||||||
|
GO
|
||||||
|
|
||||||
|
ALTER TABLE [phpbb_teampage] WITH NOCHECK ADD
|
||||||
|
CONSTRAINT [PK_phpbb_teampage] PRIMARY KEY CLUSTERED
|
||||||
|
(
|
||||||
|
[teampage_id]
|
||||||
|
) ON [PRIMARY]
|
||||||
|
GO
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Table: 'phpbb_topics'
|
Table: 'phpbb_topics'
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -649,8 +649,8 @@ CREATE TABLE phpbb_reports (
|
||||||
report_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
|
report_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
|
||||||
report_text mediumblob NOT NULL,
|
report_text mediumblob NOT NULL,
|
||||||
reported_post_text mediumblob NOT NULL,
|
reported_post_text mediumblob NOT NULL,
|
||||||
reported_post_bitfield varbinary(255) DEFAULT '' NOT NULL,
|
|
||||||
reported_post_uid varbinary(8) DEFAULT '' NOT NULL,
|
reported_post_uid varbinary(8) DEFAULT '' NOT NULL,
|
||||||
|
reported_post_bitfield varbinary(255) DEFAULT '' NOT NULL,
|
||||||
PRIMARY KEY (report_id),
|
PRIMARY KEY (report_id),
|
||||||
KEY post_id (post_id),
|
KEY post_id (post_id),
|
||||||
KEY pm_id (pm_id)
|
KEY pm_id (pm_id)
|
||||||
|
@ -773,6 +773,17 @@ CREATE TABLE phpbb_styles (
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
# Table: 'phpbb_teampage'
|
||||||
|
CREATE TABLE phpbb_teampage (
|
||||||
|
teampage_id mediumint(8) UNSIGNED NOT NULL auto_increment,
|
||||||
|
group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||||
|
teampage_name blob NOT NULL,
|
||||||
|
teampage_position mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||||
|
teampage_parent mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||||
|
PRIMARY KEY (teampage_id)
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
# Table: 'phpbb_topics'
|
# Table: 'phpbb_topics'
|
||||||
CREATE TABLE phpbb_topics (
|
CREATE TABLE phpbb_topics (
|
||||||
topic_id mediumint(8) UNSIGNED NOT NULL auto_increment,
|
topic_id mediumint(8) UNSIGNED NOT NULL auto_increment,
|
||||||
|
|
|
@ -649,8 +649,8 @@ CREATE TABLE phpbb_reports (
|
||||||
report_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
|
report_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
|
||||||
report_text mediumtext NOT NULL,
|
report_text mediumtext NOT NULL,
|
||||||
reported_post_text mediumtext NOT NULL,
|
reported_post_text mediumtext NOT NULL,
|
||||||
reported_post_bitfield varchar(255) DEFAULT '' NOT NULL,
|
|
||||||
reported_post_uid varchar(8) DEFAULT '' NOT NULL,
|
reported_post_uid varchar(8) DEFAULT '' NOT NULL,
|
||||||
|
reported_post_bitfield varchar(255) DEFAULT '' NOT NULL,
|
||||||
PRIMARY KEY (report_id),
|
PRIMARY KEY (report_id),
|
||||||
KEY post_id (post_id),
|
KEY post_id (post_id),
|
||||||
KEY pm_id (pm_id)
|
KEY pm_id (pm_id)
|
||||||
|
@ -773,6 +773,17 @@ CREATE TABLE phpbb_styles (
|
||||||
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
|
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
|
||||||
|
|
||||||
|
|
||||||
|
# Table: 'phpbb_teampage'
|
||||||
|
CREATE TABLE phpbb_teampage (
|
||||||
|
teampage_id mediumint(8) UNSIGNED NOT NULL auto_increment,
|
||||||
|
group_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||||
|
teampage_name varchar(255) DEFAULT '' NOT NULL,
|
||||||
|
teampage_position mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||||
|
teampage_parent mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||||
|
PRIMARY KEY (teampage_id)
|
||||||
|
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
|
||||||
|
|
||||||
|
|
||||||
# Table: 'phpbb_topics'
|
# Table: 'phpbb_topics'
|
||||||
CREATE TABLE phpbb_topics (
|
CREATE TABLE phpbb_topics (
|
||||||
topic_id mediumint(8) UNSIGNED NOT NULL auto_increment,
|
topic_id mediumint(8) UNSIGNED NOT NULL auto_increment,
|
||||||
|
|
|
@ -1216,8 +1216,8 @@ CREATE TABLE phpbb_reports (
|
||||||
report_time number(11) DEFAULT '0' NOT NULL,
|
report_time number(11) DEFAULT '0' NOT NULL,
|
||||||
report_text clob DEFAULT '' ,
|
report_text clob DEFAULT '' ,
|
||||||
reported_post_text clob DEFAULT '' ,
|
reported_post_text clob DEFAULT '' ,
|
||||||
reported_post_bitfield varchar2(255) DEFAULT '' ,
|
|
||||||
reported_post_uid varchar2(8) DEFAULT '' ,
|
reported_post_uid varchar2(8) DEFAULT '' ,
|
||||||
|
reported_post_bitfield varchar2(255) DEFAULT '' ,
|
||||||
CONSTRAINT pk_phpbb_reports PRIMARY KEY (report_id)
|
CONSTRAINT pk_phpbb_reports PRIMARY KEY (report_id)
|
||||||
)
|
)
|
||||||
/
|
/
|
||||||
|
@ -1474,6 +1474,36 @@ END;
|
||||||
/
|
/
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
Table: 'phpbb_teampage'
|
||||||
|
*/
|
||||||
|
CREATE TABLE phpbb_teampage (
|
||||||
|
teampage_id number(8) NOT NULL,
|
||||||
|
group_id number(8) DEFAULT '0' NOT NULL,
|
||||||
|
teampage_name varchar2(765) DEFAULT '' ,
|
||||||
|
teampage_position number(8) DEFAULT '0' NOT NULL,
|
||||||
|
teampage_parent number(8) DEFAULT '0' NOT NULL,
|
||||||
|
CONSTRAINT pk_phpbb_teampage PRIMARY KEY (teampage_id)
|
||||||
|
)
|
||||||
|
/
|
||||||
|
|
||||||
|
|
||||||
|
CREATE SEQUENCE phpbb_teampage_seq
|
||||||
|
/
|
||||||
|
|
||||||
|
CREATE OR REPLACE TRIGGER t_phpbb_teampage
|
||||||
|
BEFORE INSERT ON phpbb_teampage
|
||||||
|
FOR EACH ROW WHEN (
|
||||||
|
new.teampage_id IS NULL OR new.teampage_id = 0
|
||||||
|
)
|
||||||
|
BEGIN
|
||||||
|
SELECT phpbb_teampage_seq.nextval
|
||||||
|
INTO :new.teampage_id
|
||||||
|
FROM dual;
|
||||||
|
END;
|
||||||
|
/
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Table: 'phpbb_topics'
|
Table: 'phpbb_topics'
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -855,8 +855,8 @@ CREATE TABLE phpbb_reports (
|
||||||
report_time INT4 DEFAULT '0' NOT NULL CHECK (report_time >= 0),
|
report_time INT4 DEFAULT '0' NOT NULL CHECK (report_time >= 0),
|
||||||
report_text TEXT DEFAULT '' NOT NULL,
|
report_text TEXT DEFAULT '' NOT NULL,
|
||||||
reported_post_text TEXT DEFAULT '' NOT NULL,
|
reported_post_text TEXT DEFAULT '' NOT NULL,
|
||||||
reported_post_bitfield varchar(255) DEFAULT '' NOT NULL,
|
|
||||||
reported_post_uid varchar(8) DEFAULT '' NOT NULL,
|
reported_post_uid varchar(8) DEFAULT '' NOT NULL,
|
||||||
|
reported_post_bitfield varchar(255) DEFAULT '' NOT NULL,
|
||||||
PRIMARY KEY (report_id)
|
PRIMARY KEY (report_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -1007,6 +1007,21 @@ CREATE TABLE phpbb_styles (
|
||||||
|
|
||||||
CREATE UNIQUE INDEX phpbb_styles_style_name ON phpbb_styles (style_name);
|
CREATE UNIQUE INDEX phpbb_styles_style_name ON phpbb_styles (style_name);
|
||||||
|
|
||||||
|
/*
|
||||||
|
Table: 'phpbb_teampage'
|
||||||
|
*/
|
||||||
|
CREATE SEQUENCE phpbb_teampage_seq;
|
||||||
|
|
||||||
|
CREATE TABLE phpbb_teampage (
|
||||||
|
teampage_id INT4 DEFAULT nextval('phpbb_teampage_seq'),
|
||||||
|
group_id INT4 DEFAULT '0' NOT NULL CHECK (group_id >= 0),
|
||||||
|
teampage_name varchar(255) DEFAULT '' NOT NULL,
|
||||||
|
teampage_position INT4 DEFAULT '0' NOT NULL CHECK (teampage_position >= 0),
|
||||||
|
teampage_parent INT4 DEFAULT '0' NOT NULL CHECK (teampage_parent >= 0),
|
||||||
|
PRIMARY KEY (teampage_id)
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Table: 'phpbb_topics'
|
Table: 'phpbb_topics'
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -630,8 +630,8 @@ CREATE TABLE phpbb_reports (
|
||||||
report_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
report_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||||
report_text mediumtext(16777215) NOT NULL DEFAULT '',
|
report_text mediumtext(16777215) NOT NULL DEFAULT '',
|
||||||
reported_post_text mediumtext(16777215) NOT NULL DEFAULT '',
|
reported_post_text mediumtext(16777215) NOT NULL DEFAULT '',
|
||||||
reported_post_bitfield varchar(255) NOT NULL DEFAULT '',
|
reported_post_uid varchar(8) NOT NULL DEFAULT '',
|
||||||
reported_post_uid varchar(8) NOT NULL DEFAULT ''
|
reported_post_bitfield varchar(255) NOT NULL DEFAULT ''
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE INDEX phpbb_reports_post_id ON phpbb_reports (post_id);
|
CREATE INDEX phpbb_reports_post_id ON phpbb_reports (post_id);
|
||||||
|
@ -748,6 +748,16 @@ CREATE TABLE phpbb_styles (
|
||||||
|
|
||||||
CREATE UNIQUE INDEX phpbb_styles_style_name ON phpbb_styles (style_name);
|
CREATE UNIQUE INDEX phpbb_styles_style_name ON phpbb_styles (style_name);
|
||||||
|
|
||||||
|
# Table: 'phpbb_teampage'
|
||||||
|
CREATE TABLE phpbb_teampage (
|
||||||
|
teampage_id INTEGER PRIMARY KEY NOT NULL ,
|
||||||
|
group_id INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||||
|
teampage_name varchar(255) NOT NULL DEFAULT '',
|
||||||
|
teampage_position INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||||
|
teampage_parent INTEGER UNSIGNED NOT NULL DEFAULT '0'
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
# Table: 'phpbb_topics'
|
# Table: 'phpbb_topics'
|
||||||
CREATE TABLE phpbb_topics (
|
CREATE TABLE phpbb_topics (
|
||||||
topic_id INTEGER PRIMARY KEY NOT NULL ,
|
topic_id INTEGER PRIMARY KEY NOT NULL ,
|
||||||
|
|
Loading…
Add table
Reference in a new issue