| 1 | { |
| 2 | "comment": "Set unsigned true for pr_page in page_restrictions table", |
| 3 | "before": { |
| 4 | "name": "page_restrictions", |
| 5 | "comment": "Used for storing page restrictions (i.e. protection levels)", |
| 6 | "columns": [ |
| 7 | { |
| 8 | "name": "pr_id", |
| 9 | "comment": "Field for an ID for this restrictions row (sort-key for Special:ProtectedPages)", |
| 10 | "type": "integer", |
| 11 | "options": { "unsigned": true, "notnull": true, "autoincrement": true } |
| 12 | }, |
| 13 | { |
| 14 | "name": "pr_page", |
| 15 | "comment": "Page to apply restrictions to (Foreign Key to page).", |
| 16 | "type": "integer", |
| 17 | "options": { "notnull": true } |
| 18 | }, |
| 19 | { |
| 20 | "name": "pr_type", |
| 21 | "comment": "The protection type (edit, move, etc)", |
| 22 | "type": "binary", |
| 23 | "options": { "length": 60, "notnull": true } |
| 24 | }, |
| 25 | { |
| 26 | "name": "pr_level", |
| 27 | "comment": "The protection level (Sysop, autoconfirmed, etc)", |
| 28 | "type": "binary", |
| 29 | "options": { "length": 60, "notnull": true } |
| 30 | }, |
| 31 | { |
| 32 | "name": "pr_cascade", |
| 33 | "type": "mwtinyint", |
| 34 | "options": { "notnull": true } |
| 35 | }, |
| 36 | { |
| 37 | "name": "pr_expiry", |
| 38 | "comment": "Field for time-limited protection.", |
| 39 | "type": "mwtimestamp", |
| 40 | "options": { |
| 41 | "notnull": false, |
| 42 | "CustomSchemaOptions": { |
| 43 | "allowInfinite": true |
| 44 | } |
| 45 | } |
| 46 | } |
| 47 | ], |
| 48 | "indexes": [ |
| 49 | { "name": "pr_pagetype", "columns": [ "pr_page", "pr_type" ], "unique": true }, |
| 50 | { "name": "pr_typelevel", "columns": [ "pr_type", "pr_level" ], "unique": false }, |
| 51 | { "name": "pr_level", "columns": [ "pr_level" ], "unique": false }, |
| 52 | { "name": "pr_cascade", "columns": [ "pr_cascade" ], "unique": false } |
| 53 | ], |
| 54 | "pk": [ "pr_id" ] |
| 55 | }, |
| 56 | "after": { |
| 57 | "name": "page_restrictions", |
| 58 | "comment": "Used for storing page restrictions (i.e. protection levels)", |
| 59 | "columns": [ |
| 60 | { |
| 61 | "name": "pr_id", |
| 62 | "comment": "Field for an ID for this restrictions row (sort-key for Special:ProtectedPages)", |
| 63 | "type": "integer", |
| 64 | "options": { "unsigned": true, "notnull": true, "autoincrement": true } |
| 65 | }, |
| 66 | { |
| 67 | "name": "pr_page", |
| 68 | "comment": "Page to apply restrictions to (Foreign Key to page).", |
| 69 | "type": "integer", |
| 70 | "options": { "notnull": true, "unsigned": true } |
| 71 | }, |
| 72 | { |
| 73 | "name": "pr_type", |
| 74 | "comment": "The protection type (edit, move, etc)", |
| 75 | "type": "binary", |
| 76 | "options": { "length": 60, "notnull": true } |
| 77 | }, |
| 78 | { |
| 79 | "name": "pr_level", |
| 80 | "comment": "The protection level (Sysop, autoconfirmed, etc)", |
| 81 | "type": "binary", |
| 82 | "options": { "length": 60, "notnull": true } |
| 83 | }, |
| 84 | { |
| 85 | "name": "pr_cascade", |
| 86 | "type": "mwtinyint", |
| 87 | "options": { "notnull": true } |
| 88 | }, |
| 89 | { |
| 90 | "name": "pr_expiry", |
| 91 | "comment": "Field for time-limited protection.", |
| 92 | "type": "mwtimestamp", |
| 93 | "options": { |
| 94 | "notnull": false, |
| 95 | "CustomSchemaOptions": { |
| 96 | "allowInfinite": true |
| 97 | } |
| 98 | } |
| 99 | } |
| 100 | ], |
| 101 | "indexes": [ |
| 102 | { "name": "pr_pagetype", "columns": [ "pr_page", "pr_type" ], "unique": true }, |
| 103 | { "name": "pr_typelevel", "columns": [ "pr_type", "pr_level" ], "unique": false }, |
| 104 | { "name": "pr_level", "columns": [ "pr_level" ], "unique": false }, |
| 105 | { "name": "pr_cascade", "columns": [ "pr_cascade" ], "unique": false } |
| 106 | ], |
| 107 | "pk": [ "pr_id" ] |
| 108 | } |
| 109 | } |