1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 05:50:42 +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

@@ -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);