[services-cvs] CVS services/etc/swinst/postgres

CVS User miham root at tempel.bibl.u-szeged.hu
2004. Nov. 19., P, 21:50:29 CET


Update of /var/lib/cvs/services/etc/swinst/postgres
In directory tempel:/tmp/cvs-serv22223/etc/swinst/postgres

Added Files:
	swinst_create.sql 
Log Message:
Modositott cuccosok..



--- /var/lib/cvs/services/etc/swinst/postgres/swinst_create.sql	2004/11/19 20:50:29	NONE
+++ /var/lib/cvs/services/etc/swinst/postgres/swinst_create.sql	2004/11/19 20:50:29	1.1
--
-- PostgreSQL database dump
--

SET client_encoding = 'SQL_ASCII';
SET check_function_bodies = false;

SET SESSION AUTHORIZATION 'swinst';

--
-- TOC entry 2 (OID 0)
-- Name: swinst; Type: DATABASE; Schema: -; Owner: swinst
--

CREATE DATABASE swinst WITH TEMPLATE = template0 ENCODING = 'SQL_ASCII';


\connect swinst swinst

SET client_encoding = 'SQL_ASCII';
SET check_function_bodies = false;

SET SESSION AUTHORIZATION 'postgres';

--
-- TOC entry 4 (OID 2200)
-- Name: public; Type: ACL; Schema: -; Owner: postgres
--

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


SET SESSION AUTHORIZATION 'swinst';

SET search_path = public, pg_catalog;

--
-- TOC entry 5 (OID 1137499)
-- Name: packagers; Type: TABLE; Schema: public; Owner: swinst
--

CREATE TABLE packagers (
    uid serial NOT NULL,
    name text,
    email text,
    login text,
    "password" text,
    lastlogin timestamp without time zone,
    packagenum integer DEFAULT 0
);


--
-- TOC entry 6 (OID 1137508)
-- Name: licensetypes; Type: TABLE; Schema: public; Owner: swinst
--

CREATE TABLE licensetypes (
    ltid serial NOT NULL,
    "licenseName" text,
    description text,
    "needLicense" smallint DEFAULT 1
);


--
-- TOC entry 7 (OID 1137517)
-- Name: packages; Type: TABLE; Schema: public; Owner: swinst
--

CREATE TABLE packages (
    pid serial NOT NULL,
    name text,
    "version" text,
    filename text,
    uploader integer,
    uploadtime timestamp without time zone,
    "comment" text,
    ltid integer
);


--
-- TOC entry 8 (OID 1137525)
-- Name: licenses; Type: TABLE; Schema: public; Owner: swinst
--

CREATE TABLE licenses (
    lid serial NOT NULL,
    totallicense integer,
    usedlicense integer
);


--
-- TOC entry 9 (OID 1137528)
-- Name: packagelicense; Type: TABLE; Schema: public; Owner: swinst
--

CREATE TABLE packagelicense (
    pid integer,
    lid integer
);


--
-- TOC entry 10 (OID 1137530)
-- Name: licenserecords; Type: TABLE; Schema: public; Owner: swinst
--

CREATE TABLE licenserecords (
    lid integer,
    pid integer,
    pending boolean DEFAULT true,
    address inet,
    registered timestamp without time zone
);


--
-- TOC entry 13 (OID 1137547)
-- Name: packagers_uid_key; Type: CONSTRAINT; Schema: public; Owner: swinst
--

ALTER TABLE ONLY packagers
    ADD CONSTRAINT packagers_uid_key UNIQUE (uid);


--
-- TOC entry 12 (OID 1137549)
-- Name: packagers_name_key; Type: CONSTRAINT; Schema: public; Owner: swinst
--

ALTER TABLE ONLY packagers
    ADD CONSTRAINT packagers_name_key UNIQUE (name);


--
-- TOC entry 11 (OID 1137551)
-- Name: packagers_login_key; Type: CONSTRAINT; Schema: public; Owner: swinst
--

ALTER TABLE ONLY packagers
    ADD CONSTRAINT packagers_login_key UNIQUE (login);


--
-- TOC entry 14 (OID 1137553)
-- Name: licensetypes_ltid_key; Type: CONSTRAINT; Schema: public; Owner: swinst
--

ALTER TABLE ONLY licensetypes
    ADD CONSTRAINT licensetypes_ltid_key UNIQUE (ltid);


--
-- TOC entry 17 (OID 1137555)
-- Name: packages_pid_key; Type: CONSTRAINT; Schema: public; Owner: swinst
--

ALTER TABLE ONLY packages
    ADD CONSTRAINT packages_pid_key UNIQUE (pid);


--
-- TOC entry 16 (OID 1137557)
-- Name: packages_name_key; Type: CONSTRAINT; Schema: public; Owner: swinst
--

ALTER TABLE ONLY packages
    ADD CONSTRAINT packages_name_key UNIQUE (name, "version", ltid);


--
-- TOC entry 15 (OID 1137559)
-- Name: packages_filename_key; Type: CONSTRAINT; Schema: public; Owner: swinst
--

ALTER TABLE ONLY packages
    ADD CONSTRAINT packages_filename_key UNIQUE (filename);


--
-- TOC entry 18 (OID 1137561)
-- Name: licenses_lid_key; Type: CONSTRAINT; Schema: public; Owner: swinst
--

ALTER TABLE ONLY licenses
    ADD CONSTRAINT licenses_lid_key UNIQUE (lid);


--
-- TOC entry 19 (OID 1137563)
-- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: swinst
--

ALTER TABLE ONLY packages
    ADD CONSTRAINT "$1" FOREIGN KEY (uploader) REFERENCES packagers(uid) ON UPDATE CASCADE;


--
-- TOC entry 20 (OID 1137567)
-- Name: $2; Type: FK CONSTRAINT; Schema: public; Owner: swinst
--

ALTER TABLE ONLY packages
    ADD CONSTRAINT "$2" FOREIGN KEY (ltid) REFERENCES licensetypes(ltid) ON UPDATE CASCADE;


--
-- TOC entry 21 (OID 1137571)
-- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: swinst
--

ALTER TABLE ONLY packagelicense
    ADD CONSTRAINT "$1" FOREIGN KEY (pid) REFERENCES packages(pid) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 22 (OID 1137575)
-- Name: $2; Type: FK CONSTRAINT; Schema: public; Owner: swinst
--

ALTER TABLE ONLY packagelicense
    ADD CONSTRAINT "$2" FOREIGN KEY (lid) REFERENCES licenses(lid) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 23 (OID 1137579)
-- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: swinst
--

ALTER TABLE ONLY licenserecords
    ADD CONSTRAINT "$1" FOREIGN KEY (lid) REFERENCES licenses(lid) ON UPDATE CASCADE ON DELETE CASCADE;


--
-- TOC entry 24 (OID 1137583)
-- Name: $2; Type: FK CONSTRAINT; Schema: public; Owner: swinst
--

ALTER TABLE ONLY licenserecords
    ADD CONSTRAINT "$2" FOREIGN KEY (pid) REFERENCES packages(pid) ON UPDATE CASCADE;


SET SESSION AUTHORIZATION 'postgres';

--
-- TOC entry 3 (OID 2200)
-- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: postgres
--

COMMENT ON SCHEMA public IS 'Standard public schema';






További információk a(z) Services-cvs levelezőlistáról