X-Git-Url: https://scripts.mit.edu/gitweb/autoinstallsdev/mediawiki.git/blobdiff_plain/19e297c21b10b1b8a3acad5e73fc71dcb35db44a..6932310fd58ebef145fa01eb76edf7150284d8ea:/maintenance/oracle/archives/patch-page_restrictions_pkuk_fix.sql

diff --git a/maintenance/oracle/archives/patch-page_restrictions_pkuk_fix.sql b/maintenance/oracle/archives/patch-page_restrictions_pkuk_fix.sql
new file mode 100644
index 00000000..56c392c1
--- /dev/null
+++ b/maintenance/oracle/archives/patch-page_restrictions_pkuk_fix.sql
@@ -0,0 +1,7 @@
+define mw_prefix='{$wgDBprefix}';
+
+ALTER TABLE &mw_prefix.page_restrictions DROP CONSTRAINT &mw_prefix.page_restrictions_pk;
+
+ALTER TABLE &mw_prefix.page_restrictions ADD CONSTRAINT &mw_prefix.page_restrictions_pk PRIMARY KEY (pr_id);
+
+CREATE UNIQUE INDEX &mw_prefix.page_restrictions_u01 ON &mw_prefix.page_restrictions (pr_page,pr_type);
