You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1.2.2_02_automatic_addressbook.sql 964B

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