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

Change subject: Fix sql errors
......................................................................


Fix sql errors

Make sql compatible with sqlite

Remove \r from sql file

Bug: T70968
Change-Id: Id99cf681f19280eebc6b51ed3f268042356fe869
---
M DownloadCounter.php
M DownloadCounter.sql
2 files changed, 11 insertions(+), 10 deletions(-)

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



diff --git a/DownloadCounter.php b/DownloadCounter.php
index 1fd289b..cfe3c94 100644
--- a/DownloadCounter.php
+++ b/DownloadCounter.php
@@ -85,6 +85,6 @@
  */
 function efDownloadCounterchemaUpdates( $updater ) {
        $base = dirname( __FILE__ );
-       $updater->addExtensionTable( 'downloads_counter', 
"$base/DownloadCounter.sql" );
+       $updater->addExtensionTable( 'downloads_files', 
"$base/DownloadCounter.sql" );
        return true;
 }
diff --git a/DownloadCounter.sql b/DownloadCounter.sql
index ecc5304..4d4b3d9 100644
--- a/DownloadCounter.sql
+++ b/DownloadCounter.sql
@@ -1,9 +1,10 @@
--- Create the table : 'downloads_files'
-
-CREATE TABLE /*_*/downloads_files (
-  filename      VARCHAR(255) NOT NULL, -- I guess, file name is unique ;o)
-  downloaded    INT(5)       NOT NULL DEFAULT 0, -- By default, downloaded 0 
time (could be 1)
-  last_download INT(5)       NOT NULL DEFAULT 0, -- By default, downloaded 0 
time (could be 1)
-
-PRIMARY KEY(filename)
-) /*$wgDBTableOptions*/;
\ No newline at end of file
+-- Create the table : 'downloads_files'
+
+CREATE TABLE IF NOT EXISTS /*_*/downloads_files (
+  -- I guess, file name is unique
+  filename      INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
+  -- By default, downloaded 0 time (could be 1)
+  downloaded    INT(5)       NOT NULL DEFAULT 0,
+  -- By default, downloaded 0 time (could be 1)
+  last_download INT(5)       NOT NULL DEFAULT 0
+) /*$wgDBTableOptions*/;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id99cf681f19280eebc6b51ed3f268042356fe869
Gerrit-PatchSet: 12
Gerrit-Project: mediawiki/extensions/DownloadCounter
Gerrit-Branch: master
Gerrit-Owner: Paladox <[email protected]>
Gerrit-Reviewer: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: MarkAHershberger <[email protected]>
Gerrit-Reviewer: Paladox <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: Springle <[email protected]>
Gerrit-Reviewer: Umherirrender <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to