jenkins-bot has submitted this change and it was merged.

Change subject: Clean up SQL files, made compatible for sqlite
......................................................................


Clean up SQL files, made compatible for sqlite

Removed the mysqldump stuff, and made the PRIMARY KEY compatible with sqlite.

Change-Id: I84a1d8fd6fb0f004e8c6ed11e4643bbdcc168a4b
---
M db_patches/reverted_edits.sql
M db_patches/spam_ham_texts.sql
M db_patches/word_frequency.sql
3 files changed, 9 insertions(+), 53 deletions(-)

Approvals:
  Addshore: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/db_patches/reverted_edits.sql b/db_patches/reverted_edits.sql
index f72f4ae..f9b2095 100644
--- a/db_patches/reverted_edits.sql
+++ b/db_patches/reverted_edits.sql
@@ -1,29 +1,7 @@
--- MySQL dump 10.13  Distrib 5.1.63, for apple-darwin10.3.0 (i386)
---
--- Host: localhost    Database: wiki
--- ------------------------------------------------------
--- Server version      5.1.63
+DROP TABLE IF EXISTS /*_*/reverted_edits;
 
-/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
-/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
-/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
-/*!40101 SET NAMES utf8 */;
-/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
-/*!40103 SET TIME_ZONE='+00:00' */;
-/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
-/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, 
FOREIGN_KEY_CHECKS=0 */;
-/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
-/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
-
---
--- Table structure for table `reverted_edits`
---
-
-DROP TABLE IF EXISTS `reverted_edits`;
-/*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE  /*_*/`reverted_edits` (
-  `re_reversion_id` int(11) NOT NULL AUTO_INCREMENT,
+CREATE TABLE  /*_*/reverted_edits (
+  `re_reversion_id` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
   `re_undid_rev_id` int(11) NOT NULL,
   `re_curr_rev_id` int(11) NOT NULL,
   `re_page` int(11) NOT NULL,
@@ -39,29 +17,9 @@
   `re_user_text` text,
   `re_action` varbinary(8),
   `re_spam` bool DEFAULT NULL,
-  `re_timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE 
CURRENT_TIMESTAMP,
-  PRIMARY KEY (`re_reversion_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
+  `re_timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE 
CURRENT_TIMESTAMP
+) /*$wgDBTableOptions*/;
 
 CREATE INDEX  /*i*/reverted_edits_undid_rev_id ON 
/*_*/reverted_edits(re_undid_rev_id);
 CREATE INDEX  /*i*/reverted_edits_curr_rev_id ON 
/*_*/reverted_edits(re_curr_rev_id);
---
--- Dumping data for table `reverted_edits`
---
 
-LOCK TABLES `reverted_edits` WRITE;
-/*!40000 ALTER TABLE `reverted_edits` DISABLE KEYS */;
-/*!40000 ALTER TABLE `reverted_edits` ENABLE KEYS */;
-UNLOCK TABLES;
-/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
-
-/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
-/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
-/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
-/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
-/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
-/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
-/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-
--- Dump completed on 2013-07-12 15:38:23
diff --git a/db_patches/spam_ham_texts.sql b/db_patches/spam_ham_texts.sql
index dca570e..590476e 100644
--- a/db_patches/spam_ham_texts.sql
+++ b/db_patches/spam_ham_texts.sql
@@ -1,8 +1,7 @@
 DROP TABLE IF EXISTS /*_*/spam_ham_texts;
 
 CREATE TABLE /*_*/spam_ham_texts (
-  `sht_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+  `sht_id` int(10) unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY,
   `sht_spam` tinyint(1) DEFAULT NULL,
-  `sht_text` mediumblob NOT NULL,
-  PRIMARY KEY (`sht_id`)
+  `sht_text` mediumblob NOT NULL
 ) /*$wgDBTableOptions*/;
\ No newline at end of file
diff --git a/db_patches/word_frequency.sql b/db_patches/word_frequency.sql
index f5ebe48..8d45dc5 100644
--- a/db_patches/word_frequency.sql
+++ b/db_patches/word_frequency.sql
@@ -1,11 +1,10 @@
 DROP TABLE IF EXISTS /*_*/word_frequency;
 
 CREATE TABLE /*_*/word_frequency (
-  `wf_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+  `wf_id` int(10) unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY,
   `wf_word` varchar(100) DEFAULT NULL,
   `wf_spam` int(10) unsigned NOT NULL,
-  `wf_ham` int(10) unsigned NOT NULL,
-  PRIMARY KEY (`wf_id`)
+  `wf_ham` int(10) unsigned NOT NULL
 ) /*$wgDBTableOptions*/;
 
 CREATE INDEX  /*i*/word_frequency_word ON /*_*/word_frequency(wf_word);
\ No newline at end of file

-- 
To view, visit https://gerrit.wikimedia.org/r/165754
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I84a1d8fd6fb0f004e8c6ed11e4643bbdcc168a4b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BayesianFilter
Gerrit-Branch: master
Gerrit-Owner: Southparkfan <southparkfan...@hotmail.com>
Gerrit-Reviewer: Addshore <addshorew...@gmail.com>
Gerrit-Reviewer: Aklapper <aklap...@wikimedia.org>
Gerrit-Reviewer: Anubhavagarwal <anubhav...@gmail.com>
Gerrit-Reviewer: CSteipp <cste...@wikimedia.org>
Gerrit-Reviewer: Qgil <q...@wikimedia.org>
Gerrit-Reviewer: Springle <sprin...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to