Index: branches/Gadgets3.0/Gadgets.sql |
— | — | @@ -0,0 +1,55 @@ |
| 2 | +-- Gadgets 3.0 database schema shared between MySQL and SQLite |
| 3 | + |
| 4 | +-- Gadget definitions |
| 5 | +CREATE TABLE /*_*/gadgets ( |
| 6 | + -- Gadget id. Not shown anywhere in UI. |
| 7 | + ga_id int PRIMARY KEY AUTO_INCRMENT NOT NULL, |
| 8 | + |
| 9 | + -- Gadget internal name. Length restricted by user_properties.up_property length (32) - length( 'gadget-' ) (7) |
| 10 | + ga_name varchar(25) binary NOT NULL, |
| 11 | + |
| 12 | + -- If true, gadget's scripts don't support ResourceLoader |
| 13 | + ga_legacy bool default FALSE, |
| 14 | + |
| 15 | + -- Whether this gadget is enabled by default for everyone |
| 16 | + ga_default bool default FALSE, |
| 17 | + |
| 18 | + -- If true, gadget cannot be used by end-users directly, it just creates |
| 19 | + -- a ResourceLoader module that can be reused by other modules |
| 20 | + ga_resource_only bool default FALSE |
| 21 | +) /*$wgDBTableOptions*/; |
| 22 | + |
| 23 | +CREATE UNIQUE INDEX /*i*/ga_names ON /*_*/gadgets; |
| 24 | + |
| 25 | +-- Tracks what resources our gadget uses |
| 26 | +CREATE TABLE /*_*/gadget_resources ( |
| 27 | + -- References gadgets.ga_id |
| 28 | + gr_gadget int PRIMARY KEY NOT NULL, |
| 29 | + |
| 30 | + -- Resource type ('script' or 'style') |
| 31 | + gr_type varchar(16) binary NOT NULL, |
| 32 | + |
| 33 | + -- On-wiki path to resource |
| 34 | + gr_path varchar(255) binary NOT NULL |
| 35 | +) /*$wgDBTableOptions*/; |
| 36 | + |
| 37 | +-- Tracks dependencies between gadgets and ResourceLoader modules |
| 38 | +CREATE TABLE /*_*/gadget_dependencies ( |
| 39 | + -- References gadgets.ga_id |
| 40 | + gd_gadget int PRIMARY KEY NOT NULL, |
| 41 | + |
| 42 | + -- Module name |
| 43 | + gd_module varbinary(255) NOT NULL |
| 44 | +) /*$wgDBTableOptions*/; |
| 45 | + |
| 46 | +CREATE INDEX /*i*/gd_modules ON /*_*/gadget_dependencies; |
| 47 | + |
| 48 | +-- Tracks user permissions required by gadgets |
| 49 | +CREATE TABLE /*_*/gadget_rights ( |
| 50 | + -- References gadgets.ga_id |
| 51 | + grt_gadget int PRIMARY KEY NOT NULL, |
| 52 | + |
| 53 | + -- Permission |
| 54 | + grt_right varchar(64) binary NOT NULL |
| 55 | +) /*$wgDBTableOptions*/; |
| 56 | + |
Property changes on: branches/Gadgets3.0/Gadgets.sql |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 57 | + native |