aboutsummaryrefslogtreecommitdiffstats
path: root/sql/sqlite/patch-page_restrictions-pr_page.sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sqlite/patch-page_restrictions-pr_page.sql')
-rw-r--r--sql/sqlite/patch-page_restrictions-pr_page.sql57
1 files changed, 40 insertions, 17 deletions
diff --git a/sql/sqlite/patch-page_restrictions-pr_page.sql b/sql/sqlite/patch-page_restrictions-pr_page.sql
index e215c1c3b78e..6dcb35c3a001 100644
--- a/sql/sqlite/patch-page_restrictions-pr_page.sql
+++ b/sql/sqlite/patch-page_restrictions-pr_page.sql
@@ -1,21 +1,44 @@
-- This file is automatically generated using maintenance/generateSchemaChangeSql.php.
--- Source: maintenance/abstractSchemaChanges/patch-page_restrictions-pr_page.json
+-- Source: sql/abstractSchemaChanges/patch-page_restrictions-pr_page.json
-- Do not modify this file directly.
-- See https://www.mediawiki.org/wiki/Manual:Schema_changes
-DROP INDEX pr_pagetype;
-DROP INDEX pr_typelevel;
-DROP INDEX pr_level;
-DROP INDEX pr_cascade;
CREATE TEMPORARY TABLE /*_*/__temp__page_restrictions AS
-SELECT pr_id, pr_page, pr_type, pr_level, pr_cascade, pr_expiry
-FROM /*_*/page_restrictions;
-DROP TABLE /*_*/page_restrictions;
-CREATE TABLE /*_*/page_restrictions ( pr_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, pr_page INTEGER UNSIGNED NOT NULL, pr_type BLOB NOT NULL, pr_level BLOB NOT NULL, pr_cascade SMALLINT NOT NULL, pr_expiry BLOB DEFAULT NULL );
-INSERT INTO /*_*/page_restrictions ( pr_id, pr_page, pr_type, pr_level, pr_cascade, pr_expiry )
-SELECT pr_id, pr_page, pr_type, pr_level, pr_cascade, pr_expiry
-FROM /*_*/__temp__page_restrictions;
-DROP TABLE /*_*/__temp__page_restrictions;
-CREATE UNIQUE INDEX pr_pagetype ON /*_*/page_restrictions (pr_page, pr_type);
-CREATE INDEX pr_typelevel ON /*_*/page_restrictions (pr_type, pr_level);
-CREATE INDEX pr_level ON /*_*/page_restrictions (pr_level);
-CREATE INDEX pr_cascade ON /*_*/page_restrictions (pr_cascade); \ No newline at end of file
+SELECT
+ pr_id,
+ pr_page,
+ pr_type,
+ pr_level,
+ pr_cascade,
+ pr_expiry
+FROM /*_*/page_restrictions;
+DROP TABLE /*_*/page_restrictions;
+
+
+CREATE TABLE /*_*/page_restrictions (
+ pr_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
+ pr_page INTEGER UNSIGNED NOT NULL,
+ pr_type BLOB NOT NULL, pr_level BLOB NOT NULL,
+ pr_cascade SMALLINT NOT NULL, pr_expiry BLOB DEFAULT NULL
+ );
+INSERT INTO /*_*/page_restrictions (
+ pr_id, pr_page, pr_type, pr_level,
+ pr_cascade, pr_expiry
+ )
+SELECT
+ pr_id,
+ pr_page,
+ pr_type,
+ pr_level,
+ pr_cascade,
+ pr_expiry
+FROM
+ /*_*/__temp__page_restrictions;
+DROP TABLE /*_*/__temp__page_restrictions;
+
+CREATE UNIQUE INDEX pr_pagetype ON /*_*/page_restrictions (pr_page, pr_type);
+
+CREATE INDEX pr_typelevel ON /*_*/page_restrictions (pr_type, pr_level);
+
+CREATE INDEX pr_level ON /*_*/page_restrictions (pr_level);
+
+CREATE INDEX pr_cascade ON /*_*/page_restrictions (pr_cascade);