*** empty log message ***

This commit is contained in:
Rodolphe Quiedeville 2002-04-29 20:54:57 +00:00
parent 3c6b761968
commit 6d7b84146c
2 changed files with 178 additions and 0 deletions

79
mysql/Makefile Normal file
View File

@ -0,0 +1,79 @@
#
# General Makefile for Mysql database
#
# Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
#
# $Id$
# $Source$
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
MYSQL=mysql
BASE=dolibarr
all:
cd tables \
&& make show
show:
cd tables \
&& make show
table:
cd tables \
&& make create
droptable:
cd tables \
&& make drop
load:
$(MYSQL) $(BASE) < data/data.sql
drop: dropdb droppriv
droppriv:
$(MYSQL) mysql -e "delete from db where Db='$(BASE)' ; "
dropdb:
$(MYSQL) mysql -f -e "drop database if exists $(BASE) ; "
create: drop createdb createpriv
createdb:
$(MYSQL) mysql -e "create database $(BASE) ; "
createpriv:
$(MYSQL) mysql -e "insert into db (Host, Db) values ('localhost', '$(BASE)') ; "
$(MYSQL) mysql -e "update db set select_priv = 'Y' where db='$(BASE)' ; "
$(MYSQL) mysql -e "update db set insert_priv = 'Y' where db='$(BASE)' ; "
$(MYSQL) mysql -e "update db set update_priv = 'Y' where db='$(BASE)' ; "
$(MYSQL) mysql -e "update db set delete_priv = 'Y' where db='$(BASE)' ; "
$(MYSQL) mysql -e "update db set create_priv = 'Y' where db='$(BASE)' ; "
$(MYSQL) mysql -e "update db set drop_priv = 'Y' where db='$(BASE)' ; "
$(MYSQL) mysql -e "update db set grant_priv = 'Y' where db='$(BASE)' ; "
$(MYSQL) mysql -e "update db set references_priv = 'Y' where db='$(BASE)' ; "
$(MYSQL) mysql -e "update db set index_priv = 'Y' where db='$(BASE)' ; "
$(MYSQL) mysql -e "update db set alter_priv = 'Y' where db='$(BASE)' ; "
$(MYSQL) mysql -e "flush privileges ; "
#
# $Id$
# $Source$
#

99
mysql/data/data.sql Normal file
View File

@ -0,0 +1,99 @@
--
-- Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
--
-- $Id$
-- $Source$
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
--
--
-- Valeurs pour les bases de langues francaises
--
delete from c_actioncomm;
insert into c_actioncomm (id,libelle) values ( 1, 'Appel Téléphonique');
insert into c_actioncomm (id,libelle) values ( 4, 'Envoi d\'un email');
insert into c_actioncomm (id,libelle) values ( 5, 'Envoi propal - FE');
insert into c_actioncomm (id,libelle) values ( 6, 'Envoi propal - SP-CA');
insert into c_actioncomm (id,libelle) values ( 7, 'Envoi propal - SP-OF');
insert into c_actioncomm (id,libelle) values ( 8, 'Envoi propal - SP-IRHP');
insert into c_actioncomm (id,libelle) values ( 9, 'Envoi Facture');
insert into c_actioncomm (id,libelle) values (10, 'Relance effectuée');
insert into c_actioncomm (id,libelle) values (11, 'Clôture');
delete from c_stcomm;
insert into c_stcomm (id,libelle) values (-1, 'NE PAS CONTACTER');
insert into c_stcomm (id,libelle) values ( 0, 'Jamais contacté');
insert into c_stcomm (id,libelle) values ( 1, 'A contacter');
insert into c_stcomm (id,libelle) values ( 2, 'Contact en cours');
insert into c_stcomm (id,libelle) values ( 3, 'Contactée');
delete from c_typent;
insert into c_typent (id,libelle) values ( 0, 'Indifférent');
insert into c_typent (id,libelle) values ( 1, 'Start-up');
insert into c_typent (id,libelle) values ( 2, 'Grand groupe');
insert into c_typent (id,libelle) values ( 3, 'PME/PMI');
insert into c_typent (id,libelle) values ( 4, 'Administration');
insert into c_typent (id,libelle) values (100, 'Autres');
delete from c_pays;
insert into c_pays (id,libelle,code) values (0, 'France', 'FR');
insert into c_pays (id,libelle,code) values (2, 'Belgique', 'BE');
insert into c_pays (id,libelle,code) values (3, 'Italie', 'IT');
insert into c_pays (id,libelle,code) values (4, 'Espagne', 'ES');
insert into c_pays (id,libelle,code) values (5, 'Allemagne', 'DE');
insert into c_pays (id,libelle,code) values (6, 'Suisse', 'CH');
insert into c_pays (id,libelle,code) values (7, 'Royaume uni', 'GB');
insert into c_pays (id,libelle,code) values (8, 'Irlande', 'IE');
insert into c_pays (id,libelle,code) values (9, 'Chine', 'CN');
insert into c_pays (id,libelle,code) values (10, 'Tunisie', 'TN');
insert into c_pays (id,libelle,code) values (11, 'Etats Unis', 'US');
insert into c_pays (id,libelle,code) values (12, 'Maroc', 'MA');
insert into c_pays (id,libelle,code) values (13, 'Algérie', 'DZ');
insert into c_pays (id,libelle,code) values (14, 'Canada', 'CA');
insert into c_pays (id,libelle,code) values (15, 'Togo', 'TG');
insert into c_pays (id,libelle,code) values (16, 'Gabon', 'GA');
insert into c_pays (id,libelle,code) values (17, 'Pays Bas', 'NL');
insert into c_pays (id,libelle,code) values (18, 'Hongrie', 'HU');
insert into c_pays (id,libelle,code) values (19, 'Russie', 'RU');
insert into c_pays (id,libelle,code) values (20, 'Suède', 'SE');
insert into c_pays (id,libelle,code) values (21, 'Côte d\'Ivoire', 'CI');
insert into c_pays (id,libelle,code) values (23, 'Sénégal', 'SN');
insert into c_pays (id,libelle,code) values (24, 'Argentine', 'AR');
insert into c_pays (id,libelle,code) values (25, 'Cameroun', 'CM');
delete from c_effectif;
insert into c_effectif (id,libelle) values (0, 'Non spécifié');
insert into c_effectif (id,libelle) values (1, '1 - 5');
insert into c_effectif (id,libelle) values (2, '6 - 10');
insert into c_effectif (id,libelle) values (3, '11 - 50');
insert into c_effectif (id,libelle) values (4, '51 - 100');
insert into c_effectif (id,libelle) values (5, '100 - 500');
insert into c_effectif (id,libelle) values (6, '> 500');
delete from c_paiement;
insert into c_paiement (id,libelle) values (0, 'Cheque');
insert into c_paiement (id,libelle) values (1, 'Virement');
delete from c_prestatype;
insert into c_prestatype (id,libelle) values (0, '---');
insert into c_prestatype (id,libelle) values (1, 'Régie');
insert into c_prestatype (id,libelle) values (2, 'Forfait');
delete from c_propalst;
insert into c_propalst (id,label) values (0, '---');
insert into c_propalst (id,label) values (1, 'Brouillon');
insert into c_propalst (id,label) values (2, 'Signée');
insert into c_propalst (id,label) values (3, 'Non Signée');