Extension:PageSecurity/Create the database tables

From MediaWiki.org
Jump to: navigation, search

The PageSecurity extension uses two specific database tables.

These tables must be created manually as part of the installation of the extension.

Some tools that can be used for this are MySQL Administrator and phpMyAdmin.

It also can be done with the command-line mysql utility.

Notes:

  • Be sure to create the tables on the correct database.
  • Add a table prefix if it is needed in your wiki installation.
  • If using PostgreSQL, try this user-contributed script.

[edit] Table security_definitions

CREATE TABLE `security_definitions` (
  `security_definition_id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `security_definition_name` VARCHAR(255) NOT NULL,
  `base_security_definition_id` INT(10) UNSIGNED NOT NULL,
  `security_definition_notice` VARCHAR(255) NOT NULL,
  `security_definition_logo` VARCHAR(255),
  PRIMARY KEY  (`security_definition_id`),
  UNIQUE KEY `Name` (`security_definition_name`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

[edit] Table security_definition_items

CREATE TABLE `security_definition_items` (
  `security_definition_item_id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `security_definition_id` INT(10) UNSIGNED NOT NULL,
  `security_definition_item_action` VARCHAR(255) NOT NULL,
  `security_definition_item_permission` CHAR(5) NOT NULL,
  `security_definition_item_group` VARCHAR(255) NOT NULL,
  PRIMARY KEY  (`security_definition_item_id`),
  KEY `security_definitions` USING BTREE (`security_definition_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
Personal tools
Namespaces
Variants
Actions
Site
Support
Download
Development
Communication
Print/export
Toolbox