Fix SQLite patch-(page|template)links-fix-pk.sql column order
[lhc/web/wiklou.git] / maintenance / sqlite / archives / patch-interwiki-fix-pk.sql
1 CREATE TABLE /*_*/interwiki_tmp (
2 -- The interwiki prefix, (e.g. "Meatball", or the language prefix "de")
3 iw_prefix varchar(32) NOT NULL PRIMARY KEY,
4
5 -- The URL of the wiki, with "$1" as a placeholder for an article name.
6 -- Any spaces in the name will be transformed to underscores before
7 -- insertion.
8 iw_url blob NOT NULL,
9
10 -- The URL of the file api.php
11 iw_api blob NOT NULL,
12
13 -- The name of the database (for a connection to be established with LBFactory::getMainLB( 'wikiid' ))
14 iw_wikiid varchar(64) NOT NULL,
15
16 -- A boolean value indicating whether the wiki is in this project
17 -- (used, for example, to detect redirect loops)
18 iw_local bool NOT NULL,
19
20 -- Boolean value indicating whether interwiki transclusions are allowed.
21 iw_trans tinyint NOT NULL default 0
22 ) /*$wgDBTableOptions*/;
23
24 INSERT INTO /*_*/interwiki_tmp
25 SELECT * FROM /*_*/interwiki;
26
27 DROP TABLE /*_*/interwiki;
28
29 ALTER TABLE /*_*/interwiki_tmp RENAME TO /*_*/interwiki;