Fix: table creation scripts
This commit is contained in:
parent
079ea61582
commit
bef9fd152b
@ -11,13 +11,14 @@
|
||||
#------------------------------------------------------
|
||||
|
||||
|
||||
export dumpfile=`ls mysqldump_dolibarr_*.sql | sort | tail -n 1`
|
||||
export mydir=`echo "$0" | sed -e 's/initdemo.sh//'`;
|
||||
if [ "x$mydir" = "x" ]
|
||||
then
|
||||
export mydir="."
|
||||
fi
|
||||
export id=`id -u`;
|
||||
export dumpfile=`ls $mydir/mysqldump_dolibarr_*.sql | sort | tail -n 1`
|
||||
export dumpfile=`basename $dumpfile`
|
||||
|
||||
|
||||
# ----------------------------- check if root
|
||||
@ -149,10 +150,10 @@ if [ "x$passwd" != "x" ]
|
||||
then
|
||||
export passwd="-p$passwd"
|
||||
fi
|
||||
#echo "mysql -P$port -u$admin $passwd $base < $mydir/$dumpfile"
|
||||
#mysql -P$port -u$admin $passwd $base < $mydir/$dumpfile
|
||||
echo "mysql -P$port -u$admin ***** $base < $mydir/$dumpfile"
|
||||
mysql -P$port -u$admin $passwd $base < $mydir/$dumpfile
|
||||
#echo "mysql -P$port -u$admin -p$passwd $base < $mydir/$dumpfile"
|
||||
#mysql -P$port -u$admin -p$passwd $base < $mydir/$dumpfile
|
||||
echo "mysql -P$port -u$admin -p***** $base < $mydir/$dumpfile"
|
||||
mysql -P$port -u$admin -p$passwd $base < $mydir/$dumpfile
|
||||
|
||||
echo "Dolibarr data demo has been loaded."
|
||||
echo
|
||||
|
||||
@ -272,6 +272,8 @@ ALTER TABLE llx_c_tva DROP COLUMN accountancy_code;
|
||||
ALTER TABLE llx_c_tva ADD COLUMN accountancy_code_sell varchar(15) DEFAULT NULL AFTER active;
|
||||
ALTER TABLE llx_c_tva ADD COLUMN accountancy_code_buy varchar(15) DEFAULT NULL AFTER accountancy_code_sell;
|
||||
ALTER TABLE llx_c_chargessociales ADD COLUMN accountancy_code varchar(15) DEFAULT NULL AFTER code;
|
||||
|
||||
-- Tables for accountancy expert
|
||||
DROP TABLE llx_accountingaccount;
|
||||
DROP TABLE llx_accountingsystem;
|
||||
|
||||
@ -284,6 +286,8 @@ create table llx_accountingsystem
|
||||
active smallint DEFAULT 0
|
||||
)ENGINE=innodb;
|
||||
|
||||
ALTER TABLE llx_accountingsystem ADD INDEX idx_accountingsystem_pcg_version (pcg_version);
|
||||
|
||||
create table llx_accountingaccount
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
@ -299,6 +303,9 @@ create table llx_accountingaccount
|
||||
ALTER TABLE llx_accountingaccount ADD INDEX idx_accountingaccount_fk_pcg_version (fk_pcg_version);
|
||||
ALTER TABLE llx_accountingaccount ADD CONSTRAINT fk_accountingaccount_fk_pcg_version FOREIGN KEY (fk_pcg_version) REFERENCES llx_accountingsystem (pcg_version);
|
||||
|
||||
|
||||
-- Data for accountancy expert
|
||||
|
||||
insert into llx_accountingsystem (rowid, pcg_version, fk_pays, label, active) VALUES (1,'PCG99-ABREGE', 1, 'The simple accountancy french plan', 1);
|
||||
|
||||
insert into llx_accountingaccount (rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label, active) VALUES ( 1,'PCG99-ABREGE','CAPIT', 'CAPITAL', '101', '1', 'Capital', '1');
|
||||
|
||||
22
htdocs/install/mysql/tables/llx_accountingsystem.key.sql
Normal file
22
htdocs/install/mysql/tables/llx_accountingsystem.key.sql
Normal file
@ -0,0 +1,22 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2005-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
--
|
||||
-- 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, see <http://www.gnu.org/licenses/>.
|
||||
--
|
||||
-- ===========================================================================
|
||||
|
||||
|
||||
ALTER TABLE llx_accountingsystem ADD INDEX idx_accountingsystem_pcg_version (pcg_version);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user