r91597 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91596‎ | r91597 | r91598 >
Date:20:21, 6 July 2011
Author:akshay
Status:resolved (Comments)
Tags:
Comment:
Added sourcetracking sql file
Modified paths:
  • /trunk/extensions/SignupAPI/sourcetracking.sql (added) (history)

Diff [purge]

Index: trunk/extensions/SignupAPI/sourcetracking.sql
@@ -0,0 +1,16 @@
 2+SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
 3+
 4+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
 5+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
 6+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
 7+/*!40101 SET NAMES utf8 */;
 8+
 9+
 10+CREATE TABLE IF NOT EXISTS `sourcetracking` (
 11+ `trackingid` int(11) NOT NULL AUTO_INCREMENT,
 12+ `userid` int(10) NOT NULL,
 13+ `source_action` varbinary(255) DEFAULT NULL,
 14+ `source_ns` int(11) NOT NULL,
 15+ `source_article` int(10) NOT NULL,
 16+ PRIMARY KEY (`trackingid`)
 17+) ENGINE=InnoDB DEFAULT CHARSET=latin1;

Follow-up revisions

RevisionCommit summaryAuthorDate
r94162Removed backticks,default engine,charset & added support for SQLite & table o...akshay15:49, 10 August 2011

Comments

#Comment by 😂 (talk | contribs)   23:38, 6 July 2011
  • We don't typically denote our table/column names with backticks, just use the bare name
  • Please put /*_*/ in front of 'sourcetracking' so it respects $wgDBprefix
  • Rather than using PRIMARY KEY(trackingid), do this: trackingid int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY. This way you can support Sqlite
  • Don't hardcode Engine=InnoDB and the charset, replace them with /*$wgDBTableOptions*/
#Comment by Siebrand (talk | contribs)   14:10, 4 August 2011

Akshay, please address these issues, or discuss them with your mentor jorm/Brandon Harris.

Status & tagging log