[Openupload-svn-update] SF.net SVN: openupload:[127] trunk/sql/pgsql
Status: Beta
Brought to you by:
tsdogs
|
From: <ts...@us...> - 2008-11-07 18:03:09
|
Revision: 127
http://openupload.svn.sourceforge.net/openupload/?rev=127&view=rev
Author: tsdogs
Date: 2008-11-07 18:03:04 +0000 (Fri, 07 Nov 2008)
Log Message:
-----------
add pgsql sql start scripts
Added Paths:
-----------
trunk/sql/pgsql/1_structure.sql
trunk/sql/pgsql/2_base.sql
trunk/sql/pgsql/3_mode_private.sql
trunk/sql/pgsql/3_mode_public.sql
trunk/sql/pgsql/3_mode_restricted.sql
trunk/sql/pgsql/3_mode_service.sql
Added: trunk/sql/pgsql/1_structure.sql
===================================================================
--- trunk/sql/pgsql/1_structure.sql (rev 0)
+++ trunk/sql/pgsql/1_structure.sql 2008-11-07 18:03:04 UTC (rev 127)
@@ -0,0 +1,408 @@
+--
+-- 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: acl; Type: TABLE; Schema: public; Owner: openupload; Tablespace:
+--
+
+CREATE TABLE acl (
+ id integer NOT NULL,
+ module character varying(100) NOT NULL,
+ action character varying(100) NOT NULL,
+ group_name character varying(100) NOT NULL,
+ access character varying(100) NOT NULL
+);
+
+
+--
+-- Name: banned; Type: TABLE; Schema: public; Owner: openupload; Tablespace:
+--
+
+CREATE TABLE banned (
+ id integer NOT NULL,
+ ip character varying(50),
+ access character varying(50),
+ priority integer
+);
+
+
+
+--
+-- Name: file_options; Type: TABLE; Schema: public; Owner: openupload; Tablespace:
+--
+
+CREATE TABLE file_options (
+ id integer NOT NULL,
+ file_id character varying(100) NOT NULL,
+ module character varying(50) NOT NULL,
+ name character varying(50) NOT NULL,
+ value character varying(200) NOT NULL
+);
+
+
+
+--
+-- Name: files; Type: TABLE; Schema: public; Owner: openupload; Tablespace:
+--
+
+CREATE TABLE files (
+ id character varying(100) NOT NULL,
+ name character varying(200) NOT NULL,
+ mime character varying(200) NOT NULL,
+ description text NOT NULL,
+ size integer NOT NULL,
+ remove character varying(100) NOT NULL,
+ user_login character varying(100) NOT NULL,
+ ip character varying(40) NOT NULL,
+ upload_date timestamp without time zone NOT NULL
+);
+
+
+
+--
+-- Name: groups; Type: TABLE; Schema: public; Owner: openupload; Tablespace:
+--
+
+CREATE TABLE groups (
+ name character varying(50) NOT NULL,
+ description character varying(250)
+);
+
+
+
+--
+-- Name: langs; Type: TABLE; Schema: public; Owner: openupload; Tablespace:
+--
+
+CREATE TABLE langs (
+ id character varying(10) NOT NULL,
+ name character varying(50) NOT NULL,
+ locale character varying(10) NOT NULL,
+ browser character varying(200),
+ charset character varying(50) NOT NULL,
+ active integer DEFAULT 1 NOT NULL
+);
+
+
+
+--
+-- Name: plugin_acl; Type: TABLE; Schema: public; Owner: openupload; Tablespace:
+--
+
+CREATE TABLE plugin_acl (
+ id integer NOT NULL,
+ group_name character varying(50) NOT NULL,
+ plugin character varying(100) NOT NULL,
+ access character varying(10) NOT NULL
+);
+
+
+
+--
+-- Name: plugin_options; Type: TABLE; Schema: public; Owner: openupload; Tablespace:
+--
+
+CREATE TABLE plugin_options (
+ id integer NOT NULL,
+ plugin character varying(100) NOT NULL,
+ group_name character varying(100) NOT NULL,
+ name character varying(100) NOT NULL,
+ value text
+);
+
+
+
+--
+-- Name: users; Type: TABLE; Schema: public; Owner: openupload; Tablespace:
+--
+
+CREATE TABLE users (
+ id integer NOT NULL,
+ login character varying(100) NOT NULL,
+ password character varying(100) NOT NULL,
+ name character varying(200) NOT NULL,
+ group_name character varying(50) NOT NULL,
+ email character varying(250) NOT NULL,
+ lang character varying(10) NOT NULL,
+ reg_date timestamp without time zone NOT NULL,
+ regid character varying(50) NOT NULL,
+ active integer NOT NULL
+);
+
+
+
+--
+-- Name: acl_id_seq; Type: SEQUENCE; Schema: public; Owner: openupload
+--
+
+CREATE SEQUENCE acl_id_seq
+ INCREMENT BY 1
+ NO MAXVALUE
+ NO MINVALUE
+ CACHE 1;
+
+
+
+--
+-- Name: acl_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: openupload
+--
+
+ALTER SEQUENCE acl_id_seq OWNED BY acl.id;
+
+
+--
+-- Name: banned_id_seq; Type: SEQUENCE; Schema: public; Owner: openupload
+--
+
+CREATE SEQUENCE banned_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MAXVALUE
+ NO MINVALUE
+ CACHE 1;
+
+
+
+--
+-- Name: banned_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: openupload
+--
+
+ALTER SEQUENCE banned_id_seq OWNED BY banned.id;
+
+
+--
+-- Name: file_options_id_seq; Type: SEQUENCE; Schema: public; Owner: openupload
+--
+
+CREATE SEQUENCE file_options_id_seq
+ INCREMENT BY 1
+ NO MAXVALUE
+ NO MINVALUE
+ CACHE 1;
+
+
+
+--
+-- Name: file_options_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: openupload
+--
+
+ALTER SEQUENCE file_options_id_seq OWNED BY file_options.id;
+
+
+--
+-- Name: plugin_acl_id_seq; Type: SEQUENCE; Schema: public; Owner: openupload
+--
+
+CREATE SEQUENCE plugin_acl_id_seq
+ START WITH 1
+ INCREMENT BY 1
+ NO MAXVALUE
+ NO MINVALUE
+ CACHE 1;
+
+
+
+--
+-- Name: plugin_acl_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: openupload
+--
+
+ALTER SEQUENCE plugin_acl_id_seq OWNED BY plugin_acl.id;
+
+
+--
+-- Name: plugin_options_id_seq; Type: SEQUENCE; Schema: public; Owner: openupload
+--
+
+CREATE SEQUENCE plugin_options_id_seq
+ INCREMENT BY 1
+ NO MAXVALUE
+ NO MINVALUE
+ CACHE 1;
+
+
+
+--
+-- Name: plugin_options_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: openupload
+--
+
+ALTER SEQUENCE plugin_options_id_seq OWNED BY plugin_options.id;
+
+
+--
+-- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: openupload
+--
+
+CREATE SEQUENCE users_id_seq
+ INCREMENT BY 1
+ NO MAXVALUE
+ NO MINVALUE
+ CACHE 1;
+
+--
+-- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: openupload
+--
+
+ALTER SEQUENCE users_id_seq OWNED BY users.id;
+
+
+--
+-- Name: id; Type: DEFAULT; Schema: public; Owner: openupload
+--
+
+ALTER TABLE acl ALTER COLUMN id SET DEFAULT nextval('acl_id_seq'::regclass);
+
+
+--
+-- Name: id; Type: DEFAULT; Schema: public; Owner: openupload
+--
+
+ALTER TABLE banned ALTER COLUMN id SET DEFAULT nextval('banned_id_seq'::regclass);
+
+
+--
+-- Name: id; Type: DEFAULT; Schema: public; Owner: openupload
+--
+
+ALTER TABLE file_options ALTER COLUMN id SET DEFAULT nextval('file_options_id_seq'::regclass);
+
+
+--
+-- Name: id; Type: DEFAULT; Schema: public; Owner: openupload
+--
+
+ALTER TABLE plugin_acl ALTER COLUMN id SET DEFAULT nextval('plugin_acl_id_seq'::regclass);
+
+
+--
+-- Name: id; Type: DEFAULT; Schema: public; Owner: openupload
+--
+
+ALTER TABLE plugin_options ALTER COLUMN id SET DEFAULT nextval('plugin_options_id_seq'::regclass);
+
+
+--
+-- Name: id; Type: DEFAULT; Schema: public; Owner: openupload
+--
+
+ALTER TABLE users ALTER COLUMN id SET DEFAULT nextval('users_id_seq'::regclass);
+
+
+--
+-- Name: acl_pkey; Type: CONSTRAINT; Schema: public; Owner: openupload; Tablespace:
+--
+
+ALTER TABLE ONLY acl
+ ADD CONSTRAINT acl_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: banned_pkey; Type: CONSTRAINT; Schema: public; Owner: openupload; Tablespace:
+--
+
+ALTER TABLE ONLY banned
+ ADD CONSTRAINT banned_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: file_options_pkey; Type: CONSTRAINT; Schema: public; Owner: openupload; Tablespace:
+--
+
+ALTER TABLE ONLY file_options
+ ADD CONSTRAINT file_options_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: files_pkey; Type: CONSTRAINT; Schema: public; Owner: openupload; Tablespace:
+--
+
+ALTER TABLE ONLY files
+ ADD CONSTRAINT files_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: groups_pkey; Type: CONSTRAINT; Schema: public; Owner: openupload; Tablespace:
+--
+
+ALTER TABLE ONLY groups
+ ADD CONSTRAINT groups_pkey PRIMARY KEY (name);
+
+
+--
+-- Name: langs_pkey; Type: CONSTRAINT; Schema: public; Owner: openupload; Tablespace:
+--
+
+ALTER TABLE ONLY langs
+ ADD CONSTRAINT langs_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: plugin_acl_pkey; Type: CONSTRAINT; Schema: public; Owner: openupload; Tablespace:
+--
+
+ALTER TABLE ONLY plugin_acl
+ ADD CONSTRAINT plugin_acl_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: plugin_options_pkey; Type: CONSTRAINT; Schema: public; Owner: openupload; Tablespace:
+--
+
+ALTER TABLE ONLY plugin_options
+ ADD CONSTRAINT plugin_options_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: users_pkey; Type: CONSTRAINT; Schema: public; Owner: openupload; Tablespace:
+--
+
+ALTER TABLE ONLY users
+ ADD CONSTRAINT users_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: file_id_idx; Type: INDEX; Schema: public; Owner: openupload; Tablespace:
+--
+
+CREATE INDEX file_id_idx ON file_options USING btree (file_id);
+
+
+--
+-- Name: plugin_acl_group_plugin_key; Type: INDEX; Schema: public; Owner: openupload; Tablespace:
+--
+
+CREATE UNIQUE INDEX plugin_acl_group_plugin_key ON plugin_acl USING btree (group_name, plugin);
+
+
+--
+-- Name: users_login_key; Type: INDEX; Schema: public; Owner: openupload; Tablespace:
+--
+
+CREATE UNIQUE INDEX users_login_key ON users USING btree (login);
+
+
+--
+-- 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
+--
Added: trunk/sql/pgsql/2_base.sql
===================================================================
--- trunk/sql/pgsql/2_base.sql (rev 0)
+++ trunk/sql/pgsql/2_base.sql 2008-11-07 18:03:04 UTC (rev 127)
@@ -0,0 +1,117 @@
+--
+-- 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;
+
+--
+-- Name: acl_id_seq; Type: SEQUENCE SET; Schema: public; Owner: openupload
+--
+
+SELECT pg_catalog.setval('acl_id_seq', 1, true);
+
+
+--
+-- Name: banned_id_seq; Type: SEQUENCE SET; Schema: public; Owner: openupload
+--
+
+SELECT pg_catalog.setval('banned_id_seq', 1, false);
+
+
+--
+-- Name: file_options_id_seq; Type: SEQUENCE SET; Schema: public; Owner: openupload
+--
+
+SELECT pg_catalog.setval('file_options_id_seq', 1, true);
+
+
+--
+-- Name: plugin_acl_id_seq; Type: SEQUENCE SET; Schema: public; Owner: openupload
+--
+
+SELECT pg_catalog.setval('plugin_acl_id_seq', 1, false);
+
+
+--
+-- Name: plugin_options_id_seq; Type: SEQUENCE SET; Schema: public; Owner: openupload
+--
+
+SELECT pg_catalog.setval('plugin_options_id_seq', 1, true);
+
+
+--
+-- Name: users_id_seq; Type: SEQUENCE SET; Schema: public; Owner: openupload
+--
+
+SELECT pg_catalog.setval('users_id_seq', 1, true);
+
+
+--
+-- Data for Name: acl; Type: TABLE DATA; Schema: public; Owner: openupload
+--
+
+INSERT INTO acl VALUES (1, '*', '*', 'admins', 'allow');
+INSERT INTO acl VALUES (2, 'admin', '*', 'admins', 'allow');
+INSERT INTO acl VALUES (3, 'admin', '*', '*', 'deny');
+INSERT INTO acl VALUES (4, 'auth', 'login', 'unregistered', 'allow');
+
+
+--
+-- Data for Name: banned; Type: TABLE DATA; Schema: public; Owner: openupload
+--
+
+INSERT INTO banned VALUES (1, '127.0.0.1', 'allow', 1);
+INSERT INTO banned VALUES (2, '0.0.0.0/0', 'allow', 9999999);
+
+--
+-- Data for Name: groups; Type: TABLE DATA; Schema: public; Owner: openupload
+--
+
+INSERT INTO groups VALUES ('admins', 'Administrators group');
+INSERT INTO groups VALUES ('unregistered', 'Unregistered users');
+INSERT INTO groups VALUES ('registered', 'Registered Users');
+
+
+--
+-- Data for Name: langs; Type: TABLE DATA; Schema: public; Owner: openupload
+--
+
+INSERT INTO langs VALUES ('en', 'English', 'en_EN', '[en];[en-EN]', 'iso-8559-1', 1);
+INSERT INTO langs VALUES ('it', 'Italiano', 'it_IT.utf8', '[it];[it-IT]', 'utf8', 1);
+
+
+--
+-- Data for Name: plugin_acl; Type: TABLE DATA; Schema: public; Owner: openupload
+--
+
+INSERT INTO plugin_acl VALUES (1, 'admins', 'password', 'enable');
+INSERT INTO plugin_acl VALUES (2, 'admins', 'captcha', 'enable');
+INSERT INTO plugin_acl VALUES (3, 'admins', 'email', 'enable');
+
+--
+-- Data for Name: plugin_options; Type: TABLE DATA; Schema: public; Owner: openupload
+--
+
+INSERT INTO plugin_options VALUES (1, 'mimetypes', 'unregistered', 'message', 'Pdf, JPEG');
+INSERT INTO plugin_options VALUES (2, 'mimetypes', 'unregisteres', 'allowed', 'application/pdf
+image/jpeg
+');
+
+
+--
+-- Data for Name: users; Type: TABLE DATA; Schema: public; Owner: openupload
+--
+
+INSERT INTO users VALUES (1, 'admin', '$1$jYkADrMf$pIf7UKkS3prHZPlvJ9vX61', 'Administrator', 'admins', 'ope...@yo...', 'en', now(), '', 1);
+
+
+--
+-- PostgreSQL database dump complete
+--
+
Added: trunk/sql/pgsql/3_mode_private.sql
===================================================================
--- trunk/sql/pgsql/3_mode_private.sql (rev 0)
+++ trunk/sql/pgsql/3_mode_private.sql 2008-11-07 18:03:04 UTC (rev 127)
@@ -0,0 +1,17 @@
+--
+-- Dump dei dati per la tabella `acl`
+--
+INSERT INTO acl VALUES (5, 'auth', 'register', '*', 'deny');
+INSERT INTO acl VALUES (6, 'auth', '*', 'unregistered', 'deny');
+INSERT INTO acl VALUES (7, 'auth', '*', '*', 'allow');
+INSERT INTO acl VALUES (8, 'files', '*', 'unregistered', 'deny');
+INSERT INTO acl VALUES (9, 'files', '*', '*', 'allow');
+
+--
+-- Dump dei dati per la tabella `plugin_acl`
+--
+
+INSERT INTO plugin_acl VALUES (4, 'registered', 'password', 'enable');
+INSERT INTO plugin_acl VALUES (5, 'registered', 'captcha', 'enable');
+INSERT INTO plugin_acl VALUES (6, 'registered', 'email', 'enable');
+
Added: trunk/sql/pgsql/3_mode_public.sql
===================================================================
--- trunk/sql/pgsql/3_mode_public.sql (rev 0)
+++ trunk/sql/pgsql/3_mode_public.sql 2008-11-07 18:03:04 UTC (rev 127)
@@ -0,0 +1,14 @@
+--
+-- Dump dei dati per la tabella acl
+--
+
+INSERT INTO acl VALUES(5, 'auth', '*', '*', 'deny');
+INSERT INTO acl VALUES(6, 'files', '*', '*', 'allow');
+
+--
+-- Dump dei dati per la tabella plugin_acl
+--
+
+INSERT INTO plugin_acl VALUES (4, 'unregistered', 'password', 'enable');
+INSERT INTO plugin_acl VALUES (5, 'unregistered', 'captcha', 'enable');
+INSERT INTO plugin_acl VALUES (6, 'unregistered', 'email', 'enable');
Added: trunk/sql/pgsql/3_mode_restricted.sql
===================================================================
--- trunk/sql/pgsql/3_mode_restricted.sql (rev 0)
+++ trunk/sql/pgsql/3_mode_restricted.sql 2008-11-07 18:03:04 UTC (rev 127)
@@ -0,0 +1,18 @@
+--
+-- Dump dei dati per la tabella acl
+--
+INSERT INTO acl VALUES (5, 'auth', 'register', '*', 'deny');
+INSERT INTO acl VALUES (6, 'auth', '*', 'unregistered', 'deny');
+INSERT INTO acl VALUES (7, 'auth', '*', '*', 'allow');
+INSERT INTO acl VALUES (8, 'files', 'd', 'unregistered', 'allow');
+INSERT INTO acl VALUES (9, 'files', 'g', 'unregistered', 'allow');
+INSERT INTO acl VALUES (10, 'files', '*', 'unregistered', 'deny');
+INSERT INTO acl VALUES (11, 'files', '*', '*', 'allow');
+
+--
+-- Dump dei dati per la tabella plugin_acl
+--
+
+INSERT INTO plugin_acl VALUES (4, 'registered', 'password', 'enable');
+INSERT INTO plugin_acl VALUES (5, 'registered', 'captcha', 'enable');
+INSERT INTO plugin_acl VALUES (6, 'registered', 'email', 'enable');
\ No newline at end of file
Added: trunk/sql/pgsql/3_mode_service.sql
===================================================================
--- trunk/sql/pgsql/3_mode_service.sql (rev 0)
+++ trunk/sql/pgsql/3_mode_service.sql 2008-11-07 18:03:04 UTC (rev 127)
@@ -0,0 +1,19 @@
+--
+-- Dump dei dati per la tabella acl
+--
+INSERT INTO acl VALUES(5, 'auth', 'register', 'unregistered', 'allow');
+INSERT INTO acl VALUES(6, 'auth', '*', 'unregistered', 'deny');
+INSERT INTO acl VALUES(7, 'auth', 'register', '*', 'deny');
+INSERT INTO acl VALUES(8, 'auth', '*', '*', 'allow');
+INSERT INTO acl VALUES(9, 'files', '*', '*', 'allow');
+
+--
+-- Dump dei dati per la tabella plugin_acl
+--
+
+INSERT INTO plugin_acl VALUES (4, 'registered', 'password', 'enable');
+INSERT INTO plugin_acl VALUES (5, 'registered', 'captcha', 'enable');
+INSERT INTO plugin_acl VALUES (6, 'registered', 'email', 'enable');
+INSERT INTO plugin_acl VALUES (7, 'unregistered', 'mimetypes', 'enable');
+INSERT INTO plugin_acl VALUES (8, 'unregistered', 'captcha', 'enable');
+INSERT INTO plugin_acl VALUES (9, 'unregistered', 'password', 'enable');
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|