Jump to content

Manual:SqliteMaintenance.php

From mediawiki.org
MediaWiki version:
1.36

Details

[edit]

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

Options/Arguments

[edit]
Option Description Required?
--vacuum Clean up database by removing deleted pages. Decreases database file size Optional
--integrity Check database for integrity Optional
--backup-to Backup database to the given file Optional
--check-syntax Check SQL file(s) for syntax errors Optional

Usage

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

Checking integrity

[edit]
Terminal

Vacuum Operation

[edit]
Terminal

Checking SQL file syntax

[edit]
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

See also

[edit]