1 CREATE SEQUENCE sites_site_id_seq;
3 site_id INTEGER NOT NULL PRIMARY KEY DEFAULT nextval('sites_site_id_seq'),
4 site_global_key TEXT NOT NULL,
5 site_type TEXT NOT NULL,
6 site_group TEXT NOT NULL,
7 site_source TEXT NOT NULL,
8 site_language TEXT NOT NULL,
9 site_protocol TEXT NOT NULL,
10 site_domain TEXT NOT NULL,
11 site_data TEXT NOT NULL,
12 site_forward SMALLINT NOT NULL,
13 site_config TEXT NOT NULL
15 CREATE UNIQUE INDEX site_global_key ON sites (site_global_key);
16 CREATE INDEX site_type ON sites (site_type);
17 CREATE INDEX site_group ON sites (site_group);
18 CREATE INDEX site_source ON sites (site_source);
19 CREATE INDEX site_language ON sites (site_language);
20 CREATE INDEX site_protocol ON sites (site_protocol);
21 CREATE INDEX site_domain ON sites (site_domain);
22 CREATE INDEX site_forward ON sites (site_forward);
24 CREATE TABLE site_identifiers (
25 si_site INTEGER NOT NULL,
26 si_type TEXT NOT NULL,
29 CREATE UNIQUE INDEX si_type_key ON site_identifiers (si_type, si_key);
30 CREATE INDEX si_site ON site_identifiers (si_site);
31 CREATE INDEX si_key ON site_identifiers (si_key);