--
--

-- Started on 2010-01-01 13:28:36

SET escape_string_warning = off;

--
-- TOC entry 1921 (class 1262 OID 25205)
-- Name: claros; Type: DATABASE; Schema: -; Owner: postgres
--

CREATE DATABASE claros WITH TEMPLATE = template0 ENCODING = 'UTF8';


ALTER DATABASE claros OWNER TO postgres;


SET escape_string_warning = off;




--
-- TOC entry 1507 (class 1259 OID 26423)
-- Dependencies: 1797 1798 1799 1800 3
-- Name: calendar_objects; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE calendar_objects (
    id integer NOT NULL,
    username character varying(255) DEFAULT ''::character varying NOT NULL,
    record_date timestamp without time zone NOT NULL,
    repeat_type integer DEFAULT 0 NOT NULL,
    category character varying(255) DEFAULT ''::character varying NOT NULL,
    description text NOT NULL,
    reminder_days integer DEFAULT 0 NOT NULL
);


ALTER TABLE public.calendar_objects OWNER TO postgres;

--
-- TOC entry 1506 (class 1259 OID 26421)
-- Dependencies: 1507 3
-- Name: calendar_objects_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE calendar_objects_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;


ALTER TABLE public.calendar_objects_id_seq OWNER TO postgres;

--
-- TOC entry 1924 (class 0 OID 0)
-- Dependencies: 1506
-- Name: calendar_objects_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE calendar_objects_id_seq OWNED BY calendar_objects.id;


--
-- TOC entry 1925 (class 0 OID 0)
-- Dependencies: 1506
-- Name: calendar_objects_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('calendar_objects_id_seq', 1, false);


--
-- TOC entry 1513 (class 1259 OID 26499)
-- Dependencies: 1843 1844 1845 3
-- Name: contact_group_objects; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE contact_group_objects (
    id integer NOT NULL,
    username character varying(255) DEFAULT ''::character varying NOT NULL,
    group_id numeric(20,0) DEFAULT 0::numeric NOT NULL,
    contact_id numeric(20,0) DEFAULT 0::numeric NOT NULL
);


ALTER TABLE public.contact_group_objects OWNER TO postgres;

--
-- TOC entry 1512 (class 1259 OID 26497)
-- Dependencies: 3 1513
-- Name: contact_group_objects_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE contact_group_objects_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;


ALTER TABLE public.contact_group_objects_id_seq OWNER TO postgres;

--
-- TOC entry 1926 (class 0 OID 0)
-- Dependencies: 1512
-- Name: contact_group_objects_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE contact_group_objects_id_seq OWNED BY contact_group_objects.id;


--
-- TOC entry 1927 (class 0 OID 0)
-- Dependencies: 1512
-- Name: contact_group_objects_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('contact_group_objects_id_seq', 1, false);


--
-- TOC entry 1511 (class 1259 OID 26485)
-- Dependencies: 1839 1840 1841 3
-- Name: contact_groups; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE contact_groups (
    id integer NOT NULL,
    username character varying(255) DEFAULT ''::character varying NOT NULL,
    short_name character varying(100) DEFAULT ''::character varying,
    description character varying(255) DEFAULT ''::character varying
);


ALTER TABLE public.contact_groups OWNER TO postgres;

--
-- TOC entry 1510 (class 1259 OID 26483)
-- Dependencies: 3 1511
-- Name: contact_groups_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE contact_groups_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;


ALTER TABLE public.contact_groups_id_seq OWNER TO postgres;

--
-- TOC entry 1928 (class 0 OID 0)
-- Dependencies: 1510
-- Name: contact_groups_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE contact_groups_id_seq OWNED BY contact_groups.id;


--
-- TOC entry 1929 (class 0 OID 0)
-- Dependencies: 1510
-- Name: contact_groups_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('contact_groups_id_seq', 1, false);


--
-- TOC entry 1509 (class 1259 OID 26438)
-- Dependencies: 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 3
-- Name: contacts; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE contacts (
    id integer NOT NULL,
    username character varying(255) DEFAULT ''::character varying,
    first_name character varying(100) DEFAULT ''::character varying NOT NULL,
    middle_name character varying(100) DEFAULT ''::character varying,
    last_name character varying(100) DEFAULT ''::character varying NOT NULL,
    title character varying(50) DEFAULT ''::character varying,
    sex character varying(10) DEFAULT ''::character varying,
    gsm_no_primary character varying(30) DEFAULT ''::character varying,
    gsm_no_alternate character varying(30) DEFAULT ''::character varying,
    email_primary character varying(255) DEFAULT ''::character varying,
    email_alternate character varying(255) DEFAULT ''::character varying,
    web_page character varying(255) DEFAULT ''::character varying,
    personal_note text,
    spouse_name character varying(255) DEFAULT ''::character varying,
    nick_name character varying(50) DEFAULT ''::character varying,
    home_address text,
    home_city character varying(255) DEFAULT ''::character varying,
    home_province character varying(255) DEFAULT ''::character varying,
    home_zip character varying(5) DEFAULT ''::character varying,
    home_country character varying(100) DEFAULT ''::character varying,
    home_phone character varying(30) DEFAULT ''::character varying,
    home_faks character varying(30) DEFAULT ''::character varying,
    work_company character varying(100) DEFAULT ''::character varying,
    work_job_title character varying(100) DEFAULT ''::character varying,
    work_department character varying(100) DEFAULT ''::character varying,
    work_office character varying(100) DEFAULT ''::character varying,
    work_profession character varying(100) DEFAULT ''::character varying,
    work_manager_name character varying(255) DEFAULT ''::character varying,
    work_assistant_name character varying(255) DEFAULT ''::character varying,
    work_address text,
    work_city character varying(255) DEFAULT ''::character varying,
    work_province character varying(255) DEFAULT ''::character varying,
    work_zip character varying(5) DEFAULT ''::character varying,
    work_country character varying(100) DEFAULT ''::character varying,
    work_phone character varying(30) DEFAULT ''::character varying,
    work_faks character varying(30) DEFAULT ''::character varying,
    birth_day character varying(2) DEFAULT NULL::character varying,
    anniversary_day character varying(2) DEFAULT NULL::character varying,
    birth_month character varying(2) DEFAULT NULL::character varying,
    anniversary_month character varying(2) DEFAULT NULL::character varying
);


ALTER TABLE public.contacts OWNER TO postgres;

--
-- TOC entry 1508 (class 1259 OID 26436)
-- Dependencies: 3 1509
-- Name: contacts_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE contacts_id_seq
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;


ALTER TABLE public.contacts_id_seq OWNER TO postgres;

--
-- TOC entry 1930 (class 0 OID 0)
-- Dependencies: 1508
-- Name: contacts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE contacts_id_seq OWNED BY contacts.id;


--
-- TOC entry 1931 (class 0 OID 0)
-- Dependencies: 1508
-- Name: contacts_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('contacts_id_seq', 15, true);


--
-- TOC entry 1515 (class 1259 OID 26510)
-- Dependencies: 1847 1848 1849 1850 3
-- Name: folder_db_objects; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE folder_db_objects (
    id integer NOT NULL,
    username character varying(255) DEFAULT NULL::character varying,
    parent_id numeric(20,0) DEFAULT 0::numeric,
    folder_name character varying(100) DEFAULT ''::character varying NOT NULL,
    folder_type numeric(10,0) DEFAULT 4::numeric NOT NULL
);


ALTER TABLE public.folder_db_objects OWNER TO postgres;

--
-- TOC entry 1514 (class 1259 OID 26508)
-- Dependencies: 3 1515
-- Name: folder_db_objects_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE folder_db_objects_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;


ALTER TABLE public.folder_db_objects_id_seq OWNER TO postgres;

--
-- TOC entry 1932 (class 0 OID 0)
-- Dependencies: 1514
-- Name: folder_db_objects_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE folder_db_objects_id_seq OWNED BY folder_db_objects.id;


--
-- TOC entry 1933 (class 0 OID 0)
-- Dependencies: 1514
-- Name: folder_db_objects_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('folder_db_objects_id_seq', 1, false);


--
-- TOC entry 1517 (class 1259 OID 26523)
-- Dependencies: 1852 1853 1854 1855 1856 3
-- Name: msg_db_objects; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE msg_db_objects (
    id integer NOT NULL,
    username character varying(255) DEFAULT ''::character varying NOT NULL,
    folder_id numeric(20,0) DEFAULT 0::numeric NOT NULL,
    unique_id character varying(100) DEFAULT ''::character varying NOT NULL,
    unread smallint DEFAULT 0::smallint,
    msg_size numeric(20,0) DEFAULT 0::numeric NOT NULL,
    email bytea
);


ALTER TABLE public.msg_db_objects OWNER TO postgres;

--
-- TOC entry 1516 (class 1259 OID 26521)
-- Dependencies: 1517 3
-- Name: msg_db_objects_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE msg_db_objects_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;


ALTER TABLE public.msg_db_objects_id_seq OWNER TO postgres;

--
-- TOC entry 1934 (class 0 OID 0)
-- Dependencies: 1516
-- Name: msg_db_objects_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE msg_db_objects_id_seq OWNED BY msg_db_objects.id;


--
-- TOC entry 1935 (class 0 OID 0)
-- Dependencies: 1516
-- Name: msg_db_objects_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('msg_db_objects_id_seq', 1, false);


--
-- TOC entry 1519 (class 1259 OID 26539)
-- Dependencies: 1858 1859 1860 1861 1862 1863 3
-- Name: msg_rules; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE msg_rules (
    id integer NOT NULL,
    username character varying(255) DEFAULT ''::character varying NOT NULL,
    portion character varying(100) DEFAULT NULL::character varying,
    rule_condition character varying(30) DEFAULT NULL::character varying,
    keyword character varying(255) DEFAULT NULL::character varying,
    rule_action character varying(30) DEFAULT NULL::character varying,
    destination character varying(100) DEFAULT NULL::character varying
);


ALTER TABLE public.msg_rules OWNER TO postgres;

--
-- TOC entry 1518 (class 1259 OID 26537)
-- Dependencies: 1519 3
-- Name: msg_rules_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE msg_rules_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;


ALTER TABLE public.msg_rules_id_seq OWNER TO postgres;

--
-- TOC entry 1936 (class 0 OID 0)
-- Dependencies: 1518
-- Name: msg_rules_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE msg_rules_id_seq OWNED BY msg_rules.id;


--
-- TOC entry 1937 (class 0 OID 0)
-- Dependencies: 1518
-- Name: msg_rules_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('msg_rules_id_seq', 1, false);


--
-- TOC entry 1521 (class 1259 OID 26557)
-- Dependencies: 1865 1866 1867 1868 1869 3
-- Name: notes; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE notes (
    id integer NOT NULL,
    username character varying(255) DEFAULT ''::character varying NOT NULL,
    folder_id numeric(20,0) DEFAULT 0::numeric NOT NULL,
    note_content text,
    pos_left integer,
    pos_top integer,
    pos_width integer,
    pos_height integer,
    note_color character varying(20) DEFAULT NULL::character varying,
    note_bar_color character varying(20) DEFAULT NULL::character varying,
    note_border_color character varying(20) DEFAULT NULL::character varying,
    note_date timestamp without time zone
);


ALTER TABLE public.notes OWNER TO postgres;

--
-- TOC entry 1523 (class 1259 OID 26573)
-- Dependencies: 1871 1872 3
-- Name: notes_folders; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE notes_folders (
    id integer NOT NULL,
    username character varying(255) DEFAULT ''::character varying NOT NULL,
    folder_name character varying(255) DEFAULT ''::character varying NOT NULL
);


ALTER TABLE public.notes_folders OWNER TO postgres;

--
-- TOC entry 1522 (class 1259 OID 26571)
-- Dependencies: 1523 3
-- Name: notes_folders_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE notes_folders_id_seq
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;


ALTER TABLE public.notes_folders_id_seq OWNER TO postgres;

--
-- TOC entry 1938 (class 0 OID 0)
-- Dependencies: 1522
-- Name: notes_folders_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE notes_folders_id_seq OWNED BY notes_folders.id;


--
-- TOC entry 1939 (class 0 OID 0)
-- Dependencies: 1522
-- Name: notes_folders_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('notes_folders_id_seq', 1, true);


--
-- TOC entry 1520 (class 1259 OID 26555)
-- Dependencies: 1521 3
-- Name: notes_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE notes_id_seq
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;


ALTER TABLE public.notes_id_seq OWNER TO postgres;

--
-- TOC entry 1940 (class 0 OID 0)
-- Dependencies: 1520
-- Name: notes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE notes_id_seq OWNED BY notes.id;


--
-- TOC entry 1941 (class 0 OID 0)
-- Dependencies: 1520
-- Name: notes_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('notes_id_seq', 16, true);


--
-- TOC entry 1525 (class 1259 OID 26586)
-- Dependencies: 3
-- Name: preferences; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE preferences (
    id integer NOT NULL,
    username character varying(255) NOT NULL,
    pref_key character varying(255) NOT NULL,
    pref_value character varying(255) NOT NULL
);


ALTER TABLE public.preferences OWNER TO postgres;

--
-- TOC entry 1524 (class 1259 OID 26584)
-- Dependencies: 3 1525
-- Name: preferences_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE preferences_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;


ALTER TABLE public.preferences_id_seq OWNER TO postgres;

--
-- TOC entry 1942 (class 0 OID 0)
-- Dependencies: 1524
-- Name: preferences_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE preferences_id_seq OWNED BY preferences.id;


--
-- TOC entry 1943 (class 0 OID 0)
-- Dependencies: 1524
-- Name: preferences_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('preferences_id_seq', 1, false);


--
-- TOC entry 1527 (class 1259 OID 26597)
-- Dependencies: 1875 1876 3
-- Name: queue; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE queue (
    id integer NOT NULL,
    msg_from character varying(255) DEFAULT ''::character varying NOT NULL,
    msg_to character varying(255) NOT NULL,
    msg_time timestamp without time zone NOT NULL,
    msg_body text NOT NULL,
    msg_direction character varying(3) NOT NULL,
    delivered integer DEFAULT 0 NOT NULL
);


ALTER TABLE public.queue OWNER TO postgres;

--
-- TOC entry 1526 (class 1259 OID 26595)
-- Dependencies: 3 1527
-- Name: queue_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE queue_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;


ALTER TABLE public.queue_id_seq OWNER TO postgres;

--
-- TOC entry 1944 (class 0 OID 0)
-- Dependencies: 1526
-- Name: queue_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE queue_id_seq OWNED BY queue.id;


--
-- TOC entry 1945 (class 0 OID 0)
-- Dependencies: 1526
-- Name: queue_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('queue_id_seq', 1, false);


--
-- TOC entry 1529 (class 1259 OID 26610)
-- Dependencies: 1878 1879 1880 3
-- Name: user_preferences; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE user_preferences (
    id integer NOT NULL,
    username character varying(255) DEFAULT ''::character varying NOT NULL,
    keyword character varying(255) DEFAULT ''::character varying NOT NULL,
    pref_value character varying(255) DEFAULT ''::character varying NOT NULL
);


ALTER TABLE public.user_preferences OWNER TO postgres;

--
-- TOC entry 1528 (class 1259 OID 26608)
-- Dependencies: 3 1529
-- Name: user_preferences_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE user_preferences_id_seq
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;


ALTER TABLE public.user_preferences_id_seq OWNER TO postgres;

--
-- TOC entry 1946 (class 0 OID 0)
-- Dependencies: 1528
-- Name: user_preferences_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE user_preferences_id_seq OWNED BY user_preferences.id;


--
-- TOC entry 1947 (class 0 OID 0)
-- Dependencies: 1528
-- Name: user_preferences_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('user_preferences_id_seq', 113, true);


--
-- TOC entry 1796 (class 2604 OID 26426)
-- Dependencies: 1507 1506 1507
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE calendar_objects ALTER COLUMN id SET DEFAULT nextval('calendar_objects_id_seq'::regclass);


--
-- TOC entry 1842 (class 2604 OID 26502)
-- Dependencies: 1512 1513 1513
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE contact_group_objects ALTER COLUMN id SET DEFAULT nextval('contact_group_objects_id_seq'::regclass);


--
-- TOC entry 1838 (class 2604 OID 26488)
-- Dependencies: 1510 1511 1511
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE contact_groups ALTER COLUMN id SET DEFAULT nextval('contact_groups_id_seq'::regclass);


--
-- TOC entry 1801 (class 2604 OID 26441)
-- Dependencies: 1508 1509 1509
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE contacts ALTER COLUMN id SET DEFAULT nextval('contacts_id_seq'::regclass);


--
-- TOC entry 1846 (class 2604 OID 26513)
-- Dependencies: 1514 1515 1515
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE folder_db_objects ALTER COLUMN id SET DEFAULT nextval('folder_db_objects_id_seq'::regclass);


--
-- TOC entry 1851 (class 2604 OID 26526)
-- Dependencies: 1517 1516 1517
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE msg_db_objects ALTER COLUMN id SET DEFAULT nextval('msg_db_objects_id_seq'::regclass);


--
-- TOC entry 1857 (class 2604 OID 26542)
-- Dependencies: 1519 1518 1519
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE msg_rules ALTER COLUMN id SET DEFAULT nextval('msg_rules_id_seq'::regclass);


--
-- TOC entry 1864 (class 2604 OID 26560)
-- Dependencies: 1521 1520 1521
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE notes ALTER COLUMN id SET DEFAULT nextval('notes_id_seq'::regclass);


--
-- TOC entry 1870 (class 2604 OID 26576)
-- Dependencies: 1522 1523 1523
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE notes_folders ALTER COLUMN id SET DEFAULT nextval('notes_folders_id_seq'::regclass);


--
-- TOC entry 1873 (class 2604 OID 26589)
-- Dependencies: 1525 1524 1525
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE preferences ALTER COLUMN id SET DEFAULT nextval('preferences_id_seq'::regclass);


--
-- TOC entry 1874 (class 2604 OID 26600)
-- Dependencies: 1527 1526 1527
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE queue ALTER COLUMN id SET DEFAULT nextval('queue_id_seq'::regclass);


--
-- TOC entry 1877 (class 2604 OID 26613)
-- Dependencies: 1528 1529 1529
-- Name: id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE user_preferences ALTER COLUMN id SET DEFAULT nextval('user_preferences_id_seq'::regclass);


--
-- TOC entry 1907 (class 0 OID 26423)
-- Dependencies: 1507
-- Data for Name: calendar_objects; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY calendar_objects (id, username, record_date, repeat_type, category, description, reminder_days) FROM stdin;
\.


--
-- TOC entry 1910 (class 0 OID 26499)
-- Dependencies: 1513
-- Data for Name: contact_group_objects; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY contact_group_objects (id, username, group_id, contact_id) FROM stdin;
\.


--
-- TOC entry 1909 (class 0 OID 26485)
-- Dependencies: 1511
-- Data for Name: contact_groups; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY contact_groups (id, username, short_name, description) FROM stdin;
\.


--
-- TOC entry 1908 (class 0 OID 26438)
-- Dependencies: 1509
-- Data for Name: contacts; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY contacts (id, username, first_name, middle_name, last_name, title, sex, gsm_no_primary, gsm_no_alternate, email_primary, email_alternate, web_page, personal_note, spouse_name, nick_name, home_address, home_city, home_province, home_zip, home_country, home_phone, home_faks, work_company, work_job_title, work_department, work_office, work_profession, work_manager_name, work_assistant_name, work_address, work_city, work_province, work_zip, work_country, work_phone, work_faks, birth_day, anniversary_day, birth_month, anniversary_month) FROM stdin;
\.


--
-- TOC entry 1911 (class 0 OID 26510)
-- Dependencies: 1515
-- Data for Name: folder_db_objects; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY folder_db_objects (id, username, parent_id, folder_name, folder_type) FROM stdin;
\.


--
-- TOC entry 1912 (class 0 OID 26523)
-- Dependencies: 1517
-- Data for Name: msg_db_objects; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY msg_db_objects (id, username, folder_id, unique_id, unread, msg_size, email) FROM stdin;
\.


--
-- TOC entry 1913 (class 0 OID 26539)
-- Dependencies: 1519
-- Data for Name: msg_rules; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY msg_rules (id, username, portion, rule_condition, keyword, rule_action, destination) FROM stdin;
\.


--
-- TOC entry 1914 (class 0 OID 26557)
-- Dependencies: 1521
-- Data for Name: notes; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY notes (id, username, folder_id, note_content, pos_left, pos_top, pos_width, pos_height, note_color, note_bar_color, note_border_color, note_date) FROM stdin;
\.


--
-- TOC entry 1915 (class 0 OID 26573)
-- Dependencies: 1523
-- Data for Name: notes_folders; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY notes_folders (id, username, folder_name) FROM stdin;
\.


--
-- TOC entry 1916 (class 0 OID 26586)
-- Dependencies: 1525
-- Data for Name: preferences; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY preferences (id, username, pref_key, pref_value) FROM stdin;
\.


--
-- TOC entry 1917 (class 0 OID 26597)
-- Dependencies: 1527
-- Data for Name: queue; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY queue (id, msg_from, msg_to, msg_time, msg_body, msg_direction, delivered) FROM stdin;
\.


--
-- TOC entry 1918 (class 0 OID 26610)
-- Dependencies: 1529
-- Data for Name: user_preferences; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY user_preferences (id, username, keyword, pref_value) FROM stdin;
\.


--
-- TOC entry 1882 (class 2606 OID 26435)
-- Dependencies: 1507 1507
-- Name: calendar_objects_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY calendar_objects
    ADD CONSTRAINT calendar_objects_pkey PRIMARY KEY (id);


--
-- TOC entry 1888 (class 2606 OID 26507)
-- Dependencies: 1513 1513
-- Name: contact_group_objects_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY contact_group_objects
    ADD CONSTRAINT contact_group_objects_pkey PRIMARY KEY (id);


--
-- TOC entry 1886 (class 2606 OID 26496)
-- Dependencies: 1511 1511
-- Name: contact_groups_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY contact_groups
    ADD CONSTRAINT contact_groups_pkey PRIMARY KEY (id);


--
-- TOC entry 1884 (class 2606 OID 26482)
-- Dependencies: 1509 1509
-- Name: contacts_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY contacts
    ADD CONSTRAINT contacts_pkey PRIMARY KEY (id);


--
-- TOC entry 1891 (class 2606 OID 26519)
-- Dependencies: 1515 1515
-- Name: folder_db_objects_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY folder_db_objects
    ADD CONSTRAINT folder_db_objects_pkey PRIMARY KEY (id);


--
-- TOC entry 1893 (class 2606 OID 26536)
-- Dependencies: 1517 1517
-- Name: msg_db_objects_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY msg_db_objects
    ADD CONSTRAINT msg_db_objects_pkey PRIMARY KEY (id);


--
-- TOC entry 1896 (class 2606 OID 26553)
-- Dependencies: 1519 1519
-- Name: msg_rules_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY msg_rules
    ADD CONSTRAINT msg_rules_pkey PRIMARY KEY (id);


--
-- TOC entry 1900 (class 2606 OID 26583)
-- Dependencies: 1523 1523
-- Name: notes_folders_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY notes_folders
    ADD CONSTRAINT notes_folders_pkey PRIMARY KEY (id);


--
-- TOC entry 1898 (class 2606 OID 26570)
-- Dependencies: 1521 1521
-- Name: notes_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY notes
    ADD CONSTRAINT notes_pkey PRIMARY KEY (id);


--
-- TOC entry 1902 (class 2606 OID 26594)
-- Dependencies: 1525 1525
-- Name: preferences_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY preferences
    ADD CONSTRAINT preferences_pkey PRIMARY KEY (id);


--
-- TOC entry 1904 (class 2606 OID 26607)
-- Dependencies: 1527 1527
-- Name: queue_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY queue
    ADD CONSTRAINT queue_pkey PRIMARY KEY (id);


--
-- TOC entry 1906 (class 2606 OID 26621)
-- Dependencies: 1529 1529
-- Name: user_preferences_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY user_preferences
    ADD CONSTRAINT user_preferences_pkey PRIMARY KEY (id);


--
-- TOC entry 1889 (class 1259 OID 26520)
-- Dependencies: 1515
-- Name: IDX_FOLDER_DB_OBJECTS_USERNAME; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX "IDX_FOLDER_DB_OBJECTS_USERNAME" ON folder_db_objects USING btree (username);


--
-- TOC entry 1894 (class 1259 OID 26554)
-- Dependencies: 1519
-- Name: IDX_MSG_RULES_USERNAME; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
--

CREATE INDEX "IDX_MSG_RULES_USERNAME" ON msg_rules USING btree (username);


--
-- TOC entry 1923 (class 0 OID 0)
-- Dependencies: 3
-- Name: public; Type: ACL; Schema: -; Owner: postgres
--

REVOKE ALL ON SCHEMA public FROM PUBLIC;
REVOKE ALL ON SCHEMA public FROM postgres;
GRANT ALL ON SCHEMA public TO postgres;
GRANT ALL ON SCHEMA public TO PUBLIC;


-- Completed on 2010-01-01 13:28:38

--
--

