我用seam作的OA和网站共享给大家

dqilu 2008-07-02
请把你的数据库备份或者是sql语句发一份怎么样?先谢谢了!
5day 2008-07-02
--
-- PostgreSQL database dump
--

SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;

SET search_path = public, pg_catalog;

SET default_tablespace = '';

SET default_with_oids = false;

--
-- Name: customer; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE customer (
    id bigint NOT NULL,
    firstname character varying(12) NOT NULL,
    lastname character varying(24) NOT NULL,
    male boolean,
    phone character varying(32),
    mobtel character varying(32),
    money numeric(10,2),
    email character varying(40),
    address character varying(512)
);


ALTER TABLE public.customer OWNER TO postgres;

--
-- Name: mmcount; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE mmcount (
    id bigint NOT NULL,
    countday date NOT NULL,
    inorder numeric(10,2),
    outorder numeric(10,2),
    usedmoney numeric(10,2),
    othmoney numeric(10,2),
    earned numeric(10,2)
);


ALTER TABLE public.mmcount OWNER TO postgres;

--
-- Name: oprrole; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE oprrole (
    id bigint NOT NULL,
    userid bigint NOT NULL,
    name character varying(50)
);


ALTER TABLE public.oprrole OWNER TO postgres;

--
-- Name: opruser; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE opruser (
    id bigint NOT NULL,
    loginname character varying(60) NOT NULL,
    firstname character varying(12) NOT NULL,
    lastname character varying(24) NOT NULL,
    male boolean,
    password character varying(60) NOT NULL,
    phone character varying(30),
    email character varying(40),
    describ character varying(128)
);


ALTER TABLE public.opruser OWNER TO postgres;

--
-- Name: othmoney; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE othmoney (
    id bigint NOT NULL,
    name character varying(60) NOT NULL,
    totalfee numeric(10,2) NOT NULL,
    status integer,
    oprdate date
);


ALTER TABLE public.othmoney OWNER TO postgres;

--
-- Name: stuff_category; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE stuff_category (
    id bigint NOT NULL,
    viewid bigint,
    name character varying(60) NOT NULL,
    ratio numeric(10,8) NOT NULL
);


ALTER TABLE public.stuff_category OWNER TO postgres;

--
-- Name: stuff_from; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE stuff_from (
    id bigint NOT NULL,
    viewid bigint,
    name character varying(60),
    phone1 character varying(30),
    phone2 character varying(30),
    phone3 character varying(30),
    bank1 character varying(30),
    bank2 character varying(30),
    address character varying(512)
);


ALTER TABLE public.stuff_from OWNER TO postgres;

--
-- Name: stuff_item; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE stuff_item (
    id bigint NOT NULL,
    viewid bigint,
    name character varying(32) NOT NULL,
    categoryid bigint NOT NULL,
    price numeric(10,2) NOT NULL,
    counts integer,
    describ character varying(128),
    CONSTRAINT stuff_item_counts_check CHECK ((counts >= 0))
);


ALTER TABLE public.stuff_item OWNER TO postgres;

--
-- Name: stuff_item_in; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE stuff_item_in (
    id bigint NOT NULL,
    orderid bigint NOT NULL,
    name character varying(32),
    describ character varying(128),
    category character varying(32),
    iteminid bigint NOT NULL,
    price numeric(10,2) NOT NULL,
    counts integer,
    totalfee numeric(10,2),
    CONSTRAINT stuff_item_in_counts_check CHECK ((counts >= 0))
);


ALTER TABLE public.stuff_item_in OWNER TO postgres;

--
-- Name: stuff_item_out; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE stuff_item_out (
    id bigint NOT NULL,
    orderid bigint NOT NULL,
    itemoutid bigint NOT NULL,
    counts integer,
    price numeric(10,2),
    totalfee numeric(10,2),
    CONSTRAINT stuff_item_out_check CHECK ((totalfee = (price * (counts)::numeric))),
    CONSTRAINT stuff_item_out_counts_check CHECK ((counts >= 0)),
    CONSTRAINT stuff_item_out_price_check CHECK ((price >= (0)::numeric))
);


ALTER TABLE public.stuff_item_out OWNER TO postgres;

--
-- Name: stuff_order_in; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE stuff_order_in (
    id bigint NOT NULL,
    fromid bigint,
    opruser bigint,
    totalfee numeric(10,2),
    status integer,
    oprdate date
);


ALTER TABLE public.stuff_order_in OWNER TO postgres;

--
-- Name: stuff_order_out; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE stuff_order_out (
    id bigint NOT NULL,
    customerid bigint,
    opruser bigint,
    totalfee numeric(10,2),
    totalsrsv numeric(10,2),
    totalrsv numeric(10,2),
    totalearn numeric(10,2),
    status integer,
    oprdate date,
    CONSTRAINT stuff_order_out_check CHECK ((totalearn = (totalrsv - totalfee)))
);


ALTER TABLE public.stuff_order_out OWNER TO postgres;

--
-- Name: usedmoney; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
--

CREATE TABLE usedmoney (
    id bigint NOT NULL,
    name character varying(60) NOT NULL,
    totalfee numeric(10,2) NOT NULL,
    status integer,
    oprdate date
);


ALTER TABLE public.usedmoney OWNER TO postgres;

--
-- Name: hibernate_sequence; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER TABLE public.hibernate_sequence OWNER TO postgres;

--
-- Name: count_day; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY mmcount
    ADD CONSTRAINT count_day PRIMARY KEY (id);


--
-- Name: customer_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY customer
    ADD CONSTRAINT customer_pkey PRIMARY KEY (id);


--
-- Name: mmcount_countday_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY mmcount
    ADD CONSTRAINT mmcount_countday_key UNIQUE (countday);


--
-- Name: oprrole_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY oprrole
    ADD CONSTRAINT oprrole_pkey PRIMARY KEY (id);


--
-- Name: opruser_loginname_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY opruser
    ADD CONSTRAINT opruser_loginname_key UNIQUE (loginname);


--
-- Name: opruser_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY opruser
    ADD CONSTRAINT opruser_pkey PRIMARY KEY (id);


--
-- Name: othmoney_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY othmoney
    ADD CONSTRAINT othmoney_pkey PRIMARY KEY (id);


--
-- Name: stuff_category_name_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY stuff_category
    ADD CONSTRAINT stuff_category_name_key UNIQUE (name);


--
-- Name: stuff_category_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY stuff_category
    ADD CONSTRAINT stuff_category_pkey PRIMARY KEY (id);


--
-- Name: stuff_from_name_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY stuff_from
    ADD CONSTRAINT stuff_from_name_key UNIQUE (name);


--
-- Name: stuff_from_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY stuff_from
    ADD CONSTRAINT stuff_from_pkey PRIMARY KEY (id);


--
-- Name: stuff_item_in_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY stuff_item_in
    ADD CONSTRAINT stuff_item_in_pkey PRIMARY KEY (id);


--
-- Name: stuff_item_out_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY stuff_item_out
    ADD CONSTRAINT stuff_item_out_pkey PRIMARY KEY (id);


--
-- Name: stuff_item_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY stuff_item
    ADD CONSTRAINT stuff_item_pkey PRIMARY KEY (id);


--
-- Name: stuff_order_in_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY stuff_order_in
    ADD CONSTRAINT stuff_order_in_pkey PRIMARY KEY (id);


--
-- Name: stuff_order_out_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY stuff_order_out
    ADD CONSTRAINT stuff_order_out_pkey PRIMARY KEY (id);


--
-- Name: usedmoney_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
--

ALTER TABLE ONLY usedmoney
    ADD CONSTRAINT usedmoney_pkey PRIMARY KEY (id);


--
-- Name: item_categoryid; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY stuff_item
    ADD CONSTRAINT item_categoryid FOREIGN KEY (categoryid) REFERENCES stuff_category(id);


--
-- Name: item_in_itemid; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY stuff_item_in
    ADD CONSTRAINT item_in_itemid FOREIGN KEY (iteminid) REFERENCES stuff_item(id);


--
-- Name: item_in_orderid; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY stuff_item_in
    ADD CONSTRAINT item_in_orderid FOREIGN KEY (orderid) REFERENCES stuff_order_in(id);


--
-- Name: item_out_itemid; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY stuff_item_out
    ADD CONSTRAINT item_out_itemid FOREIGN KEY (itemoutid) REFERENCES stuff_item(id);


--
-- Name: item_out_orderid; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY stuff_item_out
    ADD CONSTRAINT item_out_orderid FOREIGN KEY (orderid) REFERENCES stuff_order_out(id);


--
-- Name: order_in_fromid; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY stuff_order_in
    ADD CONSTRAINT order_in_fromid FOREIGN KEY (fromid) REFERENCES stuff_from(id);


--
-- Name: order_in_opruserid; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY stuff_order_in
    ADD CONSTRAINT order_in_opruserid FOREIGN KEY (opruser) REFERENCES opruser(id);


--
-- Name: order_out_customer; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY stuff_order_out
    ADD CONSTRAINT order_out_customer FOREIGN KEY (customerid) REFERENCES customer(id);


--
-- Name: order_out_opruser; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY stuff_order_out
    ADD CONSTRAINT order_out_opruser FOREIGN KEY (opruser) REFERENCES opruser(id);


--
-- Name: role_usered; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY oprrole
    ADD CONSTRAINT role_usered FOREIGN KEY (userid) REFERENCES opruser(id);


--
-- 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;


--
-- PostgreSQL database dump complete
--


isky 2008-07-03
憨 打包上传进来就是的  还贴出来 那么长 呵呵
5day 2008-07-03
[code="sql"]--
-- PostgreSQL database cluster dump
--

\connect postgres

SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET escape_string_warning = 'off';

--
-- Roles
--

CREATE ROLE postgres;
ALTER ROLE postgres WITH SUPERUSER INHERIT CREATEROLE CREATEDB LOGIN;
CREATE ROLE radius;
ALTER ROLE radius WITH NOSUPERUSER NOINHERIT NOCREATEROLE NOCREATEDB LOGIN PASSWORD 'md5f0eedb6e8a10c485f004a2183b9988b1' VALID UNTIL 'infinity';






--
-- Database creation
--

CREATE DATABASE iweb WITH TEMPLATE = template0 OWNER = postgres ENCODING = 'UTF8';
CREATE DATABASE jive WITH TEMPLATE = template0 OWNER = postgres ENCODING = 'UTF8';
CREATE DATABASE ooa WITH TEMPLATE = template0 OWNER = postgres ENCODING = 'UTF8';
CREATE DATABASE radius WITH TEMPLATE = template0 OWNER = postgres ENCODING = 'UTF8';
CREATE DATABASE radiusg WITH TEMPLATE = template0 OWNER = postgres ENCODING = 'UTF8';
REVOKE ALL ON DATABASE template1 FROM PUBLIC;
REVOKE ALL ON DATABASE template1 FROM postgres;
GRANT ALL ON DATABASE template1 TO postgres;
GRANT CONNECT ON DATABASE template1 TO PUBLIC;
CREATE DATABASE tpc WITH TEMPLATE = template0 OWNER = postgres ENCODING = 'UTF8';


\connect iweb

--
-- PostgreSQL database dump
--

SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;

SET search_path = public, pg_catalog;

SET default_tablespace = '';

SET default_with_oids = false;

--
-- Name: attachment; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE attachment (
    id bigint NOT NULL,
    content bytea NOT NULL,
    name character varying(256),
    type character varying(256)
);


ALTER TABLE public.attachment OWNER TO postgres;

--
-- Name: category; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE category (
    id bigint NOT NULL,
    name character varying(512) NOT NULL,
    sortid bigint,
    pid bigint,
    useable boolean,
    viewid integer,
    describe character varying(512),
    formid integer,
    dept bigint DEFAULT 0 NOT NULL
);


ALTER TABLE public.category OWNER TO postgres;

--
-- Name: deptid; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE deptid (
    id bigint NOT NULL,
    gaoid character varying(5),
    dname character varying(256)
);


ALTER TABLE public.deptid OWNER TO postgres;

--
-- Name: item; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE item (
    id bigint NOT NULL,
    deptid bigint NOT NULL,
    userid bigint NOT NULL,
    categoryid bigint NOT NULL,
    title character varying(512),
    openform integer,
    reasonnoopen character varying(1024),
    sndtime timestamp without time zone,
    docnumber character varying(512),
    content text,
    attachmentid bigint,
    attachmentname character varying(256),
    attachmenttype character varying(256),
    contentdescribe character varying(1024),
    timeopen integer,
    programopen character varying(1024),
    dutydept character varying(1024),
    number bigint,
    username character varying(64),
    status integer,
    insidedept text,
    address character varying(512),
    nameandduty character varying(1024),
    phone character varying(256),
    fax character varying(256),
    cp_dept character varying(256),
    itemcate character varying(128),
    itemby character varying(512),
    objandarea text,
    term text,
    procedure text,
    pubform character varying(512),
    limittime character varying(256),
    fee text,
    worktime character varying(512),
    netask character varying(256),
    network character varying(256),
    netquery character varying(256),
    other character varying(512),
    areaopen integer
);


ALTER TABLE public.item OWNER TO postgres;

--
-- Name: webfile; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE webfile (
    id bigint NOT NULL,
    name character varying(256),
    type character varying(256),
    content bytea NOT NULL,
    itemid bigint NOT NULL
);


ALTER TABLE public.webfile OWNER TO postgres;

--
-- Name: seq_gao_atc; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER TABLE public.seq_gao_atc OWNER TO postgres;

--
-- Name: seq_gao_cate; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER TABLE public.seq_gao_cate OWNER TO postgres;

--
-- Name: seq_gao_item; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER TABLE public.seq_gao_item OWNER TO postgres;

--
-- Name: seq_gao_wf; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER TABLE public.seq_gao_wf OWNER TO postgres;

--
-- Name: attachment_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY attachment
    ADD CONSTRAINT attachment_pkey PRIMARY KEY (id);


--
-- Name: category_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY category
    ADD CONSTRAINT category_pkey PRIMARY KEY (id);


--
-- Name: deptid_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY deptid
    ADD CONSTRAINT deptid_pkey PRIMARY KEY (id);


--
-- Name: item_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY item
    ADD CONSTRAINT item_pkey PRIMARY KEY (id);


--
-- Name: webfile_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY webfile
    ADD CONSTRAINT webfile_pkey PRIMARY KEY (id);


--
-- Name: fki_; Type: INDEX; Schema: public; Owner: postgres; Tablespace:
--

CREATE INDEX fki_ ON category USING btree (pid);


--
-- Name: fki_category_deptid_fkey; Type: INDEX; Schema: public; Owner: postgres; Tablespace:
--

CREATE INDEX fki_category_deptid_fkey ON category USING btree (dept);


--
-- Name: fki_gao_item_attachment; Type: INDEX; Schema: public; Owner: postgres; Tablespace:
--

CREATE INDEX fki_gao_item_attachment ON item USING btree (attachmentid);


--
-- Name: fki_item_dept; Type: INDEX; Schema: public; Owner: postgres; Tablespace:
--

CREATE INDEX fki_item_dept ON item USING btree (deptid);


--
-- Name: fki_webfile_item; Type: INDEX; Schema: public; Owner: postgres; Tablespace:
--

CREATE INDEX fki_webfile_item ON webfile USING btree (itemid);


--
-- Name: category_dept_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY category
    ADD CONSTRAINT category_dept_fkey FOREIGN KEY (dept) REFERENCES deptid(id);


--
-- Name: category_pid_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY category
    ADD CONSTRAINT category_pid_fkey FOREIGN KEY (pid) REFERENCES category(id);


--
-- Name: gao_item_attachment; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY item
    ADD CONSTRAINT gao_item_attachment FOREIGN KEY (attachmentid) REFERENCES attachment(id);


--
-- Name: item_categoryid_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY item
    ADD CONSTRAINT item_categoryid_fkey FOREIGN KEY (categoryid) REFERENCES category(id);


--
-- Name: item_deptid_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY item
    ADD CONSTRAINT item_deptid_fkey FOREIGN KEY (deptid) REFERENCES deptid(id);


--
-- Name: webfile_itemid_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY webfile
    ADD CONSTRAINT webfile_itemid_fkey FOREIGN KEY (itemid) REFERENCES item(id) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- 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;


--
-- PostgreSQL database dump complete
--

\connect jive

--
-- PostgreSQL database dump
--

SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;

SET search_path = public, pg_catalog;

SET default_tablespace = '';

SET default_with_oids = false;

--
-- Name: jiveextcomponentconf; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE jiveextcomponentconf (
    subdomain character varying(255) NOT NULL,
    secret character varying(255),
    permission character varying(10) NOT NULL
);


ALTER TABLE public.jiveextcomponentconf OWNER TO postgres;

--
-- Name: jivegroup; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE jivegroup (
    groupname character varying(50) NOT NULL,
    description character varying(255)
);


ALTER TABLE public.jivegroup OWNER TO postgres;

--
-- Name: jivegroupprop; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE jivegroupprop (
    groupname character varying(50) NOT NULL,
    name character varying(100) NOT NULL,
    propvalue text NOT NULL
);


ALTER TABLE public.jivegroupprop OWNER TO postgres;

--
-- Name: jivegroupuser; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE jivegroupuser (
    groupname character varying(50) NOT NULL,
    username character varying(100) NOT NULL,
    administrator integer NOT NULL
);


ALTER TABLE public.jivegroupuser OWNER TO postgres;

--
-- Name: jiveid; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE jiveid (
    idtype integer NOT NULL,
    id integer NOT NULL
);


ALTER TABLE public.jiveid OWNER TO postgres;

--
-- Name: jiveoffline; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE jiveoffline (
    username character varying(64) NOT NULL,
    messageid integer NOT NULL,
    creationdate character(15) NOT NULL,
    messagesize integer NOT NULL,
    stanza text NOT NULL
);


ALTER TABLE public.jiveoffline OWNER TO postgres;

--
-- Name: jivepresence; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE jivepresence (
    username character varying(64) NOT NULL,
    offlinepresence text,
    offlinedate character varying(15) NOT NULL
);


ALTER TABLE public.jivepresence OWNER TO postgres;

--
-- Name: jiveprivacylist; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE jiveprivacylist (
    username character varying(64) NOT NULL,
    name character varying(100) NOT NULL,
    isdefault integer NOT NULL,
    list text NOT NULL
);


ALTER TABLE public.jiveprivacylist OWNER TO postgres;

--
-- Name: jiveprivate; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE jiveprivate (
    username character varying(64) NOT NULL,
    name character varying(100) NOT NULL,
    namespace character varying(200) NOT NULL,
    privatedata text NOT NULL
);


ALTER TABLE public.jiveprivate OWNER TO postgres;

--
-- Name: jiveproperty; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE jiveproperty (
    name character varying(100) NOT NULL,
    propvalue character varying(4000) NOT NULL
);


ALTER TABLE public.jiveproperty OWNER TO postgres;

--
-- Name: jiveremoteserverconf; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE jiveremoteserverconf (
    xmppdomain character varying(255) NOT NULL,
    remoteport integer,
    permission character varying(10) NOT NULL
);


ALTER TABLE public.jiveremoteserverconf OWNER TO postgres;

--
-- Name: jiveroster; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE jiveroster (
    rosterid integer NOT NULL,
    username character varying(64) NOT NULL,
    jid character varying(1024) NOT NULL,
    sub integer NOT NULL,
    ask integer NOT NULL,
    recv integer NOT NULL,
    nick character varying(255)
);


ALTER TABLE public.jiveroster OWNER TO postgres;

--
-- Name: jiverostergroups; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE jiverostergroups (
    rosterid integer NOT NULL,
    rank integer NOT NULL,
    groupname character varying(255) NOT NULL
);


ALTER TABLE public.jiverostergroups OWNER TO postgres;

--
-- Name: jivesaslauthorized; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE jivesaslauthorized (
    username character varying(64) NOT NULL,
    principal character varying(4000) NOT NULL
);


ALTER TABLE public.jivesaslauthorized OWNER TO postgres;

--
-- Name: jiveuser; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE jiveuser (
    username character varying(64) NOT NULL,
    plainpassword character varying(32),
    encryptedpassword character varying(255),
    name character varying(100),
    email character varying(100),
    creationdate character(15) NOT NULL,
    modificationdate character(15) NOT NULL
);


ALTER TABLE public.jiveuser OWNER TO postgres;

--
-- Name: jiveuserprop; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE jiveuserprop (
    username character varying(64) NOT NULL,
    name character varying(100) NOT NULL,
    propvalue text NOT NULL
);


ALTER TABLE public.jiveuserprop OWNER TO postgres;

--
-- Name: jivevcard; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE jivevcard (
    username character varying(64) NOT NULL,
    vcard text NOT NULL
);


ALTER TABLE public.jivevcard OWNER TO postgres;

--
-- Name: jiveversion; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE jiveversion (
    name character varying(50) NOT NULL,
    version integer NOT NULL
);


ALTER TABLE public.jiveversion OWNER TO postgres;

--
-- Name: mucaffiliation; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE mucaffiliation (
    roomid integer NOT NULL,
    jid character varying(1024) NOT NULL,
    affiliation integer NOT NULL
);


ALTER TABLE public.mucaffiliation OWNER TO postgres;

--
-- Name: mucconversationlog; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE mucconversationlog (
    roomid integer NOT NULL,
    sender character varying(1024) NOT NULL,
    nickname character varying(255),
    logtime character(15) NOT NULL,
    subject character varying(255),
    body text
);


ALTER TABLE public.mucconversationlog OWNER TO postgres;

--
-- Name: mucmember; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE mucmember (
    roomid integer NOT NULL,
    jid character varying(1024) NOT NULL,
    nickname character varying(255),
    firstname character varying(100),
    lastname character varying(100),
    url character varying(100),
    email character varying(100),
    faqentry character varying(100)
);


ALTER TABLE public.mucmember OWNER TO postgres;

--
-- Name: mucroom; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE mucroom (
    roomid integer NOT NULL,
    creationdate character(15) NOT NULL,
    modificationdate character(15) NOT NULL,
    name character varying(50) NOT NULL,
    naturalname character varying(255) NOT NULL,
    description character varying(255),
    lockeddate character(15) NOT NULL,
    emptydate character(15),
    canchangesubject integer NOT NULL,
    maxusers integer NOT NULL,
    publicroom integer NOT NULL,
    moderated integer NOT NULL,
    membersonly integer NOT NULL,
    caninvite integer NOT NULL,
    roompassword character varying(50),
    candiscoverjid integer NOT NULL,
    logenabled integer NOT NULL,
    subject character varying(100),
    rolestobroadcast integer NOT NULL,
    usereservednick integer NOT NULL,
    canchangenick integer NOT NULL,
    canregister integer NOT NULL
);


ALTER TABLE public.mucroom OWNER TO postgres;

--
-- Name: mucroomprop; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE mucroomprop (
    roomid integer NOT NULL,
    name character varying(100) NOT NULL,
    propvalue text NOT NULL
);


ALTER TABLE public.mucroomprop OWNER TO postgres;

--
-- Name: pubsubaffiliation; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE pubsubaffiliation (
    serviceid character varying(100) NOT NULL,
    nodeid character varying(100) NOT NULL,
    jid character varying(1024) NOT NULL,
    affiliation character varying(10) NOT NULL
);


ALTER TABLE public.pubsubaffiliation OWNER TO postgres;

--
-- Name: pubsubdefaultconf; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE pubsubdefaultconf (
    serviceid character varying(100) NOT NULL,
    leaf integer NOT NULL,
    deliverpayloads integer NOT NULL,
    maxpayloadsize integer NOT NULL,
    persistitems integer NOT NULL,
    maxitems integer NOT NULL,
    notifyconfigchanges integer NOT NULL,
    notifydelete integer NOT NULL,
    notifyretract integer NOT NULL,
    presencebased integer NOT NULL,
    senditemsubscribe integer NOT NULL,
    publishermodel character varying(15) NOT NULL,
    subscriptionenabled integer NOT NULL,
    accessmodel character varying(10) NOT NULL,
    language character varying(255),
    replypolicy character varying(15),
    associationpolicy character varying(15) NOT NULL,
    maxleafnodes integer NOT NULL
);


ALTER TABLE public.pubsubdefaultconf OWNER TO postgres;

--
-- Name: pubsubitem; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE pubsubitem (
    serviceid character varying(100) NOT NULL,
    nodeid character varying(100) NOT NULL,
    id character varying(100) NOT NULL,
    jid character varying(1024) NOT NULL,
    creationdate character(15) NOT NULL,
    payload text
);


ALTER TABLE public.pubsubitem OWNER TO postgres;

--
-- Name: pubsubnode; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE pubsubnode (
    serviceid character varying(100) NOT NULL,
    nodeid character varying(100) NOT NULL,
    leaf integer NOT NULL,
    creationdate character(15) NOT NULL,
    modificationdate character(15) NOT NULL,
    parent character varying(100),
    deliverpayloads integer NOT NULL,
    maxpayloadsize integer,
    persistitems integer,
    maxitems integer,
    notifyconfigchanges integer NOT NULL,
    notifydelete integer NOT NULL,
    notifyretract integer NOT NULL,
    presencebased integer NOT NULL,
    senditemsubscribe integer NOT NULL,
    publishermodel character varying(15) NOT NULL,
    subscriptionenabled integer NOT NULL,
    configsubscription integer NOT NULL,
    accessmodel character varying(10) NOT NULL,
    payloadtype character varying(100),
    bodyxslt character varying(100),
    dataformxslt character varying(100),
    creator character varying(1024) NOT NULL,
    description character varying(255),
    language character varying(255),
    name character varying(50),
    replypolicy character varying(15),
    associationpolicy character varying(15),
    maxleafnodes integer
);


ALTER TABLE public.pubsubnode OWNER TO postgres;

--
-- Name: pubsubnodegroups; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE pubsubnodegroups (
    serviceid character varying(100) NOT NULL,
    nodeid character varying(100) NOT NULL,
    rostergroup character varying(100) NOT NULL
);


ALTER TABLE public.pubsubnodegroups OWNER TO postgres;

--
-- Name: pubsubnodejids; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE pubsubnodejids (
    serviceid character varying(100) NOT NULL,
    nodeid character varying(100) NOT NULL,
    jid character varying(1024) NOT NULL,
    associationtype character varying(20) NOT NULL
);


ALTER TABLE public.pubsubnodejids OWNER TO postgres;

--
-- Name: pubsubsubscription; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE pubsubsubscription (
    serviceid character varying(100) NOT NULL,
    nodeid character varying(100) NOT NULL,
    id character varying(100) NOT NULL,
    jid character varying(1024) NOT NULL,
    owner character varying(1024) NOT NULL,
    state character varying(15) NOT NULL,
    deliver integer NOT NULL,
    digest integer NOT NULL,
    digest_frequency integer NOT NULL,
    expire character(15),
    includebody integer NOT NULL,
    showvalues character varying(30) NOT NULL,
    subscriptiontype character varying(10) NOT NULL,
    subscriptiondepth integer NOT NULL,
    keyword character varying(200)
);


ALTER TABLE public.pubsubsubscription OWNER TO postgres;

--
-- Name: jiveextcomponentconf_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY jiveextcomponentconf
    ADD CONSTRAINT jiveextcomponentconf_pk PRIMARY KEY (subdomain);


--
-- Name: jivegroup_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY jivegroup
    ADD CONSTRAINT jivegroup_pk PRIMARY KEY (groupname);


--
-- Name: jivegroupprop_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY jivegroupprop
    ADD CONSTRAINT jivegroupprop_pk PRIMARY KEY (groupname, name);


--
-- Name: jivegroupuser_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY jivegroupuser
    ADD CONSTRAINT jivegroupuser_pk PRIMARY KEY (groupname, username, administrator);


--
-- Name: jiveid_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY jiveid
    ADD CONSTRAINT jiveid_pk PRIMARY KEY (idtype);


--
-- Name: jiveoffline_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY jiveoffline
    ADD CONSTRAINT jiveoffline_pk PRIMARY KEY (username, messageid);


--
-- Name: jivepresence_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY jivepresence
    ADD CONSTRAINT jivepresence_pk PRIMARY KEY (username);


--
-- Name: jiveprivacylist_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY jiveprivacylist
    ADD CONSTRAINT jiveprivacylist_pk PRIMARY KEY (username, name);


--
-- Name: jiveprivate_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY jiveprivate
    ADD CONSTRAINT jiveprivate_pk PRIMARY KEY (username, name, namespace);


--
-- Name: jiveproperty_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY jiveproperty
    ADD CONSTRAINT jiveproperty_pk PRIMARY KEY (name);


--
-- Name: jiveremoteserverconf_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY jiveremoteserverconf
    ADD CONSTRAINT jiveremoteserverconf_pk PRIMARY KEY (xmppdomain);


--
-- Name: jiveroster_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY jiveroster
    ADD CONSTRAINT jiveroster_pk PRIMARY KEY (rosterid);


--
-- Name: jiverostergroups_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY jiverostergroups
    ADD CONSTRAINT jiverostergroups_pk PRIMARY KEY (rosterid, rank);


--
-- Name: jivesaslauthoirzed_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY jivesaslauthorized
    ADD CONSTRAINT jivesaslauthoirzed_pk PRIMARY KEY (username, principal);


--
-- Name: jiveuser_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY jiveuser
    ADD CONSTRAINT jiveuser_pk PRIMARY KEY (username);


--
-- Name: jiveuserprop_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY jiveuserprop
    ADD CONSTRAINT jiveuserprop_pk PRIMARY KEY (username, name);


--
-- Name: jivevcard_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY jivevcard
    ADD CONSTRAINT jivevcard_pk PRIMARY KEY (username);


--
-- Name: jiveversion_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY jiveversion
    ADD CONSTRAINT jiveversion_pk PRIMARY KEY (name);


--
-- Name: mucaffiliation__pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY mucaffiliation
    ADD CONSTRAINT mucaffiliation__pk PRIMARY KEY (roomid, jid);


--
-- Name: mucmember__pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY mucmember
    ADD CONSTRAINT mucmember__pk PRIMARY KEY (roomid, jid);


--
-- Name: mucroom__pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY mucroom
    ADD CONSTRAINT mucroom__pk PRIMARY KEY (name);


--
-- Name: mucroomprop_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY mucroomprop
    ADD CONSTRAINT mucroomprop_pk PRIMARY KEY (roomid, name);


--
-- Name: pubsubaffil_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY pubsubaffiliation
    ADD CONSTRAINT pubsubaffil_pk PRIMARY KEY (serviceid, nodeid, jid);


--
-- Name: pubsubdefconf_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY pubsubdefaultconf
    ADD CONSTRAINT pubsubdefconf_pk PRIMARY KEY (serviceid, leaf);


--
-- Name: pubsubitem_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY pubsubitem
    ADD CONSTRAINT pubsubitem_pk PRIMARY KEY (serviceid, nodeid, id);


--
-- Name: pubsubjid_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY pubsubnodejids
    ADD CONSTRAINT pubsubjid_pk PRIMARY KEY (serviceid, nodeid, jid);


--
-- Name: pubsubnode_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY pubsubnode
    ADD CONSTRAINT pubsubnode_pk PRIMARY KEY (serviceid, nodeid);


--
-- Name: pubsubsubs_pk; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY pubsubsubscription
    ADD CONSTRAINT pubsubsubs_pk PRIMARY KEY (serviceid, nodeid, id);


--
-- Name: jiveplist_default_idx; Type: INDEX; Schema: public; Owner: postgres; Tablespace:
--

CREATE INDEX jiveplist_default_idx ON jiveprivacylist USING btree (username, isdefault);


--
-- Name: jiveroster_username_idx; Type: INDEX; Schema: public; Owner: postgres; Tablespace:
--

CREATE INDEX jiveroster_username_idx ON jiveroster USING btree (username);


--
-- Name: jiverostergroups_rosterid_idx; Type: INDEX; Schema: public; Owner: postgres; Tablespace:
--

CREATE INDEX jiverostergroups_rosterid_idx ON jiverostergroups USING btree (rosterid);


--
-- Name: jiveuser_cdate_idx; Type: INDEX; Schema: public; Owner: postgres; Tablespace:
--

CREATE INDEX jiveuser_cdate_idx ON jiveuser USING btree (creationdate);


--
-- Name: muclog_time_idx; Type: INDEX; Schema: public; Owner: postgres; Tablespace:
--

CREATE INDEX muclog_time_idx ON mucconversationlog USING btree (logtime);


--
-- Name: mucroom_roomid_idx; Type: INDEX; Schema: public; Owner: postgres; Tablespace:
--

CREATE INDEX mucroom_roomid_idx ON mucroom USING btree (roomid);


--
-- Name: pubsubnodegroups_idx; Type: INDEX; Schema: public; Owner: postgres; Tablespace:
--

CREATE INDEX pubsubnodegroups_idx ON pubsubnodegroups USING btree (serviceid, nodeid);


--
-- Name: jiverostergroups_rosterid_fk; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY jiverostergroups
    ADD CONSTRAINT jiverostergroups_rosterid_fk FOREIGN KEY (rosterid) REFERENCES jiveroster(rosterid) DEFERRABLE INITIALLY DEFERRED;


--
-- 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;


--
-- PostgreSQL database dump complete
--

\connect ooa

--
-- PostgreSQL database dump
--

SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;

SET search_path = public, pg_catalog;

SET default_tablespace = '';

SET default_with_oids = false;

--
-- Name: oa_dept; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE oa_dept (
    id bigint NOT NULL,
    pid bigint NOT NULL,
    view_id bigint NOT NULL,
    dept_name character varying(128),
    dept_address character varying(256),
    dept_phone bigint,
    dept_homepage character varying(128),
    dept_mng_category character varying(128),
    dept_or_category boolean NOT NULL
);


ALTER TABLE public.oa_dept OWNER TO postgres;

--
-- Name: oa_doc; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE oa_doc (
    id bigint NOT NULL,
    oa_doc_category_id bigint NOT NULL,
    oa_doc_number integer NOT NULL,
    oa_doc_title character varying(128) NOT NULL,
    oa_doc_timestamp timestamp without time zone NOT NULL,
    oa_doc_status boolean DEFAULT false,
    oa_doc_urgency character varying(64),
    oa_doc_classfication character varying(128),
    oa_doc_class integer,
    oa_doc_attach_name character varying(128),
    oa_doc_attach_type character varying(64),
    oa_user_id bigint NOT NULL,
    oa_doc_users text
);


ALTER TABLE public.oa_doc OWNER TO postgres;

--
-- Name: oa_doc_attach; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE oa_doc_attach (
    id bigint NOT NULL,
    doc_id bigint,
    doc bytea
);


ALTER TABLE public.oa_doc_attach OWNER TO postgres;

--
-- Name: oa_doc_audit; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE oa_doc_audit (
    id bigint NOT NULL,
    oa_user_id bigint NOT NULL,
    oa_doc_id bigint NOT NULL,
    audit_msg text,
    oa_pre_id bigint NOT NULL
);


ALTER TABLE public.oa_doc_audit OWNER TO postgres;

--
-- Name: oa_doc_category; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE oa_doc_category (
    id bigint NOT NULL,
    oa_dept_id bigint NOT NULL,
    oa_doc_category_name character varying(128)
);


ALTER TABLE public.oa_doc_category OWNER TO postgres;

--
-- Name: oa_doc_content; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE oa_doc_content (
    id bigint NOT NULL,
    doc_id bigint NOT NULL,
    doc text NOT NULL
);


ALTER TABLE public.oa_doc_content OWNER TO postgres;

--
-- Name: oa_doc_receive; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE oa_doc_receive (
    id bigint NOT NULL,
    oa_doc_id bigint NOT NULL,
    oa_user_id bigint NOT NULL,
    oa_dept_id bigint NOT NULL,
    oa_doc_receive_timestamp timestamp without time zone NOT NULL,
    oa_doc_received boolean,
    oa_doc_send_id bigint NOT NULL
);


ALTER TABLE public.oa_doc_receive OWNER TO postgres;

--
-- Name: oa_doc_send; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE oa_doc_send (
    id bigint NOT NULL,
    oa_doc_id bigint NOT NULL,
    oa_user_id bigint NOT NULL,
    oa_dept_id bigint NOT NULL,
    oa_doc_send_timestamp timestamp without time zone NOT NULL,
    oa_doc_send_sendsms boolean,
    oa_doc_send_web boolean
);


ALTER TABLE public.oa_doc_send OWNER TO postgres;

--
-- Name: oa_doc_type; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE oa_doc_type (
    id bigint NOT NULL,
    oa_doc_type_name character varying(128)
);


ALTER TABLE public.oa_doc_type OWNER TO postgres;

--
-- Name: oa_doc_uperdoc; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE oa_doc_uperdoc (
    id bigint NOT NULL,
    deptid bigint NOT NULL,
    users character varying(128) NOT NULL,
    pass character varying(128) NOT NULL
);


ALTER TABLE public.oa_doc_uperdoc OWNER TO postgres;

--
-- Name: oa_duty; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE oa_duty (
    id bigint NOT NULL,
    oa_user_id bigint NOT NULL,
    oa_role_id bigint NOT NULL,
    oa_dept_id bigint
);


ALTER TABLE public.oa_duty OWNER TO postgres;

--
-- Name: oa_info; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE oa_info (
    id bigint NOT NULL,
    oa_user_id bigint NOT NULL,
    oa_dept_id bigint NOT NULL,
    oa_receive_user_id bigint,
    oa_receive_dept_id bigint NOT NULL,
    oa_received boolean DEFAULT false,
    oa_canedit boolean DEFAULT false,
    oa_refused boolean DEFAULT false,
    oa_refuse_whys character varying(512),
    oa_info_timestamp timestamp without time zone NOT NULL,
    oa_info_title character varying(512) NOT NULL,
    oa_info_content text,
    oa_info_status boolean DEFAULT false NOT NULL,
    oa_info_category_id bigint NOT NULL
);


ALTER TABLE public.oa_info OWNER TO postgres;

--
-- Name: oa_info_category; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE oa_info_category (
    id bigint NOT NULL,
    oa_dept_id bigint NOT NULL,
    oa_info_category_name character varying(512) NOT NULL
);


ALTER TABLE public.oa_info_category OWNER TO postgres;

--
-- Name: oa_message; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE oa_message (
    id bigint NOT NULL,
    oa_user_id bigint NOT NULL,
    oa_message_to_id bigint NOT NULL,
    oa_message_timestamp timestamp without time zone NOT NULL,
    oa_message_content text NOT NULL,
    oa_message_attach bytea,
    oa_message_received boolean NOT NULL
);


ALTER TABLE public.oa_message OWNER TO postgres;

--
-- Name: oa_oversee; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE oa_oversee (
    id bigint NOT NULL,
    oa_user_id bigint NOT NULL,
    oa_dept_id bigint NOT NULL,
    oa_oversee_timestamp timestamp without time zone NOT NULL,
    oa_oversee_title character varying(512) NOT NULL,
    oa_oversee_content text NOT NULL
);


ALTER TABLE public.oa_oversee OWNER TO postgres;

--
-- Name: oa_oversee_do; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE oa_oversee_do (
    id bigint NOT NULL,
    oa_oversee_id bigint NOT NULL,
    oa_user_id bigint NOT NULL,
    oa_dept_id bigint NOT NULL,
    oa_oversee_do timestamp without time zone NOT NULL,
    oa_oversee_done boolean,
    oa_oversee_result text NOT NULL
);


ALTER TABLE public.oa_oversee_do OWNER TO postgres;

--
-- Name: oa_role; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE oa_role (
    id bigint NOT NULL,
    oa_role_description character varying(256),
    oa_role_name character varying(256) NOT NULL,
    viewid bigint NOT NULL
);


ALTER TABLE public.oa_role OWNER TO postgres;

--
-- Name: oa_user; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE oa_user (
    id bigint NOT NULL,
    view_id bigint NOT NULL,
    login_name character varying(25) NOT NULL,
    login_pass character varying(50) NOT NULL,
    first_name character varying(8) NOT NULL,
    last_name character varying(16) NOT NULL,
    mobile_phone bigint,
    office_phone bigint,
    home_phone bigint,
    user_email character varying(32),
    user_describtion text,
    user_image bytea,
    user_status boolean,
    user_skin character varying(255),
    user_image_contenttype character varying(64)
);


ALTER TABLE public.oa_user OWNER TO postgres;

--
-- Name: oa_user_friend; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE oa_user_friend (
    id bigint NOT NULL,
    oa_user_id bigint NOT NULL,
    oa_user_friend_id bigint NOT NULL,
    oa_user_friend_group_id bigint NOT NULL
);


ALTER TABLE public.oa_user_friend OWNER TO postgres;

--
-- Name: oa_user_friend_group; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE oa_user_friend_group (
    id bigint NOT NULL,
    oa_user_id bigint NOT NULL,
    oa_user_friend_group_name character varying(256) NOT NULL
);


ALTER TABLE public.oa_user_friend_group OWNER TO postgres;

--
-- Name: oa_webimage; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE oa_webimage (
    id bigint NOT NULL,
    oa_webinfo_id bigint NOT NULL,
    oa_webimage_content bytea,
    contenttype character varying(64)
);


ALTER TABLE public.oa_webimage OWNER TO postgres;

--
-- Name: oa_webinfo; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE oa_webinfo (
    id bigint NOT NULL,
    oa_user_id bigint NOT NULL,
    oa_dept_id bigint NOT NULL,
    oa_webinfo_category_id bigint NOT NULL,
    oa_webinfo_title character varying(512) NOT NULL,
    oa_webinfo_timestamp timestamp without time zone NOT NULL
);


ALTER TABLE public.oa_webinfo OWNER TO postgres;

--
-- Name: oa_webinfo_category; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE oa_webinfo_category (
    id bigint NOT NULL,
    oa_dept_id bigint NOT NULL,
    name character varying(128),
    view_id bigint DEFAULT 0 NOT NULL,
    p_id bigint NOT NULL,
    shortlines smallint DEFAULT 1 NOT NULL,
    shortfonts smallint DEFAULT 1 NOT NULL,
    longlines smallint DEFAULT 1 NOT NULL,
    longfonts smallint DEFAULT 1 NOT NULL,
    psname character varying(128)
);


ALTER TABLE public.oa_webinfo_category OWNER TO postgres;

--
-- Name: oa_webinfo_channel; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE oa_webinfo_channel (
    id bigint NOT NULL,
    view_id bigint,
    oa_dept_id bigint,
    name character varying(128),
    title character varying(128)
);


ALTER TABLE public.oa_webinfo_channel OWNER TO postgres;

--
-- Name: oa_webinfo_comment; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE oa_webinfo_comment (
    id bigint NOT NULL,
    oa_webinfo_id bigint NOT NULL,
    oa_comment_user character varying(128) NOT NULL,
    oa_comment_content character varying(512) NOT NULL,
    oa_comment_ipaddress character varying(32) NOT NULL
);


ALTER TABLE public.oa_webinfo_comment OWNER TO postgres;

--
-- Name: oa_webinfo_content; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE oa_webinfo_content (
    id bigint NOT NULL,
    oa_webinfo_id bigint NOT NULL,
    webinfo text NOT NULL
);


ALTER TABLE public.oa_webinfo_content OWNER TO postgres;

--
-- Name: oa_weblook; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE oa_weblook (
    id bigint NOT NULL,
    oa_dept_id bigint NOT NULL,
    css text,
    name character varying(512),
    title character varying(512),
    webmaster character varying(512),
    copyright character varying(512),
    icp character varying(256),
    counter bigint,
    logo bytea,
    linklogo bytea,
    browserlogo bytea,
    background bytea,
    logoc character varying(64),
    linklogoc character varying(64),
    browserlogoc character varying(64),
    backgroundc character varying(64),
    ad bytea,
    adc character varying(64),
    background_color character varying(16)
);


ALTER TABLE public.oa_weblook OWNER TO postgres;

--
-- Name: oa_work; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE oa_work (
    id bigint NOT NULL,
    oa_dept_id bigint NOT NULL,
    oa_user_id bigint NOT NULL
);


ALTER TABLE public.oa_work OWNER TO postgres;

--
-- Name: oavisit; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE oavisit (
    id bigint NOT NULL,
    visittime timestamp without time zone NOT NULL,
    visitername character varying(64),
    visiterdeptoraddress character varying(256),
    visiterphone character varying(32),
    visiternumber integer,
    visitedornot boolean DEFAULT true,
    visiterproblem character varying(512),
    visitorletter boolean,
    visitprcess character varying(256),
    vistsource character varying(64),
    public boolean DEFAULT false NOT NULL,
    cateid bigint,
    acateid bigint,
    sndtime timestamp without time zone NOT NULL,
    userid bigint NOT NULL,
    status boolean DEFAULT false NOT NULL,
    limitdays integer DEFAULT 0,
    dosend boolean DEFAULT false NOT NULL,
    pro1cess text,
    docnumber integer DEFAULT 0 NOT NULL,
    rsvall boolean DEFAULT false NOT NULL,
    doall boolean DEFAULT false NOT NULL,
    doc boolean
);


ALTER TABLE public.oavisit OWNER TO postgres;

--
-- Name: COLUMN oavisit.visittime; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN oavisit.visittime IS '"时间"';


--
-- Name: COLUMN oavisit.visitername; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN oavisit.visitername IS '"姓名"可能会有5个以下名字。
';


--
-- Name: COLUMN oavisit.visiterdeptoraddress; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN oavisit.visiterdeptoraddress IS '"单位或住址"';


--
-- Name: COLUMN oavisit.visiterphone; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN oavisit.visiterphone IS '"联系电话"';


--
-- Name: COLUMN oavisit.visiternumber; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN oavisit.visiternumber IS '"人数"';


--
-- Name: COLUMN oavisit.visitedornot; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN oavisit.visitedornot IS '"初访或重访初信或重信"
初访重访(重访、重信)
根据名字自动判断';


--
-- Name: COLUMN oavisit.visiterproblem; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN oavisit.visiterproblem IS '"反映的主要问题"';


--
-- Name: COLUMN oavisit.visitorletter; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN oavisit.visitorletter IS '"来信或来访"
来信、来访,注意:重信or重访';


--
-- Name: COLUMN oavisit.visitprcess; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN oavisit.visitprcess IS '"交办处理情况"';


--
-- Name: COLUMN oavisit.vistsource; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN oavisit.vistsource IS '"信访来源"';


--
-- Name: COLUMN oavisit.public; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN oavisit.public IS '"是否公开"';


--
-- Name: oavisitaimcategory; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE oavisitaimcategory (
    id bigint NOT NULL,
    name character varying(64) NOT NULL,
    viewid bigint NOT NULL,
    viewname character varying(128) NOT NULL
);


ALTER TABLE public.oavisitaimcategory OWNER TO postgres;

--
-- Name: oavisitattachment; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE oavisitattachment (
    id bigint NOT NULL,
    content bytea NOT NULL,
    contenttype character varying(64) NOT NULL,
    contentname character varying(128)
);


ALTER TABLE public.oavisitattachment OWNER TO postgres;

--
-- Name: oavisitcontentcategory; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE oavisitcontentcategory (
    id bigint NOT NULL,
    name character varying(64) NOT NULL,
    viewid bigint,
    viewname character varying(128) NOT NULL,
    pcateid bigint NOT NULL
);


ALTER TABLE public.oavisitcontentcategory OWNER TO postgres;

--
-- Name: oavisitcontentparentcategory; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE oavisitcontentparentcategory (
    id bigint NOT NULL,
    name character varying(64) NOT NULL,
    viewid bigint,
    viewname character varying(128) NOT NULL
);


ALTER TABLE public.oavisitcontentparentcategory OWNER TO postgres;

--
-- Name: oavisitsolvewithdept; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE oavisitsolvewithdept (
    id bigint NOT NULL,
    visitid bigint NOT NULL,
    deptid bigint NOT NULL,
    rsved boolean DEFAULT false NOT NULL,
    done boolean DEFAULT false NOT NULL,
    endornot boolean DEFAULT true NOT NULL,
    result text NOT NULL,
    attachementid bigint,
    rsvtime timestamp without time zone,
    pstime timestamp without time zone,
    rsvuserid bigint,
    psuserid bigint,
    sort integer DEFAULT 1 NOT NULL
);


ALTER TABLE public.oavisitsolvewithdept OWNER TO postgres;

--
-- Name: smsrsv; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE smsrsv (
    id bigint NOT NULL,
    users bigint,
    number bigint,
    rsvmeeting smallint DEFAULT 0 NOT NULL,
    rsvvisit smallint DEFAULT 0 NOT NULL,
    rsvdocument smallint DEFAULT 0 NOT NULL,
    rsvlogin smallint DEFAULT 0 NOT NULL,
    rsv1 smallint DEFAULT 0 NOT NULL,
    rsv2 smallint DEFAULT 0 NOT NULL,
    rsv3 smallint DEFAULT 0 NOT NULL
);


ALTER TABLE public.smsrsv OWNER TO postgres;

--
-- Name: smssend; Type: TABLE; Schema: public; Owner: postgres; Tablespace:
--

CREATE TABLE smssend (
    id bigint NOT NULL,
    times timestamp without time zone NOT NULL,
    users bigint NOT NULL,
    dept bigint NOT NULL,
    text text NOT NULL,
    count integer NOT NULL,
    rsvers text NOT NULL,
    rmoney boolean DEFAULT true NOT NULL
);


ALTER TABLE public.smssend OWNER TO postgres;

--
-- Name: seq_oa_dept; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER TABLE public.seq_oa_dept OWNER TO postgres;

--
-- Name: seq_oa_doc; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER TABLE public.seq_oa_doc OWNER TO postgres;

--
-- Name: seq_oa_doc_attach; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER TABLE public.seq_oa_doc_attach OWNER TO postgres;

--
-- Name: seq_oa_doc_audit; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER TABLE public.seq_oa_doc_audit OWNER TO postgres;

--
-- Name: seq_oa_doc_category; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER TABLE public.seq_oa_doc_category OWNER TO postgres;

--
-- Name: seq_oa_doc_content; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER TABLE public.seq_oa_doc_content OWNER TO postgres;

--
-- Name: seq_oa_doc_receive; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER TABLE public.seq_oa_doc_receive OWNER TO postgres;

--
-- Name: seq_oa_doc_send; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER TABLE public.seq_oa_doc_send OWNER TO postgres;

--
-- Name: seq_oa_doc_type; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER TABLE public.seq_oa_doc_type OWNER TO postgres;

--
-- Name: seq_oa_doc_uperdoc; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER TABLE public.seq_oa_doc_uperdoc OWNER TO postgres;

--
-- Name: seq_oa_duty; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER TABLE public.seq_oa_duty OWNER TO postgres;

--
-- Name: seq_oa_info; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER TABLE public.seq_oa_info OWNER TO postgres;

--
-- Name: seq_oa_info_category; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER TABLE public.seq_oa_info_category OWNER TO postgres;

--
-- Name: seq_oa_message; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER TABLE public.seq_oa_message OWNER TO postgres;

--
-- Name: seq_oa_oversee; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER TABLE public.seq_oa_oversee OWNER TO postgres;

--
-- Name: seq_oa_oversee_do; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER TABLE public.seq_oa_oversee_do OWNER TO postgres;

--
-- Name: seq_oa_role; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER TABLE public.seq_oa_role OWNER TO postgres;

--
-- Name: seq_oa_user; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER TABLE public.seq_oa_user OWNER TO postgres;

--
-- Name: seq_oa_user_friend; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER TABLE public.seq_oa_user_friend OWNER TO postgres;

--
-- Name: seq_oa_user_friend_group; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER TABLE public.seq_oa_user_friend_group OWNER TO postgres;

--
-- Name: seq_oa_visit; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER TABLE public.seq_oa_visit OWNER TO postgres;

--
-- Name: seq_oa_visitaimcategory; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER TABLE public.seq_oa_visitaimcategory OWNER TO postgres;

--
-- Name: seq_oa_visitattachment; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER TABLE public.seq_oa_visitattachment OWNER TO postgres;

--
-- Name: seq_oa_visitcontentcategory; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER TABLE public.seq_oa_visitcontentcategory OWNER TO postgres;

--
-- Name: seq_oa_visitcontentparentcategory; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER TABLE public.seq_oa_visitcontentparentcategory OWNER TO postgres;

--
-- Name: seq_oa_visitsolvewithdept; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER TABLE public.seq_oa_visitsolvewithdept OWNER TO postgres;

--
-- Name: seq_oa_webimage; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER TABLE public.seq_oa_webimage OWNER TO postgres;

--
-- Name: seq_oa_webinfo; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER TABLE public.seq_oa_webinfo OWNER TO postgres;

--
-- Name: seq_oa_webinfo_category; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER TABLE public.seq_oa_webinfo_category OWNER TO postgres;

--
-- Name: seq_oa_webinfo_channel; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER TABLE public.seq_oa_webinfo_channel OWNER TO postgres;

--
-- Name: seq_oa_webinfo_comment; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER TABLE public.seq_oa_webinfo_comment OWNER TO postgres;

--
-- Name: seq_oa_webinfo_content; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER TABLE public.seq_oa_webinfo_content OWNER TO postgres;

--
-- Name: seq_oa_weblook; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER TABLE public.seq_oa_weblook OWNER TO postgres;

--
-- Name: seq_oa_work; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER TABLE public.seq_oa_work OWNER TO postgres;

--
-- Name: seq_smsrsv; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER TABLE public.seq_smsrsv OWNER TO postgres;

--
-- Name: seq_smssend; Type: SEQUENCE; Schema: public; Owner: postgres
--

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


ALTER TABLE public.seq_smssend OWNER TO postgres;

--
-- Name: oa_dept_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY oa_dept
    ADD CONSTRAINT oa_dept_pkey PRIMARY KEY (id);


--
-- Name: oa_doc_attach_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY oa_doc_attach
    ADD CONSTRAINT oa_doc_attach_pkey PRIMARY KEY (id);


--
-- Name: oa_doc_audit_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY oa_doc_audit
    ADD CONSTRAINT oa_doc_audit_pkey PRIMARY KEY (id);


--
-- Name: oa_doc_category_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY oa_doc_category
    ADD CONSTRAINT oa_doc_category_pkey PRIMARY KEY (id);


--
-- Name: oa_doc_content_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY oa_doc_content
    ADD CONSTRAINT oa_doc_content_pkey PRIMARY KEY (id);


--
-- Name: oa_doc_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY oa_doc
    ADD CONSTRAINT oa_doc_pkey PRIMARY KEY (id);


--
-- Name: oa_doc_receive_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY oa_doc_receive
    ADD CONSTRAINT oa_doc_receive_pkey PRIMARY KEY (id);


--
-- Name: oa_doc_send_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY oa_doc_send
    ADD CONSTRAINT oa_doc_send_pkey PRIMARY KEY (id);


--
-- Name: oa_doc_type_oa_doc_type_name_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY oa_doc_type
    ADD CONSTRAINT oa_doc_type_oa_doc_type_name_key UNIQUE (oa_doc_type_name);


--
-- Name: oa_doc_type_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY oa_doc_type
    ADD CONSTRAINT oa_doc_type_pkey PRIMARY KEY (id);


--
-- Name: oa_doc_uperdoc_deptid_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY oa_doc_uperdoc
    ADD CONSTRAINT oa_doc_uperdoc_deptid_key UNIQUE (deptid);


--
-- Name: oa_doc_uperdoc_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY oa_doc_uperdoc
    ADD CONSTRAINT oa_doc_uperdoc_pkey PRIMARY KEY (id);


--
-- Name: oa_duty_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY oa_duty
    ADD CONSTRAINT oa_duty_pkey PRIMARY KEY (id);


--
-- Name: oa_info_category_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY oa_info_category
    ADD CONSTRAINT oa_info_category_pkey PRIMARY KEY (id);


--
-- Name: oa_info_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY oa_info
    ADD CONSTRAINT oa_info_pkey PRIMARY KEY (id);


--
-- Name: oa_message_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY oa_message
    ADD CONSTRAINT oa_message_pkey PRIMARY KEY (id);


--
-- Name: oa_oversee_do_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY oa_oversee_do
    ADD CONSTRAINT oa_oversee_do_pkey PRIMARY KEY (id);


--
-- Name: oa_oversee_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY oa_oversee
    ADD CONSTRAINT oa_oversee_pkey PRIMARY KEY (id);


--
-- Name: oa_role_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY oa_role
    ADD CONSTRAINT oa_role_pkey PRIMARY KEY (id);


--
-- Name: oa_user_friend_group_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY oa_user_friend_group
    ADD CONSTRAINT oa_user_friend_group_pkey PRIMARY KEY (id);


--
-- Name: oa_user_friend_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY oa_user_friend
    ADD CONSTRAINT oa_user_friend_pkey PRIMARY KEY (id);


--
-- Name: oa_user_login_name_key; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY oa_user
    ADD CONSTRAINT oa_user_login_name_key UNIQUE (login_name);


--
-- Name: oa_user_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY oa_user
    ADD CONSTRAINT oa_user_pkey PRIMARY KEY (id);


--
-- Name: oa_webimage_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY oa_webimage
    ADD CONSTRAINT oa_webimage_pkey PRIMARY KEY (id);


--
-- Name: oa_webinfo_category_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY oa_webinfo_category
    ADD CONSTRAINT oa_webinfo_category_pkey PRIMARY KEY (id);


--
-- Name: oa_webinfo_channel_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY oa_webinfo_channel
    ADD CONSTRAINT oa_webinfo_channel_pkey PRIMARY KEY (id);


--
-- Name: oa_webinfo_comment_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY oa_webinfo_comment
    ADD CONSTRAINT oa_webinfo_comment_pkey PRIMARY KEY (id);


--
-- Name: oa_webinfo_content_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY oa_webinfo_content
    ADD CONSTRAINT oa_webinfo_content_pkey PRIMARY KEY (id);


--
-- Name: oa_webinfo_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY oa_webinfo
    ADD CONSTRAINT oa_webinfo_pkey PRIMARY KEY (id);


--
-- Name: oa_weblook_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY oa_weblook
    ADD CONSTRAINT oa_weblook_pkey PRIMARY KEY (id);


--
-- Name: oa_work_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY oa_work
    ADD CONSTRAINT oa_work_pkey PRIMARY KEY (id);


--
-- Name: oavisit_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY oavisit
    ADD CONSTRAINT oavisit_pkey PRIMARY KEY (id);


--
-- Name: oavisitaimcategory_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY oavisitaimcategory
    ADD CONSTRAINT oavisitaimcategory_pkey PRIMARY KEY (id);


--
-- Name: oavisitattachment_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY oavisitattachment
    ADD CONSTRAINT oavisitattachment_pkey PRIMARY KEY (id);


--
-- Name: oavisitcontentcategory_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY oavisitcontentcategory
    ADD CONSTRAINT oavisitcontentcategory_pkey PRIMARY KEY (id);


--
-- Name: oavisitcontentparentcategory_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY oavisitcontentparentcategory
    ADD CONSTRAINT oavisitcontentparentcategory_pkey PRIMARY KEY (id);


--
-- Name: oavisitsolvewithdept_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY oavisitsolvewithdept
    ADD CONSTRAINT oavisitsolvewithdept_pkey PRIMARY KEY (id);


--
-- Name: smsrsv_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY smsrsv
    ADD CONSTRAINT smsrsv_pkey PRIMARY KEY (id);


--
-- Name: smssend_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace:
--

ALTER TABLE ONLY smssend
    ADD CONSTRAINT smssend_pkey PRIMARY KEY (id);


--
-- Name: fki_oa_doc_audit_oa_doc_audit_fkey; Type: INDEX; Schema: public; Owner: postgres; Tablespace:
--

CREATE INDEX fki_oa_doc_audit_oa_doc_audit_fkey ON oa_doc_audit USING btree (oa_pre_id);


--
-- Name: fki_oa_doc_oa_user_fkey; Type: INDEX; Schema: public; Owner: postgres; Tablespace:
--

CREATE INDEX fki_oa_doc_oa_user_fkey ON oa_doc USING btree (oa_user_id);


--
-- Name: fki_oa_duty_oa_dept_fkey; Type: INDEX; Schema: public; Owner: postgres; Tablespace:
--

CREATE INDEX fki_oa_duty_oa_dept_fkey ON oa_duty USING btree (oa_dept_id);


--
-- Name: fki_oa_info_category_oa_dept_fkey; Type: INDEX; Schema: public; Owner: postgres; Tablespace:
--

CREATE INDEX fki_oa_info_category_oa_dept_fkey ON oa_info_category USING btree (oa_dept_id);


--
-- Name: fki_oa_info_oa_info_category_fkey; Type: INDEX; Schema: public; Owner: postgres; Tablespace:
--

CREATE INDEX fki_oa_info_oa_info_category_fkey ON oa_info USING btree (oa_info_category_id);


--
-- Name: fki_oa_webinfo_category_webinfo_chaanel_fkey; Type: INDEX; Schema: public; Owner: postgres; Tablespace:
--

CREATE INDEX fki_oa_webinfo_category_webinfo_chaanel_fkey ON oa_webinfo_category USING btree (p_id);


--
-- Name: fki_oa_webinfo_channel_fkey; Type: INDEX; Schema: public; Owner: postgres; Tablespace:
--

CREATE INDEX fki_oa_webinfo_channel_fkey ON oa_webinfo_channel USING btree (oa_dept_id);


--
-- Name: fki_oa_webinfo_content_webinfo_fkey; Type: INDEX; Schema: public; Owner: postgres; Tablespace:
--

CREATE INDEX fki_oa_webinfo_content_webinfo_fkey ON oa_webinfo_content USING btree (oa_webinfo_id);


--
-- Name: fki_oa_weblook_fkey; Type: INDEX; Schema: public; Owner: postgres; Tablespace:
--

CREATE INDEX fki_oa_weblook_fkey ON oa_weblook USING btree (oa_dept_id);


--
-- Name: fki_oavisit_oauser_fkey; Type: INDEX; Schema: public; Owner: postgres; Tablespace:
--

CREATE INDEX fki_oavisit_oauser_fkey ON oavisit USING btree (userid);


--
-- Name: fki_oavisit_oavisitaimcategory_fkey; Type: INDEX; Schema: public; Owner: postgres; Tablespace:
--

CREATE INDEX fki_oavisit_oavisitaimcategory_fkey ON oavisit USING btree (acateid);


--
-- Name: fki_oavisit_oavisitcontentcategory_fkey; Type: INDEX; Schema: public; Owner: postgres; Tablespace:
--

CREATE INDEX fki_oavisit_oavisitcontentcategory_fkey ON oavisit USING btree (cateid);


--
-- Name: fki_oavisitcontentcategory_oavisitcontentparentcategory_fkey; Type: INDEX; Schema: public; Owner: postgres; Tablespace:
--

CREATE INDEX fki_oavisitcontentcategory_oavisitcontentparentcategory_fkey ON oavisitcontentcategory USING btree (pcateid);


--
-- Name: fki_oavisitsolvewithdept_oadept_fkey; Type: INDEX; Schema: public; Owner: postgres; Tablespace:
--

CREATE INDEX fki_oavisitsolvewithdept_oadept_fkey ON oavisitsolvewithdept USING btree (deptid);


--
-- Name: fki_oavisitsolvewithdept_oavisit; Type: INDEX; Schema: public; Owner: postgres; Tablespace:
--

CREATE INDEX fki_oavisitsolvewithdept_oavisit ON oavisitsolvewithdept USING btree (visitid);


--
-- Name: fki_oavisitsolvewithdept_oavisitattachment_fkey; Type: INDEX; Schema: public; Owner: postgres; Tablespace:
--

CREATE INDEX fki_oavisitsolvewithdept_oavisitattachment_fkey ON oavisitsolvewithdept USING btree (attachementid);


--
-- Name: fki_oavisitsolvewithdept_visitattachment_fkey; Type: INDEX; Schema: public; Owner: postgres; Tablespace:
--

CREATE INDEX fki_oavisitsolvewithdept_visitattachment_fkey ON oavisitsolvewithdept USING btree (visitid);


--
-- Name: fkio_o_webimage-webinfo-fkey; Type: INDEX; Schema: public; Owner: postgres; Tablespace:
--

CREATE INDEX "fkio_o_webimage-webinfo-fkey" ON oa_webimage USING btree (oa_webinfo_id);


--
-- Name: dept_self_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY oa_dept
    ADD CONSTRAINT dept_self_fkey FOREIGN KEY (pid) REFERENCES oa_dept(id);


--
-- Name: fk10679c65286f89fc; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY oa_user_friend_group
    ADD CONSTRAINT fk10679c65286f89fc FOREIGN KEY (oa_user_id) REFERENCES oa_user(id);


--
-- Name: fk1f28a9728dd5bfbc; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY oa_doc_category
    ADD CONSTRAINT fk1f28a9728dd5bfbc FOREIGN KEY (oa_dept_id) RE
5day 2008-07-03
前面一个数据库的SQL没用。下面这个是我所有数据库。其中包括了OOA,IWEB,jive等等。
dqilu 2008-07-09
非常感谢,正在学习中
nextw3 2008-07-15
为什么使用IBM的JDK那?说说理由啊
cris_jxg 2008-07-20
nextw3 写道
为什么使用IBM的JDK那?说说理由啊

估计他用的是websphere
IBM自己搞jdk,有点恶心
5day 2008-07-21
没!我用jboss,因为迁移数据的时候写的代码用sunjdk老是out of memory。改用ibmjdk就没这个问题。于是就用了。况且速度的确比sun快。
今天编译seam2.1,发觉ibm jdk编译不过。结果改用openjdk6就顺利通过,现在正用openjdk6。还不晓得后面会碰到什么情况。
luchengchuan 2008-08-30
老大,这个SQL只是表结构啊,没法跑起来,能不能给个有数据的SQL啊