CREATE TABLE mp_friendlyurls (
urlid integer DEFAULT nextval('"mp_friendlyurls_urlid_seq"'::text) NOT NULL,
siteid integer NOT NULL,
friendlyurl character varying(255),
realurl character varying(255),
ispattern boolean
);
CREATE UNIQUE INDEX mp_friendlyurls_idxurlid_idx ON mp_friendlyurls USING btree (itemid);
In mp_friendlyurls don´t have column itemid ???