mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[feature/soft-delete] Add columns for soft delete details
PHPBB3-9657
This commit is contained in:
parent
8b2181eb85
commit
dc2835af78
9 changed files with 61 additions and 7 deletions
|
@ -1350,6 +1350,9 @@ function get_schema_struct()
|
||||||
'post_edit_user' => array('UINT', 0),
|
'post_edit_user' => array('UINT', 0),
|
||||||
'post_edit_count' => array('USINT', 0),
|
'post_edit_count' => array('USINT', 0),
|
||||||
'post_edit_locked' => array('BOOL', 0),
|
'post_edit_locked' => array('BOOL', 0),
|
||||||
|
'post_delete_time' => array('TIMESTAMP', 0),
|
||||||
|
'post_delete_reason' => array('STEXT_UNI', ''),
|
||||||
|
'post_delete_user' => array('UINT', 0),
|
||||||
),
|
),
|
||||||
'PRIMARY_KEY' => 'post_id',
|
'PRIMARY_KEY' => 'post_id',
|
||||||
'KEYS' => array(
|
'KEYS' => array(
|
||||||
|
@ -1703,6 +1706,9 @@ function get_schema_struct()
|
||||||
'poll_max_options' => array('TINT:4', 1),
|
'poll_max_options' => array('TINT:4', 1),
|
||||||
'poll_last_vote' => array('TIMESTAMP', 0),
|
'poll_last_vote' => array('TIMESTAMP', 0),
|
||||||
'poll_vote_change' => array('BOOL', 0),
|
'poll_vote_change' => array('BOOL', 0),
|
||||||
|
'topic_delete_time' => array('TIMESTAMP', 0),
|
||||||
|
'topic_delete_reason' => array('STEXT_UNI', ''),
|
||||||
|
'topic_delete_user' => array('UINT', 0),
|
||||||
),
|
),
|
||||||
'PRIMARY_KEY' => 'topic_id',
|
'PRIMARY_KEY' => 'topic_id',
|
||||||
'KEYS' => array(
|
'KEYS' => array(
|
||||||
|
|
|
@ -1104,6 +1104,9 @@ function database_update_info()
|
||||||
),
|
),
|
||||||
POSTS_TABLE => array(
|
POSTS_TABLE => array(
|
||||||
'post_visibility' => array('TINT:3', 0),
|
'post_visibility' => array('TINT:3', 0),
|
||||||
|
'post_delete_time' => array('TIMESTAMP', 0),
|
||||||
|
'post_delete_reason' => array('STEXT_UNI', ''),
|
||||||
|
'post_delete_user' => array('UINT', 0),
|
||||||
),
|
),
|
||||||
PROFILE_FIELDS_TABLE => array(
|
PROFILE_FIELDS_TABLE => array(
|
||||||
'field_show_on_pm' => array('BOOL', 0),
|
'field_show_on_pm' => array('BOOL', 0),
|
||||||
|
@ -1119,6 +1122,9 @@ function database_update_info()
|
||||||
),
|
),
|
||||||
TOPICS_TABLE => array(
|
TOPICS_TABLE => array(
|
||||||
'topic_visibility' => array('TINT:3', 0),
|
'topic_visibility' => array('TINT:3', 0),
|
||||||
|
'topic_delete_time' => array('TIMESTAMP', 0),
|
||||||
|
'topic_delete_reason' => array('STEXT_UNI', ''),
|
||||||
|
'topic_delete_user' => array('UINT', 0),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'change_columns' => array(
|
'change_columns' => array(
|
||||||
|
|
|
@ -668,7 +668,10 @@ CREATE TABLE phpbb_posts (
|
||||||
post_edit_reason VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
|
post_edit_reason VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
|
||||||
post_edit_user INTEGER DEFAULT 0 NOT NULL,
|
post_edit_user INTEGER DEFAULT 0 NOT NULL,
|
||||||
post_edit_count INTEGER DEFAULT 0 NOT NULL,
|
post_edit_count INTEGER DEFAULT 0 NOT NULL,
|
||||||
post_edit_locked INTEGER DEFAULT 0 NOT NULL
|
post_edit_locked INTEGER DEFAULT 0 NOT NULL,
|
||||||
|
post_delete_time INTEGER DEFAULT 0 NOT NULL,
|
||||||
|
post_delete_reason VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
|
||||||
|
post_delete_user INTEGER DEFAULT 0 NOT NULL
|
||||||
);;
|
);;
|
||||||
|
|
||||||
ALTER TABLE phpbb_posts ADD PRIMARY KEY (post_id);;
|
ALTER TABLE phpbb_posts ADD PRIMARY KEY (post_id);;
|
||||||
|
@ -1144,7 +1147,10 @@ CREATE TABLE phpbb_topics (
|
||||||
poll_length INTEGER DEFAULT 0 NOT NULL,
|
poll_length INTEGER DEFAULT 0 NOT NULL,
|
||||||
poll_max_options INTEGER DEFAULT 1 NOT NULL,
|
poll_max_options INTEGER DEFAULT 1 NOT NULL,
|
||||||
poll_last_vote INTEGER DEFAULT 0 NOT NULL,
|
poll_last_vote INTEGER DEFAULT 0 NOT NULL,
|
||||||
poll_vote_change INTEGER DEFAULT 0 NOT NULL
|
poll_vote_change INTEGER DEFAULT 0 NOT NULL,
|
||||||
|
topic_delete_time INTEGER DEFAULT 0 NOT NULL,
|
||||||
|
topic_delete_reason VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
|
||||||
|
topic_delete_user INTEGER DEFAULT 0 NOT NULL
|
||||||
);;
|
);;
|
||||||
|
|
||||||
ALTER TABLE phpbb_topics ADD PRIMARY KEY (topic_id);;
|
ALTER TABLE phpbb_topics ADD PRIMARY KEY (topic_id);;
|
||||||
|
|
|
@ -819,7 +819,10 @@ CREATE TABLE [phpbb_posts] (
|
||||||
[post_edit_reason] [varchar] (255) DEFAULT ('') NOT NULL ,
|
[post_edit_reason] [varchar] (255) DEFAULT ('') NOT NULL ,
|
||||||
[post_edit_user] [int] DEFAULT (0) NOT NULL ,
|
[post_edit_user] [int] DEFAULT (0) NOT NULL ,
|
||||||
[post_edit_count] [int] DEFAULT (0) NOT NULL ,
|
[post_edit_count] [int] DEFAULT (0) NOT NULL ,
|
||||||
[post_edit_locked] [int] DEFAULT (0) NOT NULL
|
[post_edit_locked] [int] DEFAULT (0) NOT NULL ,
|
||||||
|
[post_delete_time] [int] DEFAULT (0) NOT NULL ,
|
||||||
|
[post_delete_reason] [varchar] (255) DEFAULT ('') NOT NULL ,
|
||||||
|
[post_delete_user] [int] DEFAULT (0) NOT NULL
|
||||||
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
|
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
|
||||||
GO
|
GO
|
||||||
|
|
||||||
|
@ -1379,7 +1382,10 @@ CREATE TABLE [phpbb_topics] (
|
||||||
[poll_length] [int] DEFAULT (0) NOT NULL ,
|
[poll_length] [int] DEFAULT (0) NOT NULL ,
|
||||||
[poll_max_options] [int] DEFAULT (1) NOT NULL ,
|
[poll_max_options] [int] DEFAULT (1) NOT NULL ,
|
||||||
[poll_last_vote] [int] DEFAULT (0) NOT NULL ,
|
[poll_last_vote] [int] DEFAULT (0) NOT NULL ,
|
||||||
[poll_vote_change] [int] DEFAULT (0) NOT NULL
|
[poll_vote_change] [int] DEFAULT (0) NOT NULL ,
|
||||||
|
[topic_delete_time] [int] DEFAULT (0) NOT NULL ,
|
||||||
|
[topic_delete_reason] [varchar] (255) DEFAULT ('') NOT NULL ,
|
||||||
|
[topic_delete_user] [int] DEFAULT (0) NOT NULL
|
||||||
) ON [PRIMARY]
|
) ON [PRIMARY]
|
||||||
GO
|
GO
|
||||||
|
|
||||||
|
|
|
@ -481,6 +481,9 @@ CREATE TABLE phpbb_posts (
|
||||||
post_edit_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
post_edit_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||||
post_edit_count smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
|
post_edit_count smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
|
||||||
post_edit_locked tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
|
post_edit_locked tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
|
||||||
|
post_delete_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
|
||||||
|
post_delete_reason blob NOT NULL,
|
||||||
|
post_delete_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||||
PRIMARY KEY (post_id),
|
PRIMARY KEY (post_id),
|
||||||
KEY forum_id (forum_id),
|
KEY forum_id (forum_id),
|
||||||
KEY topic_id (topic_id),
|
KEY topic_id (topic_id),
|
||||||
|
@ -807,6 +810,9 @@ CREATE TABLE phpbb_topics (
|
||||||
poll_max_options tinyint(4) DEFAULT '1' NOT NULL,
|
poll_max_options tinyint(4) DEFAULT '1' NOT NULL,
|
||||||
poll_last_vote int(11) UNSIGNED DEFAULT '0' NOT NULL,
|
poll_last_vote int(11) UNSIGNED DEFAULT '0' NOT NULL,
|
||||||
poll_vote_change tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
|
poll_vote_change tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
|
||||||
|
topic_delete_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
|
||||||
|
topic_delete_reason blob NOT NULL,
|
||||||
|
topic_delete_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||||
PRIMARY KEY (topic_id),
|
PRIMARY KEY (topic_id),
|
||||||
KEY forum_id (forum_id),
|
KEY forum_id (forum_id),
|
||||||
KEY forum_id_type (forum_id, topic_type),
|
KEY forum_id_type (forum_id, topic_type),
|
||||||
|
|
|
@ -481,6 +481,9 @@ CREATE TABLE phpbb_posts (
|
||||||
post_edit_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
post_edit_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||||
post_edit_count smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
|
post_edit_count smallint(4) UNSIGNED DEFAULT '0' NOT NULL,
|
||||||
post_edit_locked tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
|
post_edit_locked tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
|
||||||
|
post_delete_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
|
||||||
|
post_delete_reason varchar(255) DEFAULT '' NOT NULL,
|
||||||
|
post_delete_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||||
PRIMARY KEY (post_id),
|
PRIMARY KEY (post_id),
|
||||||
KEY forum_id (forum_id),
|
KEY forum_id (forum_id),
|
||||||
KEY topic_id (topic_id),
|
KEY topic_id (topic_id),
|
||||||
|
@ -807,6 +810,9 @@ CREATE TABLE phpbb_topics (
|
||||||
poll_max_options tinyint(4) DEFAULT '1' NOT NULL,
|
poll_max_options tinyint(4) DEFAULT '1' NOT NULL,
|
||||||
poll_last_vote int(11) UNSIGNED DEFAULT '0' NOT NULL,
|
poll_last_vote int(11) UNSIGNED DEFAULT '0' NOT NULL,
|
||||||
poll_vote_change tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
|
poll_vote_change tinyint(1) UNSIGNED DEFAULT '0' NOT NULL,
|
||||||
|
topic_delete_time int(11) UNSIGNED DEFAULT '0' NOT NULL,
|
||||||
|
topic_delete_reason varchar(255) DEFAULT '' NOT NULL,
|
||||||
|
topic_delete_user mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||||
PRIMARY KEY (topic_id),
|
PRIMARY KEY (topic_id),
|
||||||
KEY forum_id (forum_id),
|
KEY forum_id (forum_id),
|
||||||
KEY forum_id_type (forum_id, topic_type),
|
KEY forum_id_type (forum_id, topic_type),
|
||||||
|
|
|
@ -904,6 +904,9 @@ CREATE TABLE phpbb_posts (
|
||||||
post_edit_user number(8) DEFAULT '0' NOT NULL,
|
post_edit_user number(8) DEFAULT '0' NOT NULL,
|
||||||
post_edit_count number(4) DEFAULT '0' NOT NULL,
|
post_edit_count number(4) DEFAULT '0' NOT NULL,
|
||||||
post_edit_locked number(1) DEFAULT '0' NOT NULL,
|
post_edit_locked number(1) DEFAULT '0' NOT NULL,
|
||||||
|
post_delete_time number(11) DEFAULT '0' NOT NULL,
|
||||||
|
post_delete_reason varchar2(765) DEFAULT '' ,
|
||||||
|
post_delete_user number(8) DEFAULT '0' NOT NULL,
|
||||||
CONSTRAINT pk_phpbb_posts PRIMARY KEY (post_id)
|
CONSTRAINT pk_phpbb_posts PRIMARY KEY (post_id)
|
||||||
)
|
)
|
||||||
/
|
/
|
||||||
|
@ -1510,6 +1513,9 @@ CREATE TABLE phpbb_topics (
|
||||||
poll_max_options number(4) DEFAULT '1' NOT NULL,
|
poll_max_options number(4) DEFAULT '1' NOT NULL,
|
||||||
poll_last_vote number(11) DEFAULT '0' NOT NULL,
|
poll_last_vote number(11) DEFAULT '0' NOT NULL,
|
||||||
poll_vote_change number(1) DEFAULT '0' NOT NULL,
|
poll_vote_change number(1) DEFAULT '0' NOT NULL,
|
||||||
|
topic_delete_time number(11) DEFAULT '0' NOT NULL,
|
||||||
|
topic_delete_reason varchar2(765) DEFAULT '' ,
|
||||||
|
topic_delete_user number(8) DEFAULT '0' NOT NULL,
|
||||||
CONSTRAINT pk_phpbb_topics PRIMARY KEY (topic_id)
|
CONSTRAINT pk_phpbb_topics PRIMARY KEY (topic_id)
|
||||||
)
|
)
|
||||||
/
|
/
|
||||||
|
|
|
@ -655,6 +655,9 @@ CREATE TABLE phpbb_posts (
|
||||||
post_edit_user INT4 DEFAULT '0' NOT NULL CHECK (post_edit_user >= 0),
|
post_edit_user INT4 DEFAULT '0' NOT NULL CHECK (post_edit_user >= 0),
|
||||||
post_edit_count INT2 DEFAULT '0' NOT NULL CHECK (post_edit_count >= 0),
|
post_edit_count INT2 DEFAULT '0' NOT NULL CHECK (post_edit_count >= 0),
|
||||||
post_edit_locked INT2 DEFAULT '0' NOT NULL CHECK (post_edit_locked >= 0),
|
post_edit_locked INT2 DEFAULT '0' NOT NULL CHECK (post_edit_locked >= 0),
|
||||||
|
post_delete_time INT4 DEFAULT '0' NOT NULL CHECK (post_delete_time >= 0),
|
||||||
|
post_delete_reason varchar(255) DEFAULT '' NOT NULL,
|
||||||
|
post_delete_user INT4 DEFAULT '0' NOT NULL CHECK (post_delete_user >= 0),
|
||||||
PRIMARY KEY (post_id)
|
PRIMARY KEY (post_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -1045,6 +1048,9 @@ CREATE TABLE phpbb_topics (
|
||||||
poll_max_options INT2 DEFAULT '1' NOT NULL,
|
poll_max_options INT2 DEFAULT '1' NOT NULL,
|
||||||
poll_last_vote INT4 DEFAULT '0' NOT NULL CHECK (poll_last_vote >= 0),
|
poll_last_vote INT4 DEFAULT '0' NOT NULL CHECK (poll_last_vote >= 0),
|
||||||
poll_vote_change INT2 DEFAULT '0' NOT NULL CHECK (poll_vote_change >= 0),
|
poll_vote_change INT2 DEFAULT '0' NOT NULL CHECK (poll_vote_change >= 0),
|
||||||
|
topic_delete_time INT4 DEFAULT '0' NOT NULL CHECK (topic_delete_time >= 0),
|
||||||
|
topic_delete_reason varchar(255) DEFAULT '' NOT NULL,
|
||||||
|
topic_delete_user INT4 DEFAULT '0' NOT NULL CHECK (topic_delete_user >= 0),
|
||||||
PRIMARY KEY (topic_id)
|
PRIMARY KEY (topic_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -467,7 +467,10 @@ CREATE TABLE phpbb_posts (
|
||||||
post_edit_reason text(65535) NOT NULL DEFAULT '',
|
post_edit_reason text(65535) NOT NULL DEFAULT '',
|
||||||
post_edit_user INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
post_edit_user INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||||
post_edit_count INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
post_edit_count INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||||
post_edit_locked INTEGER UNSIGNED NOT NULL DEFAULT '0'
|
post_edit_locked INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||||
|
post_delete_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||||
|
post_delete_reason text(65535) NOT NULL DEFAULT '',
|
||||||
|
post_delete_user INTEGER UNSIGNED NOT NULL DEFAULT '0'
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE INDEX phpbb_posts_forum_id ON phpbb_posts (forum_id);
|
CREATE INDEX phpbb_posts_forum_id ON phpbb_posts (forum_id);
|
||||||
|
@ -781,7 +784,10 @@ CREATE TABLE phpbb_topics (
|
||||||
poll_length INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
poll_length INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||||
poll_max_options tinyint(4) NOT NULL DEFAULT '1',
|
poll_max_options tinyint(4) NOT NULL DEFAULT '1',
|
||||||
poll_last_vote INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
poll_last_vote INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||||
poll_vote_change INTEGER UNSIGNED NOT NULL DEFAULT '0'
|
poll_vote_change INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||||
|
topic_delete_time INTEGER UNSIGNED NOT NULL DEFAULT '0',
|
||||||
|
topic_delete_reason text(65535) NOT NULL DEFAULT '',
|
||||||
|
topic_delete_user INTEGER UNSIGNED NOT NULL DEFAULT '0'
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE INDEX phpbb_topics_forum_id ON phpbb_topics (forum_id);
|
CREATE INDEX phpbb_topics_forum_id ON phpbb_topics (forum_id);
|
||||||
|
|
Loading…
Add table
Reference in a new issue