1--
2-- Sequence "collected_contacts_seq"
3-- Name: collected_contacts_seq; Type: SEQUENCE; Schema: public; Owner: postgres
4--
5
6CREATE SEQUENCE collected_contacts_seq
7    START WITH 1
8    INCREMENT BY 1
9    NO MAXVALUE
10    NO MINVALUE
11    CACHE 1;
12
13--
14-- Table "collected_contacts"
15-- Name: collected_contacts; Type: TABLE; Schema: public; Owner: postgres
16--
17
18CREATE TABLE collected_contacts (
19    contact_id integer DEFAULT nextval('collected_contacts_seq'::text) PRIMARY KEY,
20    user_id integer NOT NULL
21        REFERENCES users (user_id) ON DELETE CASCADE ON UPDATE CASCADE,
22    changed timestamp with time zone DEFAULT now() NOT NULL,
23    del smallint DEFAULT 0 NOT NULL,
24    name varchar(128) DEFAULT '' NOT NULL,
25    email text DEFAULT '' NOT NULL,
26    firstname varchar(128) DEFAULT '' NOT NULL,
27    surname varchar(128) DEFAULT '' NOT NULL,
28    vcard text,
29    words text
30);
31
32CREATE INDEX collected_contacts_user_id_idx ON collected_contacts (user_id, del);
33