Cook879 has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/316286

Change subject: Update of SQL files to reflect all the changes in the database 
that happened "on the fly" during development
......................................................................

Update of SQL files to reflect all the changes in the database that
happened "on the fly" during development

Change-Id: I66d26375621296a5bd04dc6040674113a0d2a3bd
---
M AthenaHooks.php
M sql/athena_logs.sql
D sql/athena_probability.postgres.sql
D sql/athena_probability.sql
4 files changed, 75 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Athena 
refs/changes/86/316286/1

diff --git a/AthenaHooks.php b/AthenaHooks.php
index 93f3cb9..e751f51 100644
--- a/AthenaHooks.php
+++ b/AthenaHooks.php
@@ -54,7 +54,6 @@
         * @return bool
         */
        static function createTables( $updater ) {
-               $updater->addExtensionUpdate( array( 'addTable', 
'athena_weighting', __DIR__ . '/sql/athena_probability.sql', true ) );
                $updater->addExtensionUpdate( array( 'addTable', 'athena_log', 
__DIR__ . '/sql/athena_logs.sql', true ) );
 
                return true;
diff --git a/sql/athena_logs.sql b/sql/athena_logs.sql
index 840027e..c6043cc 100644
--- a/sql/athena_logs.sql
+++ b/sql/athena_logs.sql
@@ -82,3 +82,78 @@
   `ac_p_linksandnotspam` double unsigned NOT NULL,
   `ac_p_linksgivennotspam` double unsigned NOT NULL
 );
+
+--
+-- Table structure for table `athena_stats`
+--
+CREATE TABLE athena_stats (
+  `as_id` int(10) unsigned PRIMARY KEY auto_increment,
+  `as_name` varbinary(255) NOT NULL default '',
+  `as_value` integer unsigned NOT NULL default 0,
+  `as_updated` timestamp NOT NULL default CURRENT_TIMESTAMP
+);
+
+INSERT INTO `athena_stats` (`as_id`, `as_name`, `as_value`, `as_updated`) 
VALUES
+(1, 'pages', 0, '0000-00-00 00:00:00'),
+(2, 'spam', 0, '0000-00-00 00:00:00'),
+(3, 'notspam', 0, '0000-00-00 00:00:00'),
+(4, 'difflang', 0, '0000-00-00 00:00:00'),
+(5, 'samelang', 0, '0000-00-00 00:00:00'),
+(6, 'deleted', 0, '0000-00-00 00:00:00'),
+(7, 'notdeleted', 0, '0000-00-00 00:00:00'),
+(8, 'wanted', 0, '0000-00-00 00:00:00'),
+(9, 'notwanted', 0, '0000-00-00 00:00:00'),
+(10, 'userother', 0, '0000-00-00 00:00:00'),
+(11, 'anon', 0, '0000-00-00 00:00:00'),
+(12, 'user1', 0, '0000-00-00 00:00:00'),
+(13, 'user5', 0, '0000-00-00 00:00:00'),
+(14, 'user30', 0, '0000-00-00 00:00:00'),
+(15, 'user60', 0, '0000-00-00 00:00:00'),
+(16, 'user12', 0, '0000-00-00 00:00:00'),
+(17, 'user24', 0, '0000-00-00 00:00:00'),
+(18, 'titlelength', 0, '0000-00-00 00:00:00'),
+(19, 'nottitlelength', 0, '0000-00-00 00:00:00'),
+(20, 'nsmain', 0, '0000-00-00 00:00:00'),
+(21, 'nstalk', 0, '0000-00-00 00:00:00'),
+(22, 'nsuser', 0, '0000-00-00 00:00:00'),
+(23, 'nsusertalk', 0, '0000-00-00 00:00:00'),
+(24, 'nsother', 0, '0000-00-00 00:00:00'),
+(25, 'syntaxnone', 0, '0000-00-00 00:00:00'),
+(26, 'syntaxbasic', 0, '0000-00-00 00:00:00'),
+(27, 'syntaxcomplex', 0, '0000-00-00 00:00:00'),
+(28, 'brokenspambot', 0, '0000-00-00 00:00:00'),
+(29, 'links0', 0, '0000-00-00 00:00:00'),
+(30, 'links5', 0, '0000-00-00 00:00:00'),
+(31, 'links20', 0, '0000-00-00 00:00:00'),
+(32, 'links50', 0, '0000-00-00 00:00:00'),
+(33, 'spamanddifflang', 0, '0000-00-00 00:00:00'),
+(34, 'spamandsamelang', 0, '0000-00-00 00:00:00'),
+(35, 'spamanddeleted', 0, '0000-00-00 00:00:00'),
+(36, 'spamandnotdeleted', 0, '0000-00-00 00:00:00'),
+(37, 'spamandwanted', 0, '0000-00-00 00:00:00'),
+(38, 'spamandnotwanted', 0, '0000-00-00 00:00:00'),
+(39, 'spamanduserother', 0, '0000-00-00 00:00:00'),
+(40, 'spamandanon', 0, '0000-00-00 00:00:00'),
+(41, 'spamanduser1', 0, '0000-00-00 00:00:00'),
+(42, 'spamanduser5', 0, '0000-00-00 00:00:00'),
+(43, 'spamanduser30', 0, '0000-00-00 00:00:00'),
+(44, 'spamanduser60', 0, '0000-00-00 00:00:00'),
+(45, 'spamanduser12', 0, '0000-00-00 00:00:00'),
+(46, 'spamanduser24', 0, '0000-00-00 00:00:00'),
+(47, 'spamandtitlelength', 0, '0000-00-00 00:00:00'),
+(48, 'spamandnottitlelength', 0, '0000-00-00 00:00:00'),
+(49, 'spamandnsmain', 0, '0000-00-00 00:00:00'),
+(50, 'spamandnstalk', 0, '0000-00-00 00:00:00'),
+(51, 'spamandnsuser', 0, '0000-00-00 00:00:00'),
+(52, 'spamandnsusertalk', 0, '0000-00-00 00:00:00'),
+(53, 'spamandnsother', 0, '0000-00-00 00:00:00'),
+(54, 'spamandsyntaxnone', 0, '0000-00-00 00:00:00'),
+(55, 'spamandsyntaxbasic', 0, '0000-00-00 00:00:00'),
+(56, 'spamandsyntaxcomplex', 0, '0000-00-00 00:00:00'),
+(57, 'spamandbrokenspambot', 0, '0000-00-00 00:00:00'),
+(58, 'spamandlinks0', 0, '0000-00-00 00:00:00'),
+(59, 'spamandlinks5', 0, '0000-00-00 00:00:00'),
+(60, 'spamandlinks20', 0, '0000-00-00 00:00:00'),
+(61, 'spamandlinks50', 0, '0000-00-00 00:00:00'),
+(62, 'nsfile', 0, '0000-00-00 00:00:00'),
+(63, 'spamandnsfile', 0, '0000-00-00 00:00:00');
diff --git a/sql/athena_probability.postgres.sql 
b/sql/athena_probability.postgres.sql
deleted file mode 100644
index 5a68b9c..0000000
--- a/sql/athena_probability.postgres.sql
+++ /dev/null
@@ -1,10 +0,0 @@
--- Postgres version
--- TODO check it actually works
-CREATE TABLE athena_probability (
-  ap_id             SERIAL       PRIMARY KEY,
-  ap_variable       TEXT         NOT NULL  DEFAULT '',
-  ap_given          TEXT                   DEFAULT '',
-  ap_value          DECIMAL      NOT NULL  DEFAULT 0.01,
-  ap_updated        TIMESTAMPTZ  NOT NULL  DEFAULT now()
-);
-CREATE INDEX athena_probability_ap_id ON athena_probability(ap_id);
diff --git a/sql/athena_probability.sql b/sql/athena_probability.sql
deleted file mode 100644
index 58bc464..0000000
--- a/sql/athena_probability.sql
+++ /dev/null
@@ -1,10 +0,0 @@
---
--- Table structure for table `athena_stats`
---
-
-CREATE TABLE athena_stats (
-  `as_id` int(10) unsigned PRIMARY KEY auto_increment,
-  `as_name` varbinary(255) NOT NULL default '',
-  `as_value` integer unsigned NOT NULL default 0,
-  `as_updated` timestamp NOT NULL default CURRENT_TIMESTAMP
-);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I66d26375621296a5bd04dc6040674113a0d2a3bd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Athena
Gerrit-Branch: master
Gerrit-Owner: Cook879 <cook...@shoutwiki.com>

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

Reply via email to