Fix: Le nom des index gnrs pour pgsql inclus la table car sous pgsql on un nom d'index doit etre unique pour toute la base (sous mysql, unique par table)
Fix: Corrige problme de quot sur UNIQUE
This commit is contained in:
parent
41e2311770
commit
261d9c63fc
@ -55,8 +55,9 @@ create table llx_adherent
|
||||
"fk_user_mod" integer NOT NULL,
|
||||
"fk_user_valid" integer NOT NULL,
|
||||
"datefin" timestamp, -- date de fin de validité de la cotisation
|
||||
"note" text
|
||||
"note" text,
|
||||
|
||||
UNIQUE(login)
|
||||
);
|
||||
|
||||
CREATE INDEX idx_login ON llx_adherent (login);
|
||||
CREATE INDEX idx_llx_adherent_login ON llx_adherent (login);
|
||||
|
||||
@ -30,7 +30,8 @@ create table llx_adherent_options
|
||||
(
|
||||
optid SERIAL PRIMARY KEY,
|
||||
"tms" timestamp,
|
||||
"adhid" integer NOT NULL -- id de l'adherent auquel correspond ces attributs optionnel
|
||||
"adhid" integer NOT NULL, -- id de l'adherent auquel correspond ces attributs optionnel
|
||||
UNIQUE(adhid)
|
||||
);
|
||||
|
||||
CREATE INDEX idx_adhid ON llx_adherent_options (adhid);
|
||||
CREATE INDEX idx_llx_adherent_options_adhid ON llx_adherent_options (adhid);
|
||||
|
||||
@ -28,6 +28,7 @@
|
||||
create table llx_album_to_groupart
|
||||
(
|
||||
"fk_album" integer NOT NULL,
|
||||
"fk_groupart" integer NOT NULL
|
||||
"fk_groupart" integer NOT NULL,
|
||||
UNIQUE(fk_album, fk_groupart)
|
||||
);
|
||||
|
||||
|
||||
@ -29,4 +29,4 @@ create table llx_bank_class
|
||||
"fk_categ" integer NOT NULL
|
||||
);
|
||||
|
||||
CREATE INDEX idx_lineid ON llx_bank_class (lineid);
|
||||
CREATE INDEX idx_llx_bank_class_lineid ON llx_bank_class (lineid);
|
||||
|
||||
@ -29,7 +29,8 @@ create table llx_bookmark4u_login
|
||||
(
|
||||
rowid SERIAL PRIMARY KEY,
|
||||
"fk_user" integer,
|
||||
"bk4u_uid" integer
|
||||
"bk4u_uid" integer,
|
||||
UNIQUE(fk_user)
|
||||
);
|
||||
|
||||
CREATE INDEX idx_fk_user ON llx_bookmark4u_login (fk_user);
|
||||
CREATE INDEX idx_llx_bookmark4u_login_fk_user ON llx_bookmark4u_login (fk_user);
|
||||
|
||||
@ -31,8 +31,9 @@ create table llx_c_ape
|
||||
rowid SERIAL PRIMARY KEY,
|
||||
"code_ape" varchar(5) NOT NULL,
|
||||
"libelle" varchar(255),
|
||||
"active" smallint DEFAULT 1 NOT NULL
|
||||
"active" smallint DEFAULT 1 NOT NULL,
|
||||
UNIQUE(code_ape)
|
||||
);
|
||||
|
||||
CREATE INDEX idx_code_ape ON llx_c_ape (code_ape);
|
||||
CREATE INDEX idx_llx_c_ape_code_ape ON llx_c_ape (code_ape);
|
||||
|
||||
|
||||
@ -38,7 +38,7 @@ create table llx_c_departements
|
||||
"active" smallint DEFAULT 1 NOT NULL
|
||||
);
|
||||
|
||||
CREATE INDEX idx_fk_region ON llx_c_departements (fk_region);
|
||||
CREATE INDEX idx_llx_c_departements_fk_region ON llx_c_departements (fk_region);
|
||||
|
||||
|
||||
|
||||
|
||||
@ -31,5 +31,5 @@ create table llx_co_fa
|
||||
"fk_facture" integer NOT NULL
|
||||
);
|
||||
|
||||
CREATE INDEX idx_fk_commande ON llx_co_fa (fk_commande);
|
||||
CREATE INDEX idx_fk_facture ON llx_co_fa (fk_facture);
|
||||
CREATE INDEX idx_llx_co_fa_fk_commande ON llx_co_fa (fk_commande);
|
||||
CREATE INDEX idx_llx_co_fa_fk_facture ON llx_co_fa (fk_facture);
|
||||
|
||||
@ -49,7 +49,8 @@ create table llx_commande
|
||||
"total_ttc" real default 0,
|
||||
"note" text,
|
||||
"model_pdf" varchar(50),
|
||||
"facture" smallint default 0
|
||||
"facture" smallint default 0,
|
||||
UNIQUE(ref)
|
||||
);
|
||||
|
||||
CREATE INDEX idx_ref ON llx_commande (ref);
|
||||
CREATE INDEX idx_llx_commande_ref ON llx_commande (ref);
|
||||
|
||||
@ -50,7 +50,8 @@ create table llx_commande_fournisseur
|
||||
"total_ht" real default 0,
|
||||
"total_ttc" real default 0,
|
||||
"note" text,
|
||||
"model_pdf" varchar(50)
|
||||
"model_pdf" varchar(50),
|
||||
UNIQUE(ref)
|
||||
);
|
||||
|
||||
CREATE INDEX idx_ref ON llx_commande_fournisseur (ref);
|
||||
CREATE INDEX idx_llx_commande_fournisseur_ref ON llx_commande_fournisseur (ref);
|
||||
|
||||
@ -33,5 +33,7 @@ create table llx_compta_compte_generaux
|
||||
"intitule" varchar(255),
|
||||
"fk_user_author" integer,
|
||||
"note" text,
|
||||
"UNIQUE"(numero)
|
||||
UNIQUE(numero)
|
||||
);
|
||||
|
||||
CREATE INDEX idx_llx_compta_compte_generaux_numero ON llx_compta_compte_generaux (numero);
|
||||
|
||||
@ -36,7 +36,8 @@ create table llx_const
|
||||
"value" text, -- max 65535 caracteres
|
||||
"type" varchar(6) CHECK (type IN ('yesno','texte','chaine')) ,
|
||||
"visible" smallint DEFAULT 1 NOT NULL,
|
||||
"note" text
|
||||
"note" text,
|
||||
UNIQUE(name)
|
||||
);
|
||||
|
||||
CREATE INDEX idx_name ON llx_const (name);
|
||||
CREATE INDEX idx_llx_const_name ON llx_const (name);
|
||||
|
||||
@ -32,5 +32,7 @@ create table llx_contact_facture
|
||||
idp SERIAL PRIMARY KEY,
|
||||
"fk_soc" integer NOT NULL,
|
||||
"fk_contact" integer NOT NULL, -- point sur llx_socpeople
|
||||
"UNIQUE" (fk_soc, fk_contact)
|
||||
UNIQUE(fk_soc, fk_contact)
|
||||
);
|
||||
|
||||
CREATE INDEX idx_llx_contact_facture_fk_soc__fk_contact ON llx_contact_facture ();
|
||||
|
||||
@ -40,9 +40,10 @@ create table llx_expedition
|
||||
"fk_expedition_methode" integer,
|
||||
"fk_statut" smallint DEFAULT 0,
|
||||
"note" text,
|
||||
"model_pdf" varchar(50)
|
||||
"model_pdf" varchar(50),
|
||||
UNIQUE(ref)
|
||||
);
|
||||
|
||||
CREATE INDEX idx_ref ON llx_expedition (ref);
|
||||
CREATE INDEX idx_fk_expedition_methode ON llx_expedition (fk_expedition_methode);
|
||||
CREATE INDEX idx_fk_commande ON llx_expedition (fk_commande);
|
||||
CREATE INDEX idx_llx_expedition_ref ON llx_expedition (ref);
|
||||
CREATE INDEX idx_llx_expedition_fk_expedition_methode ON llx_expedition (fk_expedition_methode);
|
||||
CREATE INDEX idx_llx_expedition_fk_commande ON llx_expedition (fk_commande);
|
||||
|
||||
@ -32,5 +32,5 @@ create table llx_expeditiondet
|
||||
"qty" real -- quantité
|
||||
);
|
||||
|
||||
CREATE INDEX idx_fk_expedition ON llx_expeditiondet (fk_expedition);
|
||||
CREATE INDEX idx_fk_commande_ligne ON llx_expeditiondet (fk_commande_ligne);
|
||||
CREATE INDEX idx_llx_expeditiondet_fk_expedition ON llx_expeditiondet (fk_expedition);
|
||||
CREATE INDEX idx_llx_expeditiondet_fk_commande_ligne ON llx_expeditiondet (fk_commande_ligne);
|
||||
|
||||
@ -48,8 +48,9 @@ create table llx_facture
|
||||
"fk_cond_reglement" integer, -- condition de reglement (30 jours, fin de mois ...)
|
||||
"fk_mode_reglement" integer, -- mode de reglement (Virement, Prélèvement)
|
||||
"date_lim_reglement" date, -- date limite de reglement
|
||||
"note" text
|
||||
"note" text,
|
||||
UNIQUE(facnumber)
|
||||
);
|
||||
|
||||
CREATE INDEX idx_facnumber ON llx_facture (facnumber);
|
||||
CREATE INDEX idx_llx_facture_facnumber ON llx_facture (facnumber);
|
||||
CREATE INDEX fksoc ON llx_facture (fk_soc);
|
||||
|
||||
@ -47,5 +47,6 @@ create table llx_facture_fourn
|
||||
"fk_statut" smallint DEFAULT 0 NOT NULL,
|
||||
"fk_user_author" integer, -- createur de la facture
|
||||
"fk_user_valid" integer, -- valideur de la facture
|
||||
"note" text
|
||||
"note" text,
|
||||
UNIQUE(facnumber, fk_soc)
|
||||
);
|
||||
|
||||
@ -45,4 +45,4 @@ create table llx_facture_rec
|
||||
"note" text
|
||||
);
|
||||
|
||||
CREATE INDEX fksoc ON llx_facture_rec (fk_soc);
|
||||
CREATE INDEX idx_facture_rec_fksoc ON llx_facture_rec (fk_soc);
|
||||
|
||||
@ -38,7 +38,8 @@ create table llx_fichinter
|
||||
"fk_user_valid" integer, -- valideur de la fiche
|
||||
"fk_statut" smallint DEFAULT 0,
|
||||
"duree" real,
|
||||
"note" text
|
||||
"note" text,
|
||||
UNIQUE(ref)
|
||||
);
|
||||
|
||||
CREATE INDEX idx_ref ON llx_fichinter (ref);
|
||||
CREATE INDEX idx_llx_fichinter_ref ON llx_fichinter (ref);
|
||||
|
||||
@ -39,8 +39,9 @@ create table llx_livre
|
||||
"prix" decimal(15,4),
|
||||
"fk_editeur" integer,
|
||||
"fk_user_author" integer,
|
||||
"frais_de_port" smallint DEFAULT 1
|
||||
"frais_de_port" smallint DEFAULT 1,
|
||||
UNIQUE(ref)
|
||||
);
|
||||
|
||||
CREATE INDEX idx_ref ON llx_livre (ref);
|
||||
CREATE INDEX idx_llx_livre_ref ON llx_livre (ref);
|
||||
|
||||
|
||||
@ -28,5 +28,6 @@
|
||||
create table llx_livre_to_auteur
|
||||
(
|
||||
"fk_livre" integer NOT NULL,
|
||||
"fk_auteur" integer NOT NULL
|
||||
"fk_auteur" integer NOT NULL,
|
||||
UNIQUE(fk_livre, fk_auteur)
|
||||
);
|
||||
|
||||
@ -33,5 +33,5 @@ create table llx_paiement_facture
|
||||
|
||||
);
|
||||
|
||||
CREATE INDEX idx_fk_paiement ON llx_paiement_facture (fk_paiement);
|
||||
CREATE INDEX idx_fk_facture ON llx_paiement_facture (fk_facture);
|
||||
CREATE INDEX idx_llx_paiement_facture_fk_paiement ON llx_paiement_facture (fk_paiement);
|
||||
CREATE INDEX idx_llx_paiement_facture_fk_facture ON llx_paiement_facture (fk_facture);
|
||||
|
||||
@ -41,5 +41,7 @@ create table llx_prelevement
|
||||
"date_credit" timestamp,
|
||||
"fk_user_credit" integer,
|
||||
|
||||
"UNIQUE"(ref)
|
||||
UNIQUE(ref)
|
||||
);
|
||||
|
||||
CREATE INDEX idx_llx_prelevement_ref ON llx_prelevement (ref);
|
||||
|
||||
@ -43,5 +43,7 @@ create table llx_prelevement_bons
|
||||
"date_credit" timestamp, -- date de crédit sur le compte
|
||||
"fk_user_credit" integer, -- user qui a remonté l'info de crédit
|
||||
|
||||
"UNIQUE"(ref)
|
||||
UNIQUE(ref)
|
||||
);
|
||||
|
||||
CREATE INDEX idx_llx_prelevement_bons_ref ON llx_prelevement_bons (ref);
|
||||
|
||||
@ -36,6 +36,6 @@ create table llx_product_fournisseur
|
||||
"fk_user_author" integer
|
||||
);
|
||||
|
||||
CREATE INDEX idx_fk_product ON llx_product_fournisseur (fk_product);
|
||||
CREATE INDEX idx_fk_soc ON llx_product_fournisseur (fk_soc);
|
||||
CREATE INDEX idx_llx_product_fournisseur_fk_product ON llx_product_fournisseur (fk_product);
|
||||
CREATE INDEX idx_llx_product_fournisseur_fk_soc ON llx_product_fournisseur (fk_soc);
|
||||
|
||||
|
||||
@ -34,6 +34,6 @@ create table llx_product_stock
|
||||
"reel" integer -- stock réel
|
||||
);
|
||||
|
||||
CREATE INDEX idx_fk_product ON llx_product_stock (fk_product);
|
||||
CREATE INDEX idx_fk_entrepot ON llx_product_stock (fk_entrepot);
|
||||
CREATE INDEX idx_llx_product_stock_fk_product ON llx_product_stock (fk_product);
|
||||
CREATE INDEX idx_llx_product_stock_fk_entrepot ON llx_product_stock (fk_entrepot);
|
||||
|
||||
|
||||
@ -37,7 +37,8 @@ create table llx_projet
|
||||
"title" varchar(255),
|
||||
"fk_user_resp" integer, -- responsable du projet
|
||||
"fk_user_creat" integer, -- createur du projet
|
||||
"note" text
|
||||
"note" text,
|
||||
UNIQUE(ref)
|
||||
);
|
||||
|
||||
CREATE INDEX idx_ref ON llx_projet (ref);
|
||||
CREATE INDEX idx_llx_projet_ref ON llx_projet (ref);
|
||||
|
||||
@ -46,7 +46,8 @@ create table llx_propal
|
||||
"tva" real DEFAULT 0,
|
||||
"total" real DEFAULT 0,
|
||||
"note" text,
|
||||
"model_pdf" varchar(50)
|
||||
"model_pdf" varchar(50),
|
||||
UNIQUE(ref)
|
||||
);
|
||||
|
||||
CREATE INDEX idx_ref ON llx_propal (ref);
|
||||
CREATE INDEX idx_llx_propal_ref ON llx_propal (ref);
|
||||
|
||||
@ -32,5 +32,7 @@ create table llx_so_gr
|
||||
rowid SERIAL PRIMARY KEY,
|
||||
"fk_soc" integer,
|
||||
"fk_groupe" integer,
|
||||
"UNIQUE"(fk_soc, fk_groupe)
|
||||
UNIQUE(fk_soc, fk_groupe)
|
||||
);
|
||||
|
||||
CREATE INDEX idx_llx_so_gr_fk_soc__fk_groupe ON llx_so_gr ();
|
||||
|
||||
@ -64,8 +64,9 @@ create table llx_societe
|
||||
"rubrique" varchar(255), -- champ rubrique libre
|
||||
"fk_user_creat" integer, -- utilisateur qui a créé l'info
|
||||
"fk_user_modif" integer, -- utilisateur qui a modifié l'info
|
||||
"remise_client" real DEFAULT 0 -- remise systématique pour le client
|
||||
"remise_client" real DEFAULT 0, -- remise systématique pour le client
|
||||
UNIQUE(prefix_comm)
|
||||
);
|
||||
|
||||
CREATE INDEX idx_prefix_comm ON llx_societe (prefix_comm);
|
||||
CREATE INDEX idx_llx_societe_prefix_comm ON llx_societe (prefix_comm);
|
||||
|
||||
|
||||
@ -29,6 +29,7 @@ create table llx_societe_commerciaux
|
||||
(
|
||||
rowid SERIAL PRIMARY KEY,
|
||||
"fk_soc" integer,
|
||||
"fk_user" integer
|
||||
"fk_user" integer,
|
||||
UNIQUE(fk_soc, fk_user)
|
||||
);
|
||||
|
||||
|
||||
@ -37,6 +37,6 @@ create table llx_stock_mouvement
|
||||
"fk_user_author" integer
|
||||
);
|
||||
|
||||
CREATE INDEX idx_fk_product ON llx_stock_mouvement (fk_product);
|
||||
CREATE INDEX idx_fk_entrepot ON llx_stock_mouvement (fk_entrepot);
|
||||
CREATE INDEX idx_llx_stock_mouvement_fk_product ON llx_stock_mouvement (fk_product);
|
||||
CREATE INDEX idx_llx_stock_mouvement_fk_entrepot ON llx_stock_mouvement (fk_entrepot);
|
||||
|
||||
|
||||
@ -42,7 +42,8 @@ create table llx_user
|
||||
"module_compta" smallint DEFAULT 1,
|
||||
"fk_societe" integer DEFAULT 0,
|
||||
"fk_socpeople" integer DEFAULT 0,
|
||||
"note" text
|
||||
"note" text,
|
||||
UNIQUE(login)
|
||||
);
|
||||
|
||||
CREATE INDEX idx_login ON llx_user (login);
|
||||
CREATE INDEX idx_llx_user_login ON llx_user (login);
|
||||
|
||||
@ -32,5 +32,7 @@ create table llx_user_param
|
||||
"page" varchar(255),
|
||||
"param" varchar(64),
|
||||
"value" varchar(255),
|
||||
"UNIQUE" (fk_user,page,param)
|
||||
UNIQUE(fk_user,page,param)
|
||||
);
|
||||
|
||||
CREATE INDEX idx_llx_user_param_fk_user_page_param ON llx_user_param ();
|
||||
|
||||
@ -29,6 +29,7 @@ create table llx_user_rights
|
||||
(
|
||||
rowid SERIAL PRIMARY KEY,
|
||||
"fk_user" integer NOT NULL,
|
||||
"fk_id" integer NOT NULL
|
||||
"fk_id" integer NOT NULL,
|
||||
UNIQUE(fk_user,fk_id)
|
||||
);
|
||||
|
||||
|
||||
@ -30,6 +30,8 @@ create table llx_usergroup_rights
|
||||
rowid SERIAL PRIMARY KEY,
|
||||
"fk_usergroup" integer NOT NULL,
|
||||
"fk_id" integer NOT NULL,
|
||||
"UNIQUE"(fk_usergroup,fk_id)
|
||||
UNIQUE(fk_usergroup,fk_id)
|
||||
);
|
||||
|
||||
CREATE INDEX idx_llx_usergroup_rights_fk_usergroup_fk_id ON llx_usergroup_rights ();
|
||||
|
||||
|
||||
@ -30,5 +30,7 @@ create table llx_usergroup_user
|
||||
rowid SERIAL PRIMARY KEY,
|
||||
"fk_user" integer NOT NULL,
|
||||
"fk_usergroup" integer NOT NULL,
|
||||
"UNIQUE"(fk_user,fk_usergroup)
|
||||
UNIQUE(fk_user,fk_usergroup)
|
||||
);
|
||||
|
||||
CREATE INDEX idx_llx_usergroup_user_fk_user_fk_usergroup ON llx_usergroup_user ();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user