Database change
This commit is contained in:
parent
6d254dfec3
commit
ff8a45b540
26 changed files with 6568 additions and 5149 deletions
|
|
@ -2,6 +2,18 @@ CREATE TABLE "action" (
|
|||
ac_id integer NOT NULL,
|
||||
ac_description text NOT NULL
|
||||
);
|
||||
CREATE TABLE action_gestion (
|
||||
ag_id serial NOT NULL,
|
||||
ag_type integer,
|
||||
f_id_dest integer NOT NULL,
|
||||
f_id_exp integer NOT NULL,
|
||||
ag_title character varying(70),
|
||||
ag_timestamp timestamp without time zone DEFAULT now(),
|
||||
ag_cal character(1) DEFAULT 'C'::bpchar,
|
||||
ag_ref_ag_id integer,
|
||||
ag_comment text,
|
||||
ag_ref text
|
||||
);
|
||||
CREATE TABLE attr_def (
|
||||
ad_id integer DEFAULT nextval('s_attr_def'::text) NOT NULL,
|
||||
ad_text text
|
||||
|
|
@ -19,10 +31,10 @@ CREATE TABLE centralized (
|
|||
c_j_id integer,
|
||||
c_date date NOT NULL,
|
||||
c_internal text NOT NULL,
|
||||
c_montant numeric(20,4) not null,
|
||||
c_montant numeric(20,4) NOT NULL,
|
||||
c_debit boolean DEFAULT true,
|
||||
c_jrn_def integer NOT NULL,
|
||||
c_poste integer,
|
||||
c_poste poste_comptable,
|
||||
c_description text,
|
||||
c_grp integer NOT NULL,
|
||||
c_comment text,
|
||||
|
|
@ -30,13 +42,38 @@ CREATE TABLE centralized (
|
|||
c_periode integer,
|
||||
c_order integer
|
||||
);
|
||||
CREATE TABLE document (
|
||||
d_id serial NOT NULL,
|
||||
ag_id integer NOT NULL,
|
||||
d_lob oid,
|
||||
d_number bigint NOT NULL,
|
||||
d_filename text,
|
||||
d_mimetype text,
|
||||
d_state integer
|
||||
);
|
||||
CREATE TABLE document_modele (
|
||||
md_id serial NOT NULL,
|
||||
md_name text NOT NULL,
|
||||
md_lob oid,
|
||||
md_type integer NOT NULL,
|
||||
md_filename text,
|
||||
md_mimetype text
|
||||
);
|
||||
CREATE TABLE document_state (
|
||||
s_id serial NOT NULL,
|
||||
s_value character varying(50) NOT NULL
|
||||
);
|
||||
CREATE TABLE document_type (
|
||||
dt_id serial NOT NULL,
|
||||
dt_value character varying(80)
|
||||
);
|
||||
CREATE TABLE fiche (
|
||||
f_id integer DEFAULT nextval('s_fiche'::text) NOT NULL,
|
||||
fd_id integer
|
||||
);
|
||||
CREATE TABLE fiche_def (
|
||||
fd_id integer DEFAULT nextval('s_fdef'::text) NOT NULL,
|
||||
fd_class_base integer,
|
||||
fd_class_base poste_comptable,
|
||||
fd_label text NOT NULL,
|
||||
fd_create_account boolean DEFAULT false,
|
||||
frd_id integer NOT NULL
|
||||
|
|
@ -53,10 +90,33 @@ CREATE TABLE form (
|
|||
fo_label text,
|
||||
fo_formula text
|
||||
);
|
||||
CREATE TABLE format_csv_banque (
|
||||
name text NOT NULL,
|
||||
include_file text NOT NULL
|
||||
);
|
||||
CREATE TABLE formdef (
|
||||
fr_id integer DEFAULT nextval('s_formdef'::text) NOT NULL,
|
||||
fr_label text
|
||||
);
|
||||
CREATE TABLE import_tmp (
|
||||
code text,
|
||||
date_exec date,
|
||||
date_valeur date,
|
||||
montant text,
|
||||
devise text,
|
||||
compte_ordre text,
|
||||
detail text,
|
||||
num_compte text,
|
||||
poste_comptable text,
|
||||
ok boolean DEFAULT false,
|
||||
bq_account integer NOT NULL,
|
||||
jrn integer NOT NULL
|
||||
);
|
||||
CREATE TABLE invoice (
|
||||
iv_id integer DEFAULT nextval('s_invoice'::text) NOT NULL,
|
||||
iv_name text NOT NULL,
|
||||
iv_file oid
|
||||
);
|
||||
CREATE TABLE jnt_fic_att_value (
|
||||
jft_id integer DEFAULT nextval('s_jnt_fic_att_value'::text) NOT NULL,
|
||||
f_id integer,
|
||||
|
|
@ -121,8 +181,8 @@ CREATE TABLE jrn_type (
|
|||
CREATE TABLE jrnx (
|
||||
j_id integer DEFAULT nextval('s_jrn_op'::text) NOT NULL,
|
||||
j_date date DEFAULT now(),
|
||||
j_montant numeric(8,4) DEFAULT 0,
|
||||
j_poste integer NOT NULL,
|
||||
j_montant numeric(20,4) DEFAULT 0,
|
||||
j_poste poste_comptable NOT NULL,
|
||||
j_grpt integer NOT NULL,
|
||||
j_rapt text,
|
||||
j_jrn_def integer NOT NULL,
|
||||
|
|
@ -132,16 +192,22 @@ CREATE TABLE jrnx (
|
|||
j_internal text,
|
||||
j_tech_user text NOT NULL,
|
||||
j_tech_date timestamp without time zone DEFAULT now() NOT NULL,
|
||||
j_tech_per integer NOT NULL
|
||||
j_tech_per integer NOT NULL,
|
||||
j_qcode text
|
||||
);
|
||||
CREATE TABLE parameter (
|
||||
pr_id text NOT NULL,
|
||||
pr_value text
|
||||
);
|
||||
CREATE TABLE parm_code (
|
||||
p_code text NOT NULL,
|
||||
p_value text,
|
||||
p_comment text
|
||||
);
|
||||
CREATE TABLE parm_money (
|
||||
pm_id integer DEFAULT nextval('s_currency'::text),
|
||||
pm_code character(3) NOT NULL,
|
||||
pm_rate numeric (20,4)
|
||||
pm_rate numeric(20,4) NOT NULL
|
||||
);
|
||||
CREATE TABLE parm_periode (
|
||||
p_id integer DEFAULT nextval('s_periode'::text) NOT NULL,
|
||||
|
|
@ -152,6 +218,16 @@ CREATE TABLE parm_periode (
|
|||
p_central boolean DEFAULT false,
|
||||
CONSTRAINT parm_periode_check CHECK ((p_end >= p_start))
|
||||
);
|
||||
CREATE TABLE quant_sold (
|
||||
qs_id integer DEFAULT nextval('s_quantity'::text) NOT NULL,
|
||||
qs_internal text NOT NULL,
|
||||
qs_fiche integer NOT NULL,
|
||||
qs_quantite integer NOT NULL,
|
||||
qs_price numeric(20,4),
|
||||
qs_vat numeric(20,4),
|
||||
qs_vat_code integer,
|
||||
qs_client integer NOT NULL
|
||||
);
|
||||
CREATE TABLE stock_goods (
|
||||
sg_id integer DEFAULT nextval('s_stock_goods'::text) NOT NULL,
|
||||
j_id integer,
|
||||
|
|
@ -165,15 +241,15 @@ CREATE TABLE stock_goods (
|
|||
CONSTRAINT stock_goods_sg_type CHECK (((sg_type = 'c'::bpchar) OR (sg_type = 'd'::bpchar)))
|
||||
);
|
||||
CREATE TABLE tmp_pcmn (
|
||||
pcm_val integer NOT NULL,
|
||||
pcm_val poste_comptable NOT NULL,
|
||||
pcm_lib text,
|
||||
pcm_val_parent integer DEFAULT 0,
|
||||
pcm_val_parent poste_comptable DEFAULT 0,
|
||||
pcm_country character(2) DEFAULT 'BE'::bpchar NOT NULL
|
||||
);
|
||||
CREATE TABLE tva_rate (
|
||||
tva_id integer NOT NULL,
|
||||
tva_label text NOT NULL,
|
||||
tva_rate numeric (8,4) DEFAULT 0.0 NOT NULL,
|
||||
tva_rate numeric(6,4) DEFAULT 0.0 NOT NULL,
|
||||
tva_comment text,
|
||||
tva_poste text
|
||||
);
|
||||
|
|
@ -182,10 +258,6 @@ CREATE TABLE user_local_pref (
|
|||
parameter_type text NOT NULL,
|
||||
parameter_value text
|
||||
);
|
||||
CREATE TABLE user_pref (
|
||||
pref_user text NOT NULL,
|
||||
pref_periode integer NOT NULL
|
||||
);
|
||||
CREATE TABLE user_sec_act (
|
||||
ua_id integer DEFAULT nextval('s_user_act'::text) NOT NULL,
|
||||
ua_login text,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue