Remove recentchanges.rc_cur_time from sql statements
Field is unused since many versions, so remove the use in sql statements, to allow dropping in a later version. The field must not be reference from INSERT because it has a default value, which is used, when no value is specified in the statement. Keeping the field allows easier rollback on version update, when something gets wrong with the new version. Existing Comment in tables.sql was added with r101293, was already disused in r11088 Bug: 40667 Change-Id: I4a9c2fa813d1f25dfb755e564f7677a212934d7b
This commit is contained in:
parent
ceba5987b0
commit
974562aee9
3 changed files with 2 additions and 9 deletions
|
|
@ -26,7 +26,6 @@
|
|||
* mAttribs:
|
||||
* rc_id id of the row in the recentchanges table
|
||||
* rc_timestamp time the entry was made
|
||||
* rc_cur_time timestamp on the cur row
|
||||
* rc_namespace namespace #
|
||||
* rc_title non-prefixed db key
|
||||
* rc_type is new entry, used to determine whether updating is necessary
|
||||
|
|
@ -155,7 +154,6 @@ class RecentChange {
|
|||
return array(
|
||||
'rc_id',
|
||||
'rc_timestamp',
|
||||
'rc_cur_time',
|
||||
'rc_user',
|
||||
'rc_user_text',
|
||||
'rc_namespace',
|
||||
|
|
@ -254,7 +252,6 @@ class RecentChange {
|
|||
|
||||
# Fixup database timestamps
|
||||
$this->mAttribs['rc_timestamp'] = $dbw->timestamp( $this->mAttribs['rc_timestamp'] );
|
||||
$this->mAttribs['rc_cur_time'] = $dbw->timestamp( $this->mAttribs['rc_cur_time'] );
|
||||
$this->mAttribs['rc_id'] = $dbw->nextSequenceValue( 'recentchanges_rc_id_seq' );
|
||||
|
||||
## If we are using foreign keys, an entry of 0 for the page_id will fail, so use NULL
|
||||
|
|
@ -495,7 +492,6 @@ class RecentChange {
|
|||
$rc->mPerformer = $user;
|
||||
$rc->mAttribs = array(
|
||||
'rc_timestamp' => $timestamp,
|
||||
'rc_cur_time' => $timestamp,
|
||||
'rc_namespace' => $title->getNamespace(),
|
||||
'rc_title' => $title->getDBkey(),
|
||||
'rc_type' => RC_EDIT,
|
||||
|
|
@ -555,7 +551,6 @@ class RecentChange {
|
|||
$rc->mPerformer = $user;
|
||||
$rc->mAttribs = array(
|
||||
'rc_timestamp' => $timestamp,
|
||||
'rc_cur_time' => $timestamp,
|
||||
'rc_namespace' => $title->getNamespace(),
|
||||
'rc_title' => $title->getDBkey(),
|
||||
'rc_type' => RC_NEW,
|
||||
|
|
@ -665,7 +660,6 @@ class RecentChange {
|
|||
$rc->mPerformer = $user;
|
||||
$rc->mAttribs = array(
|
||||
'rc_timestamp' => $timestamp,
|
||||
'rc_cur_time' => $timestamp,
|
||||
'rc_namespace' => $target->getNamespace(),
|
||||
'rc_title' => $target->getDBkey(),
|
||||
'rc_type' => RC_LOG,
|
||||
|
|
@ -721,7 +715,6 @@ class RecentChange {
|
|||
wfDeprecated( __METHOD__, '1.22' );
|
||||
$this->mAttribs = array(
|
||||
'rc_timestamp' => wfTimestamp( TS_MW, $row->rev_timestamp ),
|
||||
'rc_cur_time' => $row->rev_timestamp,
|
||||
'rc_user' => $row->rev_user,
|
||||
'rc_user_text' => $row->rev_user_text,
|
||||
'rc_namespace' => $row->page_namespace,
|
||||
|
|
|
|||
|
|
@ -70,7 +70,6 @@ class RebuildRecentchanges extends Maintenance {
|
|||
$dbw->insertSelect( 'recentchanges', array( 'page', 'revision' ),
|
||||
array(
|
||||
'rc_timestamp' => 'rev_timestamp',
|
||||
'rc_cur_time' => 'rev_timestamp',
|
||||
'rc_user' => 'rev_user',
|
||||
'rc_user_text' => 'rev_user_text',
|
||||
'rc_namespace' => 'page_namespace',
|
||||
|
|
@ -185,7 +184,6 @@ class RebuildRecentchanges extends Maintenance {
|
|||
$dbw->insertSelect( 'recentchanges', array( 'user', "$logging LEFT JOIN $page ON (log_namespace=page_namespace AND log_title=page_title)" ),
|
||||
array(
|
||||
'rc_timestamp' => 'log_timestamp',
|
||||
'rc_cur_time' => 'log_timestamp',
|
||||
'rc_user' => 'log_user',
|
||||
'rc_user_text' => 'user_name',
|
||||
'rc_namespace' => 'log_namespace',
|
||||
|
|
|
|||
|
|
@ -1026,6 +1026,8 @@ CREATE TABLE /*_*/recentchanges (
|
|||
rc_timestamp varbinary(14) NOT NULL default '',
|
||||
|
||||
-- This is no longer used
|
||||
-- Field kept in database for downgrades
|
||||
-- @todo: add drop patch with 1.24
|
||||
rc_cur_time varbinary(14) NOT NULL default '',
|
||||
|
||||
-- As in revision
|
||||
|
|
|
|||
Loading…
Reference in a new issue