
CREATE TABLE JETSPEED_USER_PROFILE
(
    PSML_ID integer PRIMARY KEY,
    USER_NAME VARCHAR (32),
    MEDIA_TYPE VARCHAR (99),
    LANGUAGE VARCHAR (2),
    COUNTRY VARCHAR (2),
    PAGE VARCHAR (99),
    PROFILE longblob,
    UNIQUE (USER_NAME, MEDIA_TYPE, LANGUAGE, COUNTRY, PAGE)
);

CREATE  INDEX JETSPEED_USER_PROFILE_INDEX ON JETSPEED_USER_PROFILE (USER_NAME, MEDIA_TYPE, LANGUAGE, COUNTRY, PAGE);

CREATE TABLE JETSPEED_GROUP_PROFILE
(
    PSML_ID integer PRIMARY KEY,
    GROUP_NAME VARCHAR (99),
    MEDIA_TYPE VARCHAR (99),
    LANGUAGE VARCHAR (2),
    COUNTRY VARCHAR (2),
    PAGE VARCHAR (99),
    PROFILE longblob,
    UNIQUE (GROUP_NAME, MEDIA_TYPE, LANGUAGE, COUNTRY, PAGE)
);

CREATE  INDEX JETSPEED_GROUP_PROFILE_INDEX ON JETSPEED_GROUP_PROFILE (GROUP_NAME, MEDIA_TYPE, LANGUAGE, COUNTRY, PAGE);

CREATE TABLE JETSPEED_ROLE_PROFILE
(
    PSML_ID integer PRIMARY KEY,
    ROLE_NAME VARCHAR (99),
    MEDIA_TYPE VARCHAR (99),
    LANGUAGE VARCHAR (2),
    COUNTRY VARCHAR (2),
    PAGE VARCHAR (99),
    PROFILE longblob,
    UNIQUE (ROLE_NAME, MEDIA_TYPE, LANGUAGE, COUNTRY, PAGE)
);

CREATE  INDEX JETSPEED_ROLE_PROFILE_INDEX ON JETSPEED_ROLE_PROFILE (ROLE_NAME, MEDIA_TYPE, LANGUAGE, COUNTRY, PAGE);

CREATE TABLE JETSPEED_ANON_PROFILE
(
    PSML_ID integer PRIMARY KEY,
    MEDIA_TYPE VARCHAR (99),
    LANGUAGE VARCHAR (2),
    COUNTRY VARCHAR (2),
    PAGE VARCHAR (99),
    PROFILE longblob,
    UNIQUE (MEDIA_TYPE, LANGUAGE, COUNTRY, PAGE)
);

CREATE  INDEX JETSPEED_ANON_PROFILE_INDEX ON JETSPEED_ANON_PROFILE (MEDIA_TYPE, LANGUAGE, COUNTRY, PAGE);
