1 define mw_prefix='{$wgDBprefix}';
3 CREATE SEQUENCE sites_site_id_seq MINVALUE 0 START WITH 0;
4 CREATE TABLE &mw_prefix.sites (
5 site_id NUMBER NOT NULL,
6 site_global_key VARCHAR2(32) NOT NULL,
7 site_type VARCHAR2(32) NOT NULL,
8 site_group VARCHAR2(32) NOT NULL,
9 site_source VARCHAR2(32) NOT NULL,
10 site_language VARCHAR2(32) NOT NULL,
11 site_protocol VARCHAR2(32) NOT NULL,
12 site_domain VARCHAR2(255) NOT NULL,
13 site_data BLOB NOT NULL,
14 site_forward NUMBER(1) NOT NULL,
15 site_config BLOB NOT NULL
17 ALTER TABLE &mw_prefix.sites ADD CONSTRAINT &mw_prefix.sites_pk PRIMARY KEY (site_id);
18 CREATE UNIQUE INDEX &mw_prefix.sites_u01 ON &mw_prefix.sites (site_global_key);
19 CREATE INDEX &mw_prefix.sites_i01 ON &mw_prefix.sites (site_type);
20 CREATE INDEX &mw_prefix.sites_i02 ON &mw_prefix.sites (site_group);
21 CREATE INDEX &mw_prefix.sites_i03 ON &mw_prefix.sites (site_source);
22 CREATE INDEX &mw_prefix.sites_i04 ON &mw_prefix.sites (site_language);
23 CREATE INDEX &mw_prefix.sites_i05 ON &mw_prefix.sites (site_protocol);
24 CREATE INDEX &mw_prefix.sites_i06 ON &mw_prefix.sites (site_domain);
25 CREATE INDEX &mw_prefix.sites_i07 ON &mw_prefix.sites (site_forward);
27 CREATE TABLE &mw_prefix.site_identifiers (
28 si_site NUMBER NOT NULL,
29 si_type VARCHAR2(32) NOT NULL,
30 si_key VARCHAR2(32) NOT NULL
32 CREATE UNIQUE INDEX &mw_prefix.site_identifiers_u01 ON &mw_prefix.site_identifiers (si_type, si_key);
33 CREATE INDEX &mw_prefix.site_identifiers_i01 ON &mw_prefix.site_identifiers (si_site);
34 CREATE INDEX &mw_prefix.site_identifiers_i02 ON &mw_prefix.site_identifiers (si_key);