1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-05 07:07:51 +02:00

[feature/soft-delete] Add columns for soft delete details

PHPBB3-9657
This commit is contained in:
Joas Schilling 2012-09-28 16:17:21 +02:00
parent 8b2181eb85
commit dc2835af78
9 changed files with 61 additions and 7 deletions

View File

@ -1350,6 +1350,9 @@ function get_schema_struct()
'post_edit_user' => array('UINT', 0),
'post_edit_count' => array('USINT', 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',
'KEYS' => array(
@ -1703,6 +1706,9 @@ function get_schema_struct()
'poll_max_options' => array('TINT:4', 1),
'poll_last_vote' => array('TIMESTAMP', 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',
'KEYS' => array(

View File

@ -1104,6 +1104,9 @@ function database_update_info()
),
POSTS_TABLE => array(
'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(
'field_show_on_pm' => array('BOOL', 0),
@ -1118,7 +1121,10 @@ function database_update_info()
'style_parent_tree' => array('TEXT', ''),
),
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(

View File

@ -668,7 +668,10 @@ CREATE TABLE phpbb_posts (
post_edit_reason VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE,
post_edit_user 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);;
@ -1144,7 +1147,10 @@ CREATE TABLE phpbb_topics (
poll_length INTEGER DEFAULT 0 NOT NULL,
poll_max_options INTEGER DEFAULT 1 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);;

View File

@ -819,7 +819,10 @@ CREATE TABLE [phpbb_posts] (
[post_edit_reason] [varchar] (255) DEFAULT ('') NOT NULL ,
[post_edit_user] [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]
GO
@ -1379,7 +1382,10 @@ CREATE TABLE [phpbb_topics] (
[poll_length] [int] DEFAULT (0) NOT NULL ,
[poll_max_options] [int] DEFAULT (1) 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]
GO

View File

@ -481,6 +481,9 @@ CREATE TABLE phpbb_posts (
post_edit_user mediumint(8) 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_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),
KEY forum_id (forum_id),
KEY topic_id (topic_id),
@ -807,6 +810,9 @@ CREATE TABLE phpbb_topics (
poll_max_options tinyint(4) DEFAULT '1' NOT NULL,
poll_last_vote int(11) 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),
KEY forum_id (forum_id),
KEY forum_id_type (forum_id, topic_type),

View File

@ -481,6 +481,9 @@ CREATE TABLE phpbb_posts (
post_edit_user mediumint(8) 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_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),
KEY forum_id (forum_id),
KEY topic_id (topic_id),
@ -807,6 +810,9 @@ CREATE TABLE phpbb_topics (
poll_max_options tinyint(4) DEFAULT '1' NOT NULL,
poll_last_vote int(11) 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),
KEY forum_id (forum_id),
KEY forum_id_type (forum_id, topic_type),

View File

@ -904,6 +904,9 @@ CREATE TABLE phpbb_posts (
post_edit_user number(8) DEFAULT '0' NOT NULL,
post_edit_count number(4) 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)
)
/
@ -1510,6 +1513,9 @@ CREATE TABLE phpbb_topics (
poll_max_options number(4) DEFAULT '1' NOT NULL,
poll_last_vote number(11) 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)
)
/

View File

@ -655,6 +655,9 @@ CREATE TABLE phpbb_posts (
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_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)
);
@ -1045,6 +1048,9 @@ CREATE TABLE phpbb_topics (
poll_max_options INT2 DEFAULT '1' NOT NULL,
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),
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)
);

View File

@ -467,7 +467,10 @@ CREATE TABLE phpbb_posts (
post_edit_reason text(65535) NOT NULL DEFAULT '',
post_edit_user 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);
@ -781,7 +784,10 @@ CREATE TABLE phpbb_topics (
poll_length INTEGER UNSIGNED NOT NULL DEFAULT '0',
poll_max_options tinyint(4) NOT NULL DEFAULT '1',
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);