Hello all!
As for me, I could not make ownCloud (1.1) to create PostgreSQL
database
schema. OwnCloud tried to login to default database (test1), which does not
exist on my server. So I was to create db schema by hands. My db creation
script in in the attachment. Maybe, it should be usefull for others.
--
Best regardw,
Pavel Baranchikov.
Monday 18 April 2011
--
-- Name: owncloud; Type: SCHEMA; Schema: -; Owner: owncloud
--
-- Name: groups_group_id_seq; Type: SEQUENCE; Schema: owncloud; Owner: owncloud
--
CREATE SEQUENCE groups_group_id_seq
START WITH 1
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;
--
-- Name: groups; Type: TABLE; Schema: owncloud; Owner: owncloud; Tablespace:
--
CREATE TABLE groups (
group_id integer DEFAULT nextval('groups_group_id_seq'::regclass) NOT NULL,
group_name character varying(64) NOT NULL
);
--
-- Name: locks; Type: TABLE; Schema: owncloud; Owner: owncloud; Tablespace:
--
CREATE TABLE locks (
token character varying(255) DEFAULT ''::character varying NOT NULL,
path character varying(200) DEFAULT ''::character varying NOT NULL,
created integer DEFAULT 0 NOT NULL,
modified integer DEFAULT 0 NOT NULL,
expires integer DEFAULT 0 NOT NULL,
owner character varying(200) DEFAULT NULL::character varying,
recursive integer DEFAULT 0,
writelock integer DEFAULT 0,
exclusivelock integer DEFAULT 0 NOT NULL
);
--
-- Name: log_id_seq; Type: SEQUENCE; Schema: owncloud; Owner: owncloud
--
CREATE SEQUENCE log_id_seq
START WITH 1
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;
--
-- Name: log; Type: TABLE; Schema: owncloud; Owner: owncloud; Tablespace:
--
CREATE TABLE log (
id integer DEFAULT nextval('log_id_seq'::regclass) NOT NULL,
"timestamp" integer NOT NULL,
"user" character varying(250) NOT NULL,
type integer NOT NULL,
message character varying(250) NOT NULL
);
--
-- Name: properties; Type: TABLE; Schema: owncloud; Owner: owncloud; Tablespace:
--
CREATE TABLE properties (
path character varying(255) DEFAULT ''::character varying NOT NULL,
name character varying(120) DEFAULT ''::character varying NOT NULL,
ns character varying(120) DEFAULT 'DAV:'::character varying NOT NULL,
value text
);
--
-- Name: users_groups_id_seq; Type: SEQUENCE; Schema: owncloud; Owner: owncloud
--
CREATE SEQUENCE users_groups_id_seq
START WITH 1
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;
--
-- Name: user_group; Type: TABLE; Schema: owncloud; Owner: owncloud; Tablespace:
--
CREATE TABLE user_group (
user_group_id integer DEFAULT nextval('users_groups_id_seq'::regclass),
user_id integer NOT NULL,
group_id integer NOT NULL
);
--
-- Name: users_user_id_seq; Type: SEQUENCE; Schema: owncloud; Owner: owncloud
--
CREATE SEQUENCE users_user_id_seq
START WITH 1
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;
--
-- Name: users; Type: TABLE; Schema: owncloud; Owner: owncloud; Tablespace:
--
CREATE TABLE users (
user_id integer DEFAULT nextval('users_user_id_seq'::regclass) NOT NULL,
user_name character varying(64) NOT NULL,
user_name_clean character varying(64) NOT NULL,
user_password character varying(340) NOT NULL
);
--
-- Name: groups_group_name_key; Type: CONSTRAINT; Schema: owncloud; Owner: owncloud; Tablespace:
--
ALTER TABLE ONLY groups
ADD CONSTRAINT groups_group_name_key UNIQUE (group_name);
--
-- Name: locks_pkey; Type: CONSTRAINT; Schema: owncloud; Owner: owncloud; Tablespace:
--
ALTER TABLE ONLY locks
ADD CONSTRAINT locks_pkey PRIMARY KEY (token);
--
-- Name: log_pkey; Type: CONSTRAINT; Schema: owncloud; Owner: owncloud; Tablespace:
--
ALTER TABLE ONLY log
ADD CONSTRAINT log_pkey PRIMARY KEY (id);
--
-- Name: pk_groups; Type: CONSTRAINT; Schema: owncloud; Owner: owncloud; Tablespace:
--
ALTER TABLE ONLY groups
ADD CONSTRAINT pk_groups PRIMARY KEY (group_id);
--
-- Name: pk_users; Type: CONSTRAINT; Schema: owncloud; Owner: owncloud; Tablespace:
--
ALTER TABLE ONLY users
ADD CONSTRAINT pk_users PRIMARY KEY (user_id);
--
-- Name: properties_pkey; Type: CONSTRAINT; Schema: owncloud; Owner: owncloud; Tablespace:
--
ALTER TABLE ONLY properties
ADD CONSTRAINT properties_pkey PRIMARY KEY (path, name, ns);
--
-- Name: users_user_name_key; Type: CONSTRAINT; Schema: owncloud; Owner: owncloud; Tablespace:
--
ALTER TABLE ONLY users
ADD CONSTRAINT users_user_name_key UNIQUE (user_name, user_name_clean);
--
-- Name: locks_1_idx; Type: INDEX; Schema: owncloud; Owner: owncloud; Tablespace:
--
CREATE INDEX locks_1_idx ON locks USING btree (path, token);
--
-- Name: locks_expires_idx; Type: INDEX; Schema: owncloud; Owner: owncloud; Tablespace:
--
CREATE INDEX locks_expires_idx ON locks USING btree (expires);
--
-- Name: locks_path_idx; Type: INDEX; Schema: owncloud; Owner: owncloud; Tablespace:
--
CREATE INDEX locks_path_idx ON locks USING btree (path);
--
-- Name: properties_path_idx; Type: INDEX; Schema: owncloud; Owner: owncloud; Tablespace:
--
CREATE INDEX properties_path_idx ON properties USING btree (path);
--
-- Name: fk_user_group_group; Type: FK CONSTRAINT; Schema: owncloud; Owner: owncloud
--
ALTER TABLE ONLY user_group
ADD CONSTRAINT fk_user_group_group FOREIGN KEY (group_id) REFERENCES groups(group_id);
--
-- Name: fk_user_group_user; Type: FK CONSTRAINT; Schema: owncloud; Owner: owncloud
--
ALTER TABLE ONLY user_group
ADD CONSTRAINT fk_user_group_user FOREIGN KEY (user_id) REFERENCES users(user_id);
--
-- PostgreSQL database dump complete
--
_______________________________________________
Owncloud mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/owncloud