From 0232a335d63e8f6889fe2880691e701c0f6e1087 Mon Sep 17 00:00:00 2001 From: sparkyx Date: Mon, 24 Jan 2005 20:36:11 +0000 Subject: [PATCH] *** empty log message *** --- sql/account_repository/comment.sql | 0 sql/account_repository/function.sql | 0 sql/account_repository/index.sql | 4 + sql/account_repository/schema.sql | 256 ---------------------------- sql/account_repository/view.sql | 0 sql/dossier1/comment.sql | 42 +++++ sql/dossier1/function.sql | 0 sql/dossier1/index.sql | 32 ++++ sql/dossier1/view.sql | 2 + sql/mod1/comment.sql | 42 +++++ 10 files changed, 122 insertions(+), 256 deletions(-) create mode 100644 sql/account_repository/comment.sql create mode 100644 sql/account_repository/function.sql create mode 100644 sql/account_repository/index.sql delete mode 100644 sql/account_repository/schema.sql create mode 100644 sql/account_repository/view.sql create mode 100644 sql/dossier1/comment.sql create mode 100644 sql/dossier1/function.sql create mode 100644 sql/dossier1/index.sql create mode 100644 sql/dossier1/view.sql create mode 100644 sql/mod1/comment.sql diff --git a/sql/account_repository/comment.sql b/sql/account_repository/comment.sql new file mode 100644 index 000000000..e69de29bb diff --git a/sql/account_repository/function.sql b/sql/account_repository/function.sql new file mode 100644 index 000000000..e69de29bb diff --git a/sql/account_repository/index.sql b/sql/account_repository/index.sql new file mode 100644 index 000000000..ad07c2483 --- /dev/null +++ b/sql/account_repository/index.sql @@ -0,0 +1,4 @@ +-- Name: fk_jnt_use_dos; Type: INDEX; Schema: public; Owner: phpcompta +CREATE INDEX fk_jnt_use_dos ON jnt_use_dos USING btree (use_id); +-- Name: fk_jnt_dos_id; Type: INDEX; Schema: public; Owner: phpcompta +CREATE INDEX fk_jnt_dos_id ON jnt_use_dos USING btree (dos_id); diff --git a/sql/account_repository/schema.sql b/sql/account_repository/schema.sql deleted file mode 100644 index 305e012f0..000000000 --- a/sql/account_repository/schema.sql +++ /dev/null @@ -1,256 +0,0 @@ --- --- PostgreSQL database dump --- - -\connect - phpcompta - -SET search_path = public, pg_catalog; - --- --- TOC entry 2 (OID 44864) --- Name: users_id; Type: SEQUENCE; Schema: public; Owner: phpcompta --- - -CREATE SEQUENCE users_id - START 1 - INCREMENT 1 - MAXVALUE 9223372036854775807 - MINVALUE 1 - CACHE 1; - - --- --- TOC entry 7 (OID 44866) --- Name: ac_users; Type: TABLE; Schema: public; Owner: phpcompta --- - -CREATE TABLE ac_users ( - use_id integer DEFAULT nextval('users_id'::text) NOT NULL, - use_first_name text, - use_name text, - use_login text NOT NULL, - use_active integer DEFAULT 0, - use_pass text, - use_admin integer DEFAULT 0, - use_theme text DEFAULT 'Light', - use_usertype text NOT NULL, - CHECK (((use_active = 0) OR (use_active = 1))) -); - - --- --- TOC entry 8 (OID 44876) --- Name: ac_dossier; Type: TABLE; Schema: public; Owner: phpcompta --- - -CREATE TABLE ac_dossier ( - dos_id integer DEFAULT nextval('dossier_id'::text) NOT NULL, - dos_name text NOT NULL, - dos_description text, - dos_jnt_user integer DEFAULT 0 -); - - --- --- TOC entry 3 (OID 44883) --- Name: seq_jnt_use_dos; Type: SEQUENCE; Schema: public; Owner: phpcompta --- - -CREATE SEQUENCE seq_jnt_use_dos - START 1 - INCREMENT 1 - MAXVALUE 9223372036854775807 - MINVALUE 1 - CACHE 1; - - --- --- TOC entry 9 (OID 44885) --- Name: jnt_use_dos; Type: TABLE; Schema: public; Owner: phpcompta --- - -CREATE TABLE jnt_use_dos ( - jnt_id integer DEFAULT nextval('seq_jnt_use_dos'::text) NOT NULL, - use_id integer NOT NULL, - dos_id integer NOT NULL -); - - --- --- TOC entry 10 (OID 44888) --- Name: version; Type: TABLE; Schema: public; Owner: phpcompta --- - -CREATE TABLE "version" ( - val integer -); - - --- --- TOC entry 4 (OID 44890) --- Name: seq_priv_user; Type: SEQUENCE; Schema: public; Owner: phpcompta --- - -CREATE SEQUENCE seq_priv_user - START 1 - INCREMENT 1 - MAXVALUE 9223372036854775807 - MINVALUE 1 - CACHE 1; - - --- --- TOC entry 11 (OID 44892) --- Name: priv_user; Type: TABLE; Schema: public; Owner: phpcompta --- - -CREATE TABLE priv_user ( - priv_id integer DEFAULT nextval('seq_priv_user'::text) NOT NULL, - priv_jnt integer NOT NULL, - priv_priv text -); - - --- --- TOC entry 12 (OID 44898) --- Name: theme; Type: TABLE; Schema: public; Owner: phpcompta --- - -CREATE TABLE theme ( - the_name text NOT NULL, - the_filestyle text, - the_filebutton text -); - - --- --- TOC entry 5 (OID 44903) --- Name: s_modid; Type: SEQUENCE; Schema: public; Owner: phpcompta --- - -CREATE SEQUENCE s_modid - START 1 - INCREMENT 1 - MAXVALUE 9223372036854775807 - MINVALUE 1 - CACHE 1; - - --- --- TOC entry 13 (OID 44905) --- Name: modeledef; Type: TABLE; Schema: public; Owner: phpcompta --- - -CREATE TABLE modeledef ( - mod_id integer DEFAULT nextval('s_modid'::text) NOT NULL, - mod_name text NOT NULL, - mod_desc text -); - - --- --- TOC entry 6 (OID 44911) --- Name: dossier_id; Type: SEQUENCE; Schema: public; Owner: phpcompta --- - -CREATE SEQUENCE dossier_id - START 3 - INCREMENT 1 - MAXVALUE 9223372036854775807 - MINVALUE 3 - CACHE 1; - - --- --- TOC entry 14 (OID 679377) --- Name: log; Type: TABLE; Schema: public; Owner: phpcompta --- - -CREATE TABLE log ( - lg_timestamp timestamp without time zone DEFAULT now(), - lg_file text, - lg_type text DEFAULT 'debug', - lg_line text, - lg_msg text -); - - --- --- TOC entry 20 (OID 44942) --- Name: fk_jnt_use_dos; Type: INDEX; Schema: public; Owner: phpcompta --- - -CREATE INDEX fk_jnt_use_dos ON jnt_use_dos USING btree (use_id); - - --- --- TOC entry 19 (OID 44943) --- Name: fk_jnt_dos_id; Type: INDEX; Schema: public; Owner: phpcompta --- - -CREATE INDEX fk_jnt_dos_id ON jnt_use_dos USING btree (dos_id); - - --- --- TOC entry 15 (OID 44944) --- Name: ac_users_pkey; Type: CONSTRAINT; Schema: public; Owner: phpcompta --- - -ALTER TABLE ONLY ac_users - ADD CONSTRAINT ac_users_pkey PRIMARY KEY (use_id); - - --- --- TOC entry 16 (OID 44946) --- Name: ac_users_use_login_key; Type: CONSTRAINT; Schema: public; Owner: phpcompta --- - -ALTER TABLE ONLY ac_users - ADD CONSTRAINT ac_users_use_login_key UNIQUE (use_login); - - --- --- TOC entry 18 (OID 44948) --- Name: ac_dossier_pkey; Type: CONSTRAINT; Schema: public; Owner: phpcompta --- - -ALTER TABLE ONLY ac_dossier - ADD CONSTRAINT ac_dossier_pkey PRIMARY KEY (dos_id); - - --- --- TOC entry 17 (OID 44950) --- Name: ac_dossier_dos_name_key; Type: CONSTRAINT; Schema: public; Owner: phpcompta --- - -ALTER TABLE ONLY ac_dossier - ADD CONSTRAINT ac_dossier_dos_name_key UNIQUE (dos_name); - - --- --- TOC entry 21 (OID 44952) --- Name: jnt_use_dos_pkey; Type: CONSTRAINT; Schema: public; Owner: phpcompta --- - -ALTER TABLE ONLY jnt_use_dos - ADD CONSTRAINT jnt_use_dos_pkey PRIMARY KEY (use_id, dos_id); - - --- --- TOC entry 23 (OID 44954) --- Name: $1; Type: CONSTRAINT; Schema: public; Owner: phpcompta --- - -ALTER TABLE ONLY jnt_use_dos - ADD CONSTRAINT "$1" FOREIGN KEY (use_id) REFERENCES ac_users(use_id) ON UPDATE NO ACTION ON DELETE NO ACTION; - - --- --- TOC entry 22 (OID 44958) --- Name: modeledef_pkey; Type: CONSTRAINT; Schema: public; Owner: phpcompta --- - -ALTER TABLE ONLY modeledef - ADD CONSTRAINT modeledef_pkey PRIMARY KEY (mod_id); - - diff --git a/sql/account_repository/view.sql b/sql/account_repository/view.sql new file mode 100644 index 000000000..e69de29bb diff --git a/sql/dossier1/comment.sql b/sql/dossier1/comment.sql new file mode 100644 index 000000000..dbae823d5 --- /dev/null +++ b/sql/dossier1/comment.sql @@ -0,0 +1,42 @@ +-- Name: TABLE tmp_pcmn; Type: COMMENT; Schema: public; Owner: phpcompta +COMMENT ON TABLE tmp_pcmn IS 'Plan comptable minimum normalisé'; +-- Name: TABLE parm_money; Type: COMMENT; Schema: public; Owner: phpcompta +COMMENT ON TABLE parm_money IS 'Currency conversion'; +-- Name: TABLE parm_periode; Type: COMMENT; Schema: public; Owner: phpcompta +COMMENT ON TABLE parm_periode IS 'Periode definition'; +-- Name: TABLE jrn_type; Type: COMMENT; Schema: public; Owner: phpcompta +COMMENT ON TABLE jrn_type IS 'Type of journal (Sell, Buy, Financial...)'; +-- Name: TABLE jrn_def; Type: COMMENT; Schema: public; Owner: phpcompta +COMMENT ON TABLE jrn_def IS 'Definition of a journal, his properties'; +-- Name: TABLE jrnx; Type: COMMENT; Schema: public; Owner: phpcompta +COMMENT ON TABLE jrnx IS 'Journal: content one line for each accountancy writing'; +-- Name: TABLE form; Type: COMMENT; Schema: public; Owner: phpcompta +COMMENT ON TABLE form IS 'Forms content'; +-- Name: TABLE centralized; Type: COMMENT; Schema: public; Owner: phpcompta +COMMENT ON TABLE centralized IS 'The centralized journal'; +-- Name: TABLE "action"; Type: COMMENT; Schema: public; Owner: phpcompta +COMMENT ON TABLE "action" IS 'The different privileges'; +-- Name: TABLE jrn_action; Type: COMMENT; Schema: public; Owner: phpcompta +COMMENT ON TABLE jrn_action IS 'Possible action when we are in journal (menu)'; +-- Name: TABLE tva_rate; Type: COMMENT; Schema: public; Owner: phpcompta +COMMENT ON TABLE tva_rate IS 'Rate of vat'; +-- Name: TABLE fiche_def_ref; Type: COMMENT; Schema: public; Owner: phpcompta +COMMENT ON TABLE fiche_def_ref IS 'Family Cards definition'; +-- Name: TABLE fiche_def; Type: COMMENT; Schema: public; Owner: phpcompta +COMMENT ON TABLE fiche_def IS 'Cards definition'; +-- Name: TABLE attr_def; Type: COMMENT; Schema: public; Owner: phpcompta +COMMENT ON TABLE attr_def IS 'The available attributs for the cards'; +-- Name: TABLE fiche; Type: COMMENT; Schema: public; Owner: phpcompta +COMMENT ON TABLE fiche IS 'Cards'; +-- Name: TABLE jnt_fic_att_value; Type: COMMENT; Schema: public; Owner: phpcompta +COMMENT ON TABLE jnt_fic_att_value IS 'join between the card and the attribut definition'; +-- Name: TABLE jnt_fic_attr; Type: COMMENT; Schema: public; Owner: phpcompta +COMMENT ON TABLE jnt_fic_attr IS 'join between the family card and the attribut definition'; +-- Name: TABLE jrn_rapt; Type: COMMENT; Schema: public; Owner: phpcompta +COMMENT ON TABLE jrn_rapt IS 'Rapprochement between operation'; +-- Name: TABLE jrn; Type: COMMENT; Schema: public; Owner: phpcompta +COMMENT ON TABLE jrn IS 'Journal: content one line for a group of accountancy writing'; +-- Name: TABLE stock_goods; Type: COMMENT; Schema: public; Owner: phpcompta +COMMENT ON TABLE stock_goods IS 'About the goods'; +-- Name: TABLE attr_min; Type: COMMENT; Schema: public; Owner: phpcompta +COMMENT ON TABLE attr_min IS 'The value of attributs for the cards'; diff --git a/sql/dossier1/function.sql b/sql/dossier1/function.sql new file mode 100644 index 000000000..e69de29bb diff --git a/sql/dossier1/index.sql b/sql/dossier1/index.sql new file mode 100644 index 000000000..f62255b4b --- /dev/null +++ b/sql/dossier1/index.sql @@ -0,0 +1,32 @@ +-- Name: x_act; Type: INDEX; Schema: public; Owner: phpcompta +CREATE UNIQUE INDEX x_act ON "action" USING btree (ac_description); +-- Name: x_usr_jrn; Type: INDEX; Schema: public; Owner: phpcompta +CREATE UNIQUE INDEX x_usr_jrn ON user_sec_jrn USING btree (uj_login, uj_jrn_id); +-- Name: fk_centralized_c_jrn_def; Type: INDEX; Schema: public; Owner: phpcompta +CREATE INDEX fk_centralized_c_jrn_def ON centralized USING btree (c_jrn_def); +-- Name: fk_centralized_c_poste; Type: INDEX; Schema: public; Owner: phpcompta +CREATE INDEX fk_centralized_c_poste ON centralized USING btree (c_poste); +-- Name: fk_fiche_def_frd_id; Type: INDEX; Schema: public; Owner: phpcompta +CREATE INDEX fk_fiche_def_frd_id ON fiche_def USING btree (frd_id); +-- Name: fk_attr_value_jft_id; Type: INDEX; Schema: public; Owner: phpcompta +CREATE INDEX fk_attr_value_jft_id ON attr_value USING btree (jft_id); +-- Name: fk_fiche_fd_id; Type: INDEX; Schema: public; Owner: phpcompta +CREATE INDEX fk_fiche_fd_id ON fiche USING btree (fd_id); +-- Name: fk_form_fo_fr_id; Type: INDEX; Schema: public; Owner: phpcompta +CREATE INDEX fk_form_fo_fr_id ON form USING btree (fo_fr_id); +-- Name: fk_jrnx_j_poste; Type: INDEX; Schema: public; Owner: phpcompta +CREATE INDEX fk_jrnx_j_poste ON jrnx USING btree (j_poste); +-- Name: fk_jrn_def; Type: INDEX; Schema: public; Owner: phpcompta +CREATE INDEX fk_jrn_def ON jrnx USING btree (j_jrn_def); +-- Name: fk_jrn_action_ja_jrn_type; Type: INDEX; Schema: public; Owner: phpcompta +CREATE INDEX fk_jrn_action_ja_jrn_type ON jrn_action USING btree (ja_jrn_type); +-- Name: fk_user_sec_jrn; Type: INDEX; Schema: public; Owner: phpcompta +CREATE INDEX fk_user_sec_jrn ON user_sec_jrn USING btree (uj_jrn_id); +-- Name: fk_user_sec_act; Type: INDEX; Schema: public; Owner: phpcompta +CREATE INDEX fk_user_sec_act ON user_sec_act USING btree (ua_act_id); +-- Name: x_jrn_jr_id; Type: INDEX; Schema: public; Owner: phpcompta +CREATE UNIQUE INDEX x_jrn_jr_id ON jrn USING btree (jr_id); +-- Name: fk_stock_goods_j_id; Type: INDEX; Schema: public; Owner: phpcompta +CREATE INDEX fk_stock_goods_j_id ON stock_goods USING btree (j_id); +-- Name: fk_stock_goods_f_id; Type: INDEX; Schema: public; Owner: phpcompta +CREATE INDEX fk_stock_goods_f_id ON stock_goods USING btree (f_id); diff --git a/sql/dossier1/view.sql b/sql/dossier1/view.sql new file mode 100644 index 000000000..832df3434 --- /dev/null +++ b/sql/dossier1/view.sql @@ -0,0 +1,2 @@ +CREATE VIEW vw_fiche_attr AS + SELECT a.f_id, fd_id, a.av_text AS vw_name, b.av_text AS vw_sell, c.av_text AS vw_buy, d.av_text AS tva_code, tva_id, tva_rate, tva_label, e.av_text AS vw_addr, f.av_text AS vw_cp, frd_id FROM ((((((((SELECT f_id, fd_id, av_text FROM (((fiche JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) JOIN attr_def USING (ad_id)) WHERE (ad_id = 1)) a LEFT JOIN (SELECT f_id, av_text FROM (((fiche JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) JOIN attr_def USING (ad_id)) WHERE (ad_id = 6)) b ON ((a.f_id = b.f_id))) LEFT JOIN (SELECT f_id, av_text FROM (((fiche JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) JOIN attr_def USING (ad_id)) WHERE (ad_id = 7)) c ON ((a.f_id = c.f_id))) LEFT JOIN (SELECT f_id, av_text FROM (((fiche JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) JOIN attr_def USING (ad_id)) WHERE (ad_id = 2)) d ON ((a.f_id = d.f_id))) LEFT JOIN (SELECT f_id, av_text FROM (((fiche JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) JOIN attr_def USING (ad_id)) WHERE (ad_id = 14)) e ON ((a.f_id = e.f_id))) LEFT JOIN (SELECT f_id, av_text FROM (((fiche JOIN jnt_fic_att_value USING (f_id)) JOIN attr_value USING (jft_id)) JOIN attr_def USING (ad_id)) WHERE (ad_id = 15)) f ON ((a.f_id = f.f_id))) LEFT JOIN tva_rate ON ((d.av_text = (tva_rate.tva_id)::text))) JOIN fiche_def USING (fd_id)); diff --git a/sql/mod1/comment.sql b/sql/mod1/comment.sql new file mode 100644 index 000000000..61dfe295b --- /dev/null +++ b/sql/mod1/comment.sql @@ -0,0 +1,42 @@ +-- Name: TABLE tmp_pcmn; Type: COMMENT; Schema: public; Owner: phpcompta +COMMENT ON TABLE tmp_pcmn IS 'Plan comptable minimum normalisé'; +-- Name: TABLE parm_money; Type: COMMENT; Schema: public; Owner: phpcompta +COMMENT ON TABLE parm_money IS 'Currency conversion'; +-- Name: TABLE parm_periode; Type: COMMENT; Schema: public; Owner: phpcompta +COMMENT ON TABLE parm_periode IS 'Periode definition'; +-- Name: TABLE jrn_type; Type: COMMENT; Schema: public; Owner: phpcompta +COMMENT ON TABLE jrn_type IS 'Type of journal (Sell, Buy, Financial...)'; +-- Name: TABLE jrn_def; Type: COMMENT; Schema: public; Owner: phpcompta +COMMENT ON TABLE jrn_def IS 'Definition of a journal, his properties'; +-- Name: TABLE jrnx; Type: COMMENT; Schema: public; Owner: phpcompta +COMMENT ON TABLE jrnx IS 'Journal: content one line for each accountancy writing'; +-- Name: TABLE form; Type: COMMENT; Schema: public; Owner: phpcompta +COMMENT ON TABLE form IS 'Forms content'; +-- Name: TABLE centralized; Type: COMMENT; Schema: public; Owner: phpcompta +COMMENT ON TABLE centralized IS 'The centralized journal'; +-- Name: TABLE "action"; Type: COMMENT; Schema: public; Owner: phpcompta +COMMENT ON TABLE "action" IS 'The different privileges'; +-- Name: TABLE jrn_action; Type: COMMENT; Schema: public; Owner: phpcompta +COMMENT ON TABLE jrn_action IS 'Possible action when we are in journal (menu)'; +-- Name: TABLE tva_rate; Type: COMMENT; Schema: public; Owner: phpcompta +COMMENT ON TABLE tva_rate IS 'Rate of vat'; +-- Name: TABLE fiche_def_ref; Type: COMMENT; Schema: public; Owner: phpcompta +COMMENT ON TABLE fiche_def_ref IS 'Family Cards definition'; +-- Name: TABLE fiche_def; Type: COMMENT; Schema: public; Owner: phpcompta +COMMENT ON TABLE fiche_def IS 'Cards definition'; +-- Name: TABLE attr_def; Type: COMMENT; Schema: public; Owner: phpcompta +COMMENT ON TABLE attr_def IS 'The available attributs for the cards'; +-- Name: TABLE attr_min; Type: COMMENT; Schema: public; Owner: phpcompta +COMMENT ON TABLE attr_min IS 'The value of attributs for the cards'; +-- Name: TABLE fiche; Type: COMMENT; Schema: public; Owner: phpcompta +COMMENT ON TABLE fiche IS 'Cards'; +-- Name: TABLE jnt_fic_att_value; Type: COMMENT; Schema: public; Owner: phpcompta +COMMENT ON TABLE jnt_fic_att_value IS 'join between the card and the attribut definition'; +-- Name: TABLE jnt_fic_attr; Type: COMMENT; Schema: public; Owner: phpcompta +COMMENT ON TABLE jnt_fic_attr IS 'join between the family card and the attribut definition'; +-- Name: TABLE jrn_rapt; Type: COMMENT; Schema: public; Owner: phpcompta +COMMENT ON TABLE jrn_rapt IS 'Rapprochement between operation'; +-- Name: TABLE jrn; Type: COMMENT; Schema: public; Owner: phpcompta +COMMENT ON TABLE jrn IS 'Journal: content one line for a group of accountancy writing'; +-- Name: TABLE stock_goods; Type: COMMENT; Schema: public; Owner: phpcompta +COMMENT ON TABLE stock_goods IS 'About the goods';