Manual:SqliteMaintenance.php

From Linux Web Expert

<td class="mw-version-versionbox" title="<translate nowrap> The latest stable version is <tvar name=1>1.41</tvar></translate>">
<translate> ≥</translate> 1.36
<translate> MediaWiki version:</translate>

Détails

SqliteMaintenance.php file is a maintenance script that performs some operations specific to SQLite database backend.

Options et arguments

Option Description Nécessaire ?
--vacuum Clean up database by removing deleted pages. Decreases database file size <translate> Optional</translate>
--integrity Check database for integrity <translate> Optional</translate>
--backup-to Backup database to the given file <translate> Optional</translate>
--check-syntax Check SQL file(s) for syntax errors <translate> Optional</translate>

Utilisation

php maintenance/SqliteMaintenance.php [ --vacuum| --integrity| --backup-to| --check-syntax ]

Contrôler l'intégrité

Terminal

Vacuum Operation

Terminal

Vérifier la syntaxe des fichiers SQL

patch-actor-table.sql
--
-- patch-actor-table.sql
--
-- T167246. Add an `actor` table.

CREATE TABLE /*_*/actor (
  actor_id bigint unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT,
  actor_user int unsigned,
  actor_name varchar(255) binary NOT NULL
) /*$wgDBTableOptions*/;
CREATE UNIQUE INDEX /*i*/actor_user ON /*_*/actor (actor_user);
CREATE UNIQUE INDEX /*i*/actor_name ON /*_*/actor (actor_name);
Terminal

Voir aussi