[ Index ] |
|
Code source de Dolibarr 2.0.1 |
1 # 2 # Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org> 3 # Copyright (C) 2002-2003 Éric Seigne <erics@rycks.com> 4 # Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be> 5 # 6 # This program is free software; you can redistribute it and/or modify 7 # it under the terms of the GNU General Public License as published by 8 # the Free Software Foundation; either version 2 of the License, or 9 # (at your option) any later version. 10 # 11 # This program is distributed in the hope that it will be useful, 12 # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 # GNU General Public License for more details. 15 # 16 # You should have received a copy of the GNU General Public License 17 # along with this program; if not, write to the Free Software 18 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 # 20 # $Id: Makefile,v 1.8 2005/03/06 23:14:12 eldy Exp $ 21 # $Source: /cvsroot/dolibarr/dolibarr/pgsql/Makefile,v $ 22 # 23 # ********************************************************************** 24 # Ce makefile permet d'initialiser la base de donnée de dolibarr en manuel. 25 # Il n'est utile que si vous n'utilisez pas l'installateur automatique 26 # accessible à http://localhost/dolibarr/install/ 27 # 28 # Pour une installation manuelle, créer la base dolibarr puis faire: 29 # make table 30 # make load 31 # 32 # Ou bien, toujours après avoir créer la base dolibarr: 33 # make mysql.sql 34 # mysql dolibarr < mysql.sql 35 # 36 # Le script mysql.sql cotient tous le ordres sql pour créer la base 37 # Tables + Index et Clés + Données 38 # 39 # ********************************************************************** 40 41 SQL=psql 42 BASE=dolibarr 43 OPTIONS=-U postgres 44 OWNER=dolibarradm 45 OWNERPASS=azaz 46 FIND=find 47 #FIND="c:/Program files/cygwin/bin/find" 48 49 50 TABLES=$(shell $(FIND) tables/ -name "*sql") 51 52 53 all: 54 cat README 55 56 show: 57 cd tables \ 58 && make show 59 60 drop: 61 $(SQL) $(OPTIONS) $(BASE) < drop.sql 62 63 table: 64 cd tables \ 65 && make create 66 load: 67 $(SQL) $(OPTIONS) $(BASE) < data/data.sql 68 69 dev: 70 cd data \ 71 && make dev 72 73 74 75 fulldev: drop table load dev 76 77 78 drop: droppriv dropdb dropuser 79 80 droppriv: 81 $(SQL) $(OPTIONS) template1 -c "revoke all privileges on database $(BASE) from $(OWNER) ; " 82 83 dropuser: 84 $(SQL) $(OPTIONS) template1 -c "drop user $(OWNER) ; " 85 86 dropdb: 87 $(SQL) $(OPTIONS) template1 -c "drop database $(BASE) ; " 88 89 90 91 create: drop createuser createdb createpriv 92 93 createuser: 94 $(SQL) $(OPTIONS) template1 -c "create user $(OWNER) with UNENCRYPTED PASSWORD '$(OWNERPASS)' ; " 95 96 createdb: 97 $(SQL) $(OPTIONS) template1 -c "create database $(BASE) with owner = $(OWNER) ; " 98 99 createpriv: 100 $(SQL) $(OPTIONS) template1 -c "grant all privileges on database $(BASE) to $(OWNER) ; " 101 102 103 pgsql.sql: $(TABLES) data/data.sql Makefile 104 echo "-- Fichier généré par make pgsql.sql" > pgsql.sql 105 echo "-- Contient les ordres de creation des tables + les clés + les données" >> pgsql.sql 106 echo "-- ;" >> pgsql.sql 107 $(FIND) tables/ -name "*sql" | grep -v "key.sql" | xargs cat | grep -v "^--" | cut -d "-" -f 1 >> pgsql.sql 108 $(FIND) tables/ -name "*sql" | grep "key.sql" | xargs cat | grep -v "^--" | cut -d "-" -f 1 >> pgsql.sql 109 $(FIND) functions/ -name "*sql" | xargs cat | grep -v "^--" | cut -d "-" -f 1 >> pgsql.sql 110 cat data/data.sql | grep -v ^-- >> pgsql.sql
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 12:29:37 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |