Remove files not required. Now conversion between database syntax is done in real time during install.
This commit is contained in:
parent
377aef9880
commit
cff6895a5a
100
mssql/Makefile
100
mssql/Makefile
@ -1,100 +0,0 @@
|
||||
# Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
# Copyright (C) 2005 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, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# $Id$
|
||||
# $Source$
|
||||
#
|
||||
# **********************************************************************
|
||||
# Ce makefile permet d'initialiser la base de donnée de dolibarr en manuel.
|
||||
# Il n'est utile que si vous n'utilisez pas l'installateur automatique
|
||||
# accessible à http://localhost/dolibarr/install/
|
||||
#
|
||||
# Pour une installation manuelle, créer la base dolibarr puis faire:
|
||||
# make mssql.sql
|
||||
# mysql dolibarr < mssql.sql
|
||||
#
|
||||
# Le script mssql.sql cotient tous le ordres sql pour créer la base
|
||||
# Tables + Index et Clés + Données
|
||||
#
|
||||
# **********************************************************************
|
||||
|
||||
# Penser à rajouter le commutateur -S pour un serveur autre que localhost
|
||||
# Vous pouvez remplacer -E par -U et -P si vous voulez utiliser l'authentification SQL
|
||||
|
||||
# Vous aurez besoin des outils GNU précompilé pour Windows (provenant de Cygwin par exemple) pour générer et
|
||||
# exécuter ce script
|
||||
SQL=sqlcmd -E -Q
|
||||
BASE=dolibarr
|
||||
OPTIONS=
|
||||
|
||||
FIND=find
|
||||
#FIND="c:/Program files/cygwin/bin/find"
|
||||
|
||||
|
||||
TABLES=$(shell $(FIND) tables/ -name "*sql")
|
||||
|
||||
|
||||
all:
|
||||
cat README
|
||||
|
||||
load:
|
||||
$(SQL) $(OPTIONS) $(BASE) < data/data.sql
|
||||
|
||||
dev:
|
||||
cd data \
|
||||
&& make dev BASE=$(BASE) OPTIONS=$(OPTIONS)
|
||||
|
||||
|
||||
|
||||
dropall: dropdb droppriv
|
||||
|
||||
droppriv:
|
||||
$(SQL) $(OPTIONS) $(SQL) -e "delete from db where Db='$(BASE)' ; "
|
||||
|
||||
dropdb:
|
||||
$(SQL) $(OPTIONS) $(SQL) -f -e "drop database if exists $(BASE) ; "
|
||||
|
||||
|
||||
|
||||
create: createdb createpriv
|
||||
|
||||
createdb:
|
||||
$(SQL) $(OPTIONS) "create database $(BASE) ; "
|
||||
|
||||
createpriv:
|
||||
$(SQL) $(OPTIONS) "insert into db (Host, Db) values ('localhost', '$(BASE)') ; "
|
||||
$(SQL) $(OPTIONS) "update db set select_priv = 'Y' where db='$(BASE)' ; "
|
||||
$(SQL) $(OPTIONS) "update db set insert_priv = 'Y' where db='$(BASE)' ; "
|
||||
$(SQL) $(OPTIONS) "update db set update_priv = 'Y' where db='$(BASE)' ; "
|
||||
$(SQL) $(OPTIONS) "update db set delete_priv = 'Y' where db='$(BASE)' ; "
|
||||
$(SQL) $(OPTIONS) "update db set create_priv = 'Y' where db='$(BASE)' ; "
|
||||
$(SQL) $(OPTIONS) "update db set drop_priv = 'Y' where db='$(BASE)' ; "
|
||||
$(SQL) $(OPTIONS) "update db set grant_priv = 'Y' where db='$(BASE)' ; "
|
||||
$(SQL) $(OPTIONS) "update db set references_priv = 'Y' where db='$(BASE)' ; "
|
||||
$(SQL) $(OPTIONS) "update db set index_priv = 'Y' where db='$(BASE)' ; "
|
||||
$(SQL) $(OPTIONS) "update db set alter_priv = 'Y' where db='$(BASE)' ; "
|
||||
$(SQL) $(OPTIONS) "flush privileges ; "
|
||||
|
||||
|
||||
|
||||
mssql.sql: $(TABLES) data/data.sql Makefile
|
||||
echo "-- Fichier généré par make mssql.sql" > mssql.sql
|
||||
echo "-- Contient les ordres de creation des tables + les clés + les données" >> mssql.sql
|
||||
echo "-- ;" >> mssql.sql
|
||||
$(FIND) tables/ -name "*sql" | grep -v "key.sql" | xargs cat | grep -v "^--" | cut -d "-" -f 1 >> mssql.sql
|
||||
$(FIND) tables/ -name "*sql" | grep "key.sql" | xargs cat | grep -v "^--" | cut -d "-" -f 1 >> mssql.sql
|
||||
cat data/data.sql | grep -v ^-- >> mssql.sql
|
||||
13
mssql/README
13
mssql/README
@ -1,8 +1,9 @@
|
||||
# Makefile Options
|
||||
#####################
|
||||
# README
|
||||
########
|
||||
|
||||
- mssql.sql Génère un fichier sql unique pour l'installation (Contient les
|
||||
ordres de création des tables + clés et index + données)
|
||||
|
||||
- load Charge les données minimales définies dans data/data.sql
|
||||
This directory contains files to create functions required
|
||||
to have MsSql database being compatible with Dolibarr.
|
||||
|
||||
Note that all scripts to create database and to load initial data
|
||||
are the mysql scripts that are converted on the fly by the driver
|
||||
to be compatible with MsSql.
|
||||
|
||||
1577
mssql/data/data.sql
1577
mssql/data/data.sql
File diff suppressed because it is too large
Load Diff
@ -1,27 +0,0 @@
|
||||
-- ============================================================================
|
||||
-- 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, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
-- ===========================================================================
|
||||
|
||||
|
||||
CREATE INDEX idx_accountingaccount_fk_pcg_version On llx_accountingaccount(fk_pcg_version);
|
||||
|
||||
|
||||
ALTER TABLE llx_accountingaccount ADD CONSTRAINT fk_accountingaccount_fk_pcg_version FOREIGN KEY (fk_pcg_version) REFERENCES llx_accountingsystem (pcg_version);
|
||||
@ -1,31 +0,0 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2004-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, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
-- ============================================================================
|
||||
|
||||
create table llx_accountingaccount
|
||||
(
|
||||
rowid integer IDENTITY PRIMARY KEY,
|
||||
fk_pcg_version varchar(12) NOT NULL,
|
||||
pcg_type varchar(20) NOT NULL,
|
||||
pcg_subtype varchar(20) NOT NULL,
|
||||
label varchar(128) NOT NULL,
|
||||
account_number varchar(20) NOT NULL,
|
||||
account_parent varchar(20)
|
||||
);
|
||||
@ -1,28 +0,0 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2004-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, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
-- ============================================================================
|
||||
|
||||
create table llx_accountingdebcred
|
||||
(
|
||||
fk_transaction integer NOT NULL,
|
||||
fk_account integer NOT NULL,
|
||||
amount real NOT NULL,
|
||||
direction varchar(1) NOT NULL
|
||||
);
|
||||
@ -1,31 +0,0 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2004-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, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
-- ============================================================================
|
||||
|
||||
create table llx_accountingsystem
|
||||
(
|
||||
pcg_version varchar(12) PRIMARY KEY,
|
||||
fk_pays integer NOT NULL,
|
||||
label varchar(128) NOT NULL,
|
||||
datec varchar(12) NOT NULL,
|
||||
fk_author varchar(20),
|
||||
tms timestamp,
|
||||
active smallint DEFAULT 0
|
||||
);
|
||||
@ -1,33 +0,0 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2004-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, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
-- ============================================================================
|
||||
|
||||
create table llx_accountingtransaction
|
||||
(
|
||||
rowid integer IDENTITY PRIMARY KEY,
|
||||
label varchar(128) NOT NULL,
|
||||
datec SMALLDATETIME NOT NULL,
|
||||
fk_author varchar(20) NOT NULL,
|
||||
tms timestamp,
|
||||
fk_facture integer,
|
||||
fk_facture_fourn integer,
|
||||
fk_paiement integer,
|
||||
fk_paiement_fourn integer
|
||||
);
|
||||
@ -1,33 +0,0 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
-- Copyright (C) 2004 Guillaume Delecourt <guillaume.delecourt@opensides.be>
|
||||
--
|
||||
-- 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.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
--
|
||||
-- ===================================================================
|
||||
|
||||
create table llx_action_def
|
||||
(
|
||||
rowid integer NOT NULL PRIMARY KEY,
|
||||
code varchar(25) UNIQUE NOT NULL,
|
||||
tms timestamp,
|
||||
titre varchar(255) NOT NULL,
|
||||
description text,
|
||||
objet_type varchar(14) check (objet_type in ('ficheinter','facture','propale','mailing','order_supplier'))
|
||||
);
|
||||
@ -1,27 +0,0 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2005 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, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
--
|
||||
-- ===========================================================================
|
||||
|
||||
|
||||
CREATE INDEX idx_actioncomm_datea ON llx_actioncomm(datea);
|
||||
CREATE INDEX idx_actioncomm_fk_soc ON llx_actioncomm(fk_soc);
|
||||
CREATE INDEX idx_actioncomm_fk_contact ON llx_actioncomm(fk_contact);
|
||||
CREATE INDEX idx_actioncomm_fk_facture ON llx_actioncomm(fk_facture);
|
||||
@ -1,60 +0,0 @@
|
||||
-- ========================================================================
|
||||
-- Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
--
|
||||
-- $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.
|
||||
--
|
||||
-- Actions commerciales
|
||||
--
|
||||
-- ========================================================================
|
||||
|
||||
create table llx_actioncomm
|
||||
(
|
||||
id integer IDENTITY PRIMARY KEY,
|
||||
datec SMALLDATETIME, -- SMALLDATETIME creation
|
||||
datep SMALLDATETIME, -- SMALLDATETIME debut planifiee
|
||||
datep2 SMALLDATETIME, -- SMALLDATETIME fin planifiee si action non ponctuelle
|
||||
datea SMALLDATETIME, -- SMALLDATETIME debut realisation
|
||||
datea2 SMALLDATETIME, -- SMALLDATETIME fin realisation si action non ponctuelle
|
||||
tms timestamp, -- SMALLDATETIME modif
|
||||
fk_action integer, -- type de l'action
|
||||
label varchar(50) NOT NULL, -- libelle de l'action
|
||||
|
||||
fk_project integer,
|
||||
fk_soc integer,
|
||||
fk_contact integer,
|
||||
fk_parent integer NOT NULL default 0,
|
||||
|
||||
fk_user_action integer, -- id de la personne qui doit effectuer l'action
|
||||
fk_user_author integer, -- id de la personne qui a effectuer l'action
|
||||
priority smallint,
|
||||
punctual smallint NOT NULL default 1,
|
||||
[percent] smallint NOT NULL default 0,
|
||||
durationp real, -- duree planifiee
|
||||
durationa real, -- duree reellement passee
|
||||
note text,
|
||||
|
||||
propalrowid integer,
|
||||
fk_commande integer,
|
||||
fk_facture integer
|
||||
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1,62 +0,0 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
-- Copyright (C) 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, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
--
|
||||
-- ===================================================================
|
||||
--
|
||||
-- statut
|
||||
-- -1 : brouillon
|
||||
-- 0 : resilie
|
||||
-- 1 : valide
|
||||
|
||||
create table llx_adherent
|
||||
(
|
||||
rowid integer IDENTITY PRIMARY KEY,
|
||||
nom varchar(50),
|
||||
prenom varchar(50),
|
||||
login varchar(50) NOT NULL, -- login
|
||||
pass varchar(50), -- password
|
||||
fk_adherent_type smallint,
|
||||
morphy varchar(3) check (morphy in ('mor','phy')) NOT NULL, -- personne morale / personne physique
|
||||
societe varchar(50),
|
||||
adresse text,
|
||||
cp varchar(30),
|
||||
ville varchar(50),
|
||||
pays varchar(50),
|
||||
email varchar(255),
|
||||
phone varchar(30),
|
||||
phone_perso varchar(30),
|
||||
phone_mobile varchar(30),
|
||||
naiss SMALLDATETIME, -- SMALLDATETIME de naissance
|
||||
photo varchar(255), -- url vers photo
|
||||
statut smallint NOT NULL DEFAULT 0,
|
||||
[public] smallint NOT NULL DEFAULT 0, -- certain champ de la fiche sont ils [public] ou pas ?
|
||||
datefin SMALLDATETIME, -- SMALLDATETIME de fin de validité de la cotisation
|
||||
note text,
|
||||
datevalid SMALLDATETIME, -- SMALLDATETIME de validation
|
||||
datec SMALLDATETIME, -- SMALLDATETIME de creation
|
||||
tms timestamp, -- SMALLDATETIME de modification
|
||||
fk_user_author integer NOT NULL,
|
||||
fk_user_mod integer NOT NULL,
|
||||
fk_user_valid integer NOT NULL,
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX login ON llx_adherent(login)
|
||||
@ -1,31 +0,0 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
--
|
||||
-- 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.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
--
|
||||
-- ===================================================================
|
||||
|
||||
create table llx_adherent_options
|
||||
(
|
||||
optid integer IDENTITY PRIMARY KEY,
|
||||
tms timestamp,
|
||||
adhid integer NOT NULL, -- id de l'adherent auquel correspond ces attributs optionnel
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX adhid ON llx_adherent_options(adhid)
|
||||
@ -1,29 +0,0 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
--
|
||||
-- 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.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
--
|
||||
-- ===================================================================
|
||||
|
||||
create table llx_adherent_options_label
|
||||
(
|
||||
name varchar(64) PRIMARY KEY, -- nom de l'attribut
|
||||
tms timestamp,
|
||||
label varchar(255) NOT NULL -- label correspondant a l'attribut
|
||||
);
|
||||
@ -1,24 +0,0 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2007 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, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
--
|
||||
-- ============================================================================
|
||||
|
||||
|
||||
CREATE UNIQUE INDEX uk_adherent_type_libelle ON llx_adherent_type(libelle);
|
||||
@ -1,38 +0,0 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2002-2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
--
|
||||
-- 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.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
--
|
||||
-- ===================================================================
|
||||
--
|
||||
-- statut
|
||||
-- 0 : actif
|
||||
-- 1 : inactif
|
||||
|
||||
create table llx_adherent_type
|
||||
(
|
||||
rowid integer IDENTITY PRIMARY KEY,
|
||||
tms timestamp,
|
||||
statut smallint NOT NULL DEFAULT 0,
|
||||
libelle varchar(50) NOT NULL,
|
||||
cotisation varchar(3) check (cotisation in ('yes','no')) NOT NULL DEFAULT 'yes',
|
||||
vote varchar(3) check (vote in ('yes','no')) DEFAULT 'yes',
|
||||
note text,
|
||||
mail_valid text -- mail envoye a la validation
|
||||
);
|
||||
@ -1,33 +0,0 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
--
|
||||
-- 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.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
--
|
||||
-- ============================================================================
|
||||
|
||||
create table llx_appro
|
||||
(
|
||||
rowid integer IDENTITY PRIMARY KEY,
|
||||
datec datetime,
|
||||
tms timestamp,
|
||||
fk_product integer NOT NULL,
|
||||
quantity smallint NOT NULL,
|
||||
price real,
|
||||
fk_user_author integer
|
||||
);
|
||||
|
||||
@ -1,44 +0,0 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2000-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
--
|
||||
-- $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.
|
||||
--
|
||||
-- ===================================================================
|
||||
|
||||
create table llx_bank
|
||||
(
|
||||
rowid integer IDENTITY PRIMARY KEY,
|
||||
datec datetime,
|
||||
datev SMALLDATETIME, -- SMALLDATETIME de valeur
|
||||
dateo SMALLDATETIME, -- SMALLDATETIME operation
|
||||
amount real NOT NULL default 0,
|
||||
label varchar(255),
|
||||
fk_account integer,
|
||||
fk_user_author integer,
|
||||
fk_user_rappro integer,
|
||||
fk_type varchar(4), -- CB, Virement, cheque
|
||||
num_releve varchar(50),
|
||||
num_chq integer,
|
||||
rappro tinyint default 0,
|
||||
note text,
|
||||
fk_bordereau integer DEFAULT 0,
|
||||
banque varchar(255), -- banque pour les cheques
|
||||
emetteur varchar(255), -- emetteur du cheque
|
||||
author varchar(40) -- a supprimer apres migration
|
||||
);
|
||||
@ -1,24 +0,0 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2005 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, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
--
|
||||
-- ============================================================================
|
||||
|
||||
|
||||
ALTER TABLE llx_bank_account add constraint uk_bank_account_label UNIQUE (label);
|
||||
@ -1,54 +0,0 @@
|
||||
-- =============================================================================
|
||||
-- Copyright (C) 2000-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2004-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, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
--
|
||||
--
|
||||
-- courant : type de compte: 0 epargne, 1 courant, 2 caisse
|
||||
-- clos : le compte est-il clos ou encore ouvert
|
||||
--
|
||||
-- =============================================================================
|
||||
|
||||
create table llx_bank_account
|
||||
(
|
||||
rowid integer IDENTITY PRIMARY KEY,
|
||||
datec datetime,
|
||||
tms timestamp,
|
||||
ref varchar(12) NOT NULL,
|
||||
label varchar(30) NOT NULL,
|
||||
bank varchar(60),
|
||||
code_banque varchar(7),
|
||||
code_guichet varchar(6),
|
||||
number varchar(255),
|
||||
cle_rib varchar(5),
|
||||
bic varchar(11),
|
||||
iban_prefix varchar(5),
|
||||
domiciliation varchar(255),
|
||||
proprio varchar(60),
|
||||
adresse_proprio varchar(255),
|
||||
courant smallint DEFAULT 0 NOT NULL,
|
||||
clos smallint DEFAULT 0 NOT NULL,
|
||||
rappro smallint DEFAULT 1,
|
||||
url varchar(128),
|
||||
account_number varchar(8),
|
||||
currency_code varchar(3) NOT NULL,
|
||||
min_allowed integer DEFAULT 0,
|
||||
min_desired integer DEFAULT 0,
|
||||
comment varchar(254)
|
||||
);
|
||||
@ -1,25 +0,0 @@
|
||||
-- ===================================================================
|
||||
-- $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.
|
||||
--
|
||||
-- ===================================================================
|
||||
|
||||
create table llx_bank_categ
|
||||
(
|
||||
rowid integer IDENTITY PRIMARY KEY,
|
||||
label varchar(255)
|
||||
);
|
||||
@ -1,27 +0,0 @@
|
||||
-- ===================================================================
|
||||
-- $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.
|
||||
--
|
||||
-- ===================================================================
|
||||
|
||||
create table llx_bank_class
|
||||
(
|
||||
lineid integer NOT NULL,
|
||||
fk_categ integer NOT NULL,
|
||||
);
|
||||
|
||||
CREATE INDEX lineid ON llx_bank_class(lineid)
|
||||
@ -1,26 +0,0 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2005-2007 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, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
--
|
||||
-- ===================================================================
|
||||
|
||||
|
||||
CREATE UNIQUE INDEX uk_bank_url ON llx_bank_url(fk_bank,type);
|
||||
|
||||
--ALTER TABLE llx_bank_url ADD INDEX idx_bank_url_fk_bank (fk_bank);
|
||||
@ -1,32 +0,0 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2007 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, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
--
|
||||
-- ===================================================================
|
||||
|
||||
create table llx_bank_url
|
||||
(
|
||||
rowid integer IDENTITY PRIMARY KEY,
|
||||
fk_bank integer,
|
||||
url_id integer,
|
||||
url varchar(255),
|
||||
label varchar(255),
|
||||
type varchar(16) NOT NULL check (type in ('?','company','payment','payment_supplier','member','subscription','donation','sc','payment_sc'))
|
||||
);
|
||||
@ -1,25 +0,0 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2005 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, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
--
|
||||
-- ===================================================================
|
||||
|
||||
|
||||
CREATE UNIQUE INDEX uk_bookmark_url ON llx_bookmark(fk_user, url);
|
||||
CREATE UNIQUE INDEX uk_bookmark_title ON llx_bookmark(fk_user, title);
|
||||
@ -1,31 +0,0 @@
|
||||
-- ===================================================================
|
||||
-- $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.
|
||||
--
|
||||
-- ===================================================================
|
||||
|
||||
create table llx_bookmark
|
||||
(
|
||||
rowid integer IDENTITY PRIMARY KEY,
|
||||
fk_soc integer,
|
||||
fk_user integer NOT NULL,
|
||||
dateb datetime,
|
||||
url varchar(128) NOT NULL,
|
||||
target varchar(16),
|
||||
title varchar(64),
|
||||
favicon varchar(24)
|
||||
);
|
||||
@ -1,37 +0,0 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2006 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.
|
||||
--
|
||||
-- ===================================================================
|
||||
--
|
||||
-- Bordereaux de remise de cheque
|
||||
--
|
||||
create table llx_bordereau_cheque
|
||||
(
|
||||
rowid integer IDENTITY PRIMARY KEY,
|
||||
datec datetime,
|
||||
date_bordereau SMALLDATETIME,
|
||||
number integer,
|
||||
amount float,
|
||||
nbcheque smallint DEFAULT 0,
|
||||
fk_bank_account integer,
|
||||
fk_user_author integer,
|
||||
note text,
|
||||
statut tinyint DEFAULT 0
|
||||
);
|
||||
@ -1,30 +0,0 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 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, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
-- ===================================================================
|
||||
|
||||
|
||||
-- Supprimme orphelins pour permettre montée de la clé
|
||||
-- V4 DELETE llx_boxes FROM llx_boxes LEFT JOIN llx_boxes_def ON llx_boxes.box_id = llx_boxes_def.rowid WHERE llx_boxes_def.rowid IS NULL;
|
||||
|
||||
CREATE INDEX idx_boxes_boxid ON llx_boxes(box_id);
|
||||
|
||||
ALTER TABLE llx_boxes ADD CONSTRAINT fk_boxes_box_id FOREIGN KEY (box_id) REFERENCES llx_boxes_def (rowid);
|
||||
|
||||
CREATE INDEX idx_boxes_fk_user ON llx_boxes(fk_user);
|
||||
@ -1,35 +0,0 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 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, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
--
|
||||
-- ===========================================================================
|
||||
--
|
||||
-- position : 0=index.php
|
||||
-- box_order : Box sort order
|
||||
--
|
||||
|
||||
create table llx_boxes
|
||||
(
|
||||
rowid integer IDENTITY PRIMARY KEY,
|
||||
box_id integer NOT NULL,
|
||||
position smallint NOT NULL,
|
||||
box_order varchar(3) NOT NULL,
|
||||
fk_user integer default 0 NOT NULL
|
||||
);
|
||||
@ -1,29 +0,0 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
--
|
||||
-- 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.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
--
|
||||
-- ===========================================================================
|
||||
|
||||
create table llx_boxes_def
|
||||
(
|
||||
rowid integer IDENTITY PRIMARY KEY,
|
||||
name varchar(255) NOT NULL,
|
||||
[file] varchar(255) NOT NULL,
|
||||
note text
|
||||
);
|
||||
@ -1,33 +0,0 @@
|
||||
-- ========================================================================
|
||||
-- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
--
|
||||
-- $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.
|
||||
--
|
||||
-- ========================================================================
|
||||
|
||||
create table llx_c_actioncomm
|
||||
(
|
||||
id integer PRIMARY KEY,
|
||||
code varchar(12) UNIQUE NOT NULL,
|
||||
type varchar(10) DEFAULT 'system' NOT NULL,
|
||||
libelle varchar(30) NOT NULL,
|
||||
module varchar(16) DEFAULT NULL,
|
||||
active tinyint DEFAULT 1 NOT NULL,
|
||||
todo tinyint
|
||||
);
|
||||
@ -1,33 +0,0 @@
|
||||
-- ========================================================================
|
||||
-- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2004 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, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
--
|
||||
-- ========================================================================
|
||||
|
||||
create table llx_c_chargesociales
|
||||
(
|
||||
id integer IDENTITY PRIMARY KEY,
|
||||
libelle varchar(80),
|
||||
deductible smallint DEFAULT 0 NOT NULL,
|
||||
active tinyint DEFAULT 1 NOT NULL
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -1,30 +0,0 @@
|
||||
-- ========================================================================
|
||||
-- Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
-- Copyright (C) 2004 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, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
-- ========================================================================
|
||||
|
||||
create table llx_c_civilite
|
||||
(
|
||||
rowid integer PRIMARY KEY,
|
||||
code varchar(6) UNIQUE NOT NULL,
|
||||
civilite varchar(50),
|
||||
active tinyint DEFAULT 1 NOT NULL
|
||||
);
|
||||
|
||||
@ -1,24 +0,0 @@
|
||||
-- ========================================================================
|
||||
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
--
|
||||
-- $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.
|
||||
--
|
||||
-- ========================================================================
|
||||
|
||||
|
||||
CREATE UNIQUE INDEX uk_c_currencies_code_iso ON llx_c_currencies(code_iso);
|
||||
@ -1,30 +0,0 @@
|
||||
-- ========================================================================
|
||||
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
--
|
||||
-- $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.
|
||||
--
|
||||
-- ========================================================================
|
||||
|
||||
create table llx_c_currencies
|
||||
(
|
||||
code varchar(2) PRIMARY KEY,
|
||||
code_iso varchar(3) NOT NULL,
|
||||
label varchar(64),
|
||||
active tinyint DEFAULT 1 NOT NULL
|
||||
);
|
||||
|
||||
@ -1,27 +0,0 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2005 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, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
--
|
||||
-- ============================================================================
|
||||
|
||||
|
||||
CREATE UNIQUE INDEX uk_departements ON llx_c_departements(code_departement,fk_region);
|
||||
|
||||
|
||||
CREATE INDEX idx_departements_fk_region ON llx_c_departements(fk_region);
|
||||
@ -1,37 +0,0 @@
|
||||
-- ========================================================================
|
||||
-- Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
--
|
||||
-- $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.
|
||||
--
|
||||
-- ========================================================================
|
||||
|
||||
create table llx_c_departements
|
||||
(
|
||||
rowid integer IDENTITY PRIMARY KEY,
|
||||
code_departement varchar(6) NOT NULL,
|
||||
fk_region integer,
|
||||
cheflieu varchar(7),
|
||||
tncc integer,
|
||||
ncc varchar(50),
|
||||
nom varchar(50),
|
||||
active tinyint DEFAULT 1 NOT NULL
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -1,32 +0,0 @@
|
||||
-- ========================================================================
|
||||
-- Copyright (C) 2007 Régis Houssin <regis@dolibarr.fr>
|
||||
--
|
||||
-- $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.
|
||||
--
|
||||
-- ========================================================================
|
||||
|
||||
create table llx_c_ecotaxe
|
||||
(
|
||||
rowid integer IDENTITY PRIMARY KEY,
|
||||
code varchar(64) UNIQUE NOT NULL, -- Code servant à la traduction et à la référence interne
|
||||
libelle varchar(255), -- Description
|
||||
price FLOAT(25), -- Montant HT
|
||||
organization varchar(255), -- Organisme gérant le barème tarifaire
|
||||
fk_pays integer NOT NULL, -- Pays correspondant
|
||||
active tinyint DEFAULT 1 NOT NULL
|
||||
);
|
||||
@ -1,31 +0,0 @@
|
||||
-- ========================================================================
|
||||
-- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
--
|
||||
-- $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.
|
||||
--
|
||||
-- ========================================================================
|
||||
|
||||
create table llx_c_effectif
|
||||
(
|
||||
id integer PRIMARY KEY,
|
||||
code varchar(12) UNIQUE NOT NULL,
|
||||
libelle varchar(30),
|
||||
active tinyint DEFAULT 1 NOT NULL
|
||||
);
|
||||
|
||||
@ -1,33 +0,0 @@
|
||||
-- ========================================================================
|
||||
-- Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2004 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, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
--
|
||||
-- ========================================================================
|
||||
|
||||
create table llx_c_forme_juridique
|
||||
(
|
||||
rowid integer IDENTITY PRIMARY KEY,
|
||||
code varchar(12) UNIQUE NOT NULL,
|
||||
fk_pays integer NOT NULL,
|
||||
libelle varchar(255),
|
||||
active tinyint DEFAULT 1 NOT NULL
|
||||
|
||||
);
|
||||
|
||||
@ -1,32 +0,0 @@
|
||||
-- ========================================================================
|
||||
-- Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
--
|
||||
-- $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.
|
||||
--
|
||||
-- ========================================================================
|
||||
|
||||
create table llx_c_methode_commande_fournisseur
|
||||
(
|
||||
rowid integer IDENTITY PRIMARY KEY,
|
||||
code varchar(30),
|
||||
libelle varchar(60),
|
||||
active tinyint default 1 NOT NULL,
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX code ON llx_c_methode_commande_fournisseur(code)
|
||||
@ -1,40 +0,0 @@
|
||||
-- ========================================================================
|
||||
-- Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2004 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, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
--
|
||||
-- ========================================================================
|
||||
--
|
||||
-- Type :
|
||||
--
|
||||
-- 0 : entrée d'argent
|
||||
-- 1 : sortie d'argent
|
||||
-- 2 : entrée ou sortie d'argent
|
||||
|
||||
create table llx_c_paiement
|
||||
(
|
||||
id integer PRIMARY KEY,
|
||||
code varchar(6) UNIQUE NOT NULL,
|
||||
libelle varchar(30),
|
||||
type smallint,
|
||||
active tinyint DEFAULT 1 NOT NULL
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -1,26 +0,0 @@
|
||||
-- ========================================================================
|
||||
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
--
|
||||
-- $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.
|
||||
--
|
||||
-- ========================================================================
|
||||
|
||||
|
||||
CREATE UNIQUE INDEX idx_c_pays_code ON llx_c_pays(code);
|
||||
--CREATE UNIQUE INDEX idx_c_pays_code_iso ON llx_c_pays(code_iso);
|
||||
CREATE UNIQUE INDEX idx_c_pays_libelle ON llx_c_pays(libelle);
|
||||
@ -1,31 +0,0 @@
|
||||
-- ========================================================================
|
||||
-- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
--
|
||||
-- $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.
|
||||
--
|
||||
-- ========================================================================
|
||||
|
||||
create table llx_c_pays
|
||||
(
|
||||
rowid integer PRIMARY KEY,
|
||||
code varchar(2) NOT NULL,
|
||||
code_iso varchar(3) ,
|
||||
libelle varchar(50) NOT NULL,
|
||||
active tinyint DEFAULT 1 NOT NULL
|
||||
);
|
||||
@ -1,31 +0,0 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
--
|
||||
-- $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.
|
||||
--
|
||||
-- ===================================================================
|
||||
|
||||
create table llx_c_propalst
|
||||
(
|
||||
id smallint PRIMARY KEY,
|
||||
code varchar(12) UNIQUE NOT NULL,
|
||||
label varchar(30),
|
||||
active tinyint DEFAULT 1 NOT NULL
|
||||
);
|
||||
|
||||
@ -1,26 +0,0 @@
|
||||
-- ========================================================================
|
||||
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
--
|
||||
-- $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.
|
||||
--
|
||||
-- ========================================================================
|
||||
|
||||
|
||||
CREATE INDEX idx_c_regions_fk_pays ON llx_c_regions(fk_pays);
|
||||
|
||||
ALTER TABLE llx_c_regions ADD CONSTRAINT fk_c_regions_fk_pays FOREIGN KEY (fk_pays) REFERENCES llx_c_pays (rowid);
|
||||
@ -1,34 +0,0 @@
|
||||
-- ========================================================================
|
||||
-- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
--
|
||||
-- $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.
|
||||
--
|
||||
-- ========================================================================
|
||||
|
||||
create table llx_c_regions
|
||||
(
|
||||
rowid integer IDENTITY PRIMARY KEY,
|
||||
code_region integer UNIQUE NOT NULL,
|
||||
fk_pays integer NOT NULL,
|
||||
cheflieu varchar(7),
|
||||
tncc integer,
|
||||
nom varchar(50),
|
||||
active tinyint DEFAULT 1 NOT NULL
|
||||
);
|
||||
|
||||
@ -1,31 +0,0 @@
|
||||
-- ========================================================================
|
||||
-- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
--
|
||||
-- $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.
|
||||
--
|
||||
-- ========================================================================
|
||||
|
||||
create table llx_c_stcomm
|
||||
(
|
||||
id integer PRIMARY KEY,
|
||||
code varchar(12) UNIQUE NOT NULL,
|
||||
libelle varchar(30),
|
||||
active tinyint default 1 NOT NULL
|
||||
);
|
||||
|
||||
@ -1,33 +0,0 @@
|
||||
-- ========================================================================
|
||||
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
--
|
||||
-- $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.
|
||||
--
|
||||
-- ========================================================================
|
||||
|
||||
create table llx_c_tva
|
||||
(
|
||||
rowid integer NOT NULL IDENTITY PRIMARY KEY,
|
||||
fk_pays integer NOT NULL,
|
||||
taux FLOAT(25) NOT NULL,
|
||||
recuperableonly integer NOT NULL DEFAULT 0,
|
||||
note varchar(128),
|
||||
active tinyint DEFAULT 1 NOT NULL
|
||||
|
||||
);
|
||||
|
||||
@ -1,33 +0,0 @@
|
||||
-- ========================================================================
|
||||
-- Copyright (C) 2005 Patrick Rouillon <patrick.rouillon.net>
|
||||
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
--
|
||||
-- $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.
|
||||
--
|
||||
-- Defini les types de contact d'un element sert de reference pour
|
||||
-- la table llx_element_contact
|
||||
--
|
||||
-- element est le nom de la table utilisant le type de contact.
|
||||
-- i.e. contact, facture, projet, societe (sans le llx_ devant).
|
||||
-- Libelle est un texte décrivant le type de contact.
|
||||
-- active précide si cette valeur est active ou 'archivé'.
|
||||
--
|
||||
-- ========================================================================
|
||||
|
||||
|
||||
CREATE UNIQUE INDEX idx_c_type_contact_uk ON llx_c_type_contact(element, source, code);
|
||||
@ -1,41 +0,0 @@
|
||||
-- ========================================================================
|
||||
-- Copyright (C) 2005 Patrick Rouillon <patrick.rouillon.net>
|
||||
-- Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
--
|
||||
-- $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.
|
||||
--
|
||||
-- Defini les types de contact d'un element sert de reference pour
|
||||
-- la table llx_element_contact
|
||||
--
|
||||
-- element est le nom de la table utilisant le type de contact.
|
||||
-- i.e. contact, facture, projet, societe (sans le llx_ devant).
|
||||
-- Libelle est un texte décrivant le type de contact.
|
||||
-- active précide si cette valeur est active ou 'archivé'.
|
||||
--
|
||||
-- ========================================================================
|
||||
|
||||
|
||||
create table llx_c_type_contact
|
||||
(
|
||||
rowid integer PRIMARY KEY,
|
||||
element varchar(30) NOT NULL,
|
||||
source varchar(8) DEFAULT 'external' NOT NULL,
|
||||
code varchar(16) NOT NULL,
|
||||
libelle varchar(64) NOT NULL,
|
||||
active tinyint DEFAULT 1 NOT NULL
|
||||
);
|
||||
@ -1,30 +0,0 @@
|
||||
-- ========================================================================
|
||||
-- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2004 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, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
--
|
||||
-- ========================================================================
|
||||
|
||||
create table llx_c_typent
|
||||
(
|
||||
id integer PRIMARY KEY,
|
||||
code varchar(12) UNIQUE NOT NULL,
|
||||
libelle varchar(30),
|
||||
active tinyint DEFAULT 1 NOT NULL
|
||||
);
|
||||
@ -1,20 +0,0 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2007 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, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
--
|
||||
-- ============================================================================
|
||||
|
||||
CREATE INDEX uk_categorie_ref ON llx_categorie(label);
|
||||
@ -1,32 +0,0 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2005 Brice Davoleau <e1davole@iu-vannes.fr>
|
||||
-- Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
|
||||
-- Copyright (C) 2005-2006 Regis Houssin <regis@dolibarr.fr>
|
||||
--
|
||||
-- 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.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
--
|
||||
-- ============================================================================
|
||||
|
||||
create table llx_categorie
|
||||
(
|
||||
rowid integer IDENTITY PRIMARY KEY,
|
||||
label VARCHAR(255), -- nom de la catégorie
|
||||
description text, -- description de la catégorie
|
||||
visible tinyint DEFAULT 1 NOT NULL, -- determine si les produits sont visible ou pas
|
||||
type integer not null default 0
|
||||
);
|
||||
@ -1,27 +0,0 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2005 Brice Davoleau <e1davole@iu-vannes.fr>
|
||||
-- Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
|
||||
-- Copyright (C) 2005 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, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
--
|
||||
-- ============================================================================
|
||||
|
||||
|
||||
CREATE INDEX idx_categorie_association_fk_categorie_mere ON llx_categorie_association(fk_categorie_mere);
|
||||
CREATE INDEX idx_categorie_association_fk_categorie_fille ON llx_categorie_association(fk_categorie_fille);
|
||||
|
||||
ALTER TABLE llx_categorie_association ADD CONSTRAINT fk_categorie_asso_fk_categorie_mere FOREIGN KEY (fk_categorie_mere) REFERENCES llx_categorie (rowid);
|
||||
ALTER TABLE llx_categorie_association ADD CONSTRAINT fk_categorie_asso_fk_categorie_fille FOREIGN KEY (fk_categorie_fille) REFERENCES llx_categorie (rowid);
|
||||
@ -1,25 +0,0 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2005 Brice Davoleau <e1davole@iu-vannes.fr>
|
||||
-- Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
|
||||
--
|
||||
-- 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.
|
||||
--
|
||||
-- ============================================================================
|
||||
|
||||
create table llx_categorie_association
|
||||
(
|
||||
fk_categorie_mere integer NOT NULL,
|
||||
fk_categorie_fille integer NOT NULL
|
||||
);
|
||||
@ -1,28 +0,0 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
--
|
||||
-- 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.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
--
|
||||
-- ============================================================================
|
||||
|
||||
create table llx_categorie_fournisseur
|
||||
(
|
||||
fk_categorie integer NOT NULL,
|
||||
fk_societe integer NOT NULL,
|
||||
UNIQUE (fk_categorie, fk_societe)
|
||||
);
|
||||
@ -1,27 +0,0 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2005 Brice Davoleau <e1davole@iu-vannes.fr>
|
||||
-- Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
|
||||
-- Copyright (C) 2005 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, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
--
|
||||
-- ============================================================================
|
||||
|
||||
ALTER TABLE llx_categorie_product ADD PRIMARY KEY (fk_categorie, fk_product);
|
||||
CREATE INDEX idx_categorie_product_fk_categorie ON llx_categorie_product(fk_categorie);
|
||||
CREATE INDEX idx_categorie_product_fk_product ON llx_categorie_product(fk_product);
|
||||
|
||||
ALTER TABLE llx_categorie_product ADD CONSTRAINT fk_categorie_product_categorie_rowid FOREIGN KEY (fk_categorie) REFERENCES llx_categorie (rowid);
|
||||
ALTER TABLE llx_categorie_product ADD CONSTRAINT fk_categorie_product_product_rowid FOREIGN KEY (fk_product) REFERENCES llx_product (rowid);
|
||||
@ -1,25 +0,0 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2005 Brice Davoleau <e1davole@iu-vannes.fr>
|
||||
-- Copyright (C) 2005 Matthieu Valleton <mv@seeschloss.org>
|
||||
--
|
||||
-- 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.
|
||||
--
|
||||
-- ============================================================================
|
||||
|
||||
create table llx_categorie_product
|
||||
(
|
||||
fk_categorie integer NOT NULL,
|
||||
fk_product integer NOT NULL
|
||||
);
|
||||
@ -1,28 +0,0 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||
--
|
||||
-- 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.
|
||||
--
|
||||
-- ============================================================================
|
||||
|
||||
ALTER TABLE llx_categorie_societe ADD PRIMARY KEY (fk_categorie, fk_societe);
|
||||
|
||||
CREATE INDEX idx_categorie_societe_fk_categorie ON llx_categorie_societe(fk_categorie);
|
||||
CREATE INDEX idx_categorie_societe_fk_societe ON llx_categorie_societe(fk_societe);
|
||||
|
||||
ALTER TABLE llx_categorie_societe ADD CONSTRAINT fk_categorie_societe_categorie_rowid FOREIGN KEY (fk_categorie) REFERENCES llx_categorie (rowid);
|
||||
ALTER TABLE llx_categorie_societe ADD CONSTRAINT fk_categorie_societe_fk_soc FOREIGN KEY (fk_societe) REFERENCES llx_societe (rowid);
|
||||
|
||||
CREATE UNIQUE INDEX fk_categorie ON llx_categorie_societe(fk_categorie, fk_societe);
|
||||
@ -1,23 +0,0 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||
--
|
||||
-- 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.
|
||||
--
|
||||
-- ============================================================================
|
||||
|
||||
create table llx_categorie_societe (
|
||||
fk_categorie integer not null,
|
||||
fk_societe integer not null
|
||||
);
|
||||
@ -1,35 +0,0 @@
|
||||
-- ========================================================================
|
||||
-- Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
--
|
||||
-- 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.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
--
|
||||
-- ========================================================================
|
||||
|
||||
create table llx_chargesociales
|
||||
(
|
||||
rowid integer IDENTITY PRIMARY KEY,
|
||||
date_ech datetime NOT NULL, -- SMALLDATETIME d'echeance
|
||||
libelle varchar(80),
|
||||
fk_type integer,
|
||||
amount real default 0 NOT NULL,
|
||||
paye smallint default 0 NOT NULL,
|
||||
periode SMALLDATETIME
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -1,30 +0,0 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
--
|
||||
-- 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.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
-- ===================================================================
|
||||
|
||||
create table llx_co_fa
|
||||
(
|
||||
rowid integer IDENTITY PRIMARY KEY,
|
||||
fk_commande integer NOT NULL,
|
||||
fk_facture integer NOT NULL
|
||||
|
||||
--key(fk_commande),
|
||||
--key(fk_facture)
|
||||
);
|
||||
@ -1,27 +0,0 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
--
|
||||
-- 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.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
-- ===================================================================
|
||||
|
||||
create table llx_co_pr
|
||||
(
|
||||
rowid integer IDENTITY PRIMARY KEY,
|
||||
fk_commande integer,
|
||||
fk_propale integer
|
||||
);
|
||||
@ -1,29 +0,0 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 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, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
--
|
||||
-- ============================================================================
|
||||
|
||||
|
||||
-- Supprimme orphelins pour permettre montée de la clé
|
||||
-- V4 DELETE llx_commande FROM llx_commande LEFT JOIN llx_societe ON llx_commande.fk_soc = llx_societe.idp WHERE llx_societe.idp IS NULL;
|
||||
|
||||
CREATE INDEX idx_commande_fk_soc ON llx_commande(fk_soc);
|
||||
|
||||
ALTER TABLE llx_commande ADD CONSTRAINT fk_commande_societe FOREIGN KEY (fk_soc) REFERENCES llx_societe (rowid);
|
||||
@ -1,60 +0,0 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
--
|
||||
-- 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.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
--
|
||||
-- ===================================================================
|
||||
|
||||
create table llx_commande
|
||||
(
|
||||
rowid integer IDENTITY PRIMARY KEY,
|
||||
tms timestamp,
|
||||
fk_soc integer NOT NULL,
|
||||
fk_projet integer DEFAULT 0, -- projet auquel est rattache la commande
|
||||
ref varchar(30) NOT NULL, -- order number
|
||||
ref_client varchar(30), -- customer order number
|
||||
|
||||
date_creation datetime, -- date de creation
|
||||
date_valid datetime, -- date de validation
|
||||
date_cloture datetime, -- date de cloture
|
||||
date_commande SMALLDATETIME, -- date de la commande
|
||||
fk_user_author integer, -- createur de la commande
|
||||
fk_user_valid integer, -- valideur de la commande
|
||||
fk_user_cloture integer, -- auteur cloture
|
||||
source smallint NOT NULL,
|
||||
fk_statut smallint default 0,
|
||||
amount_ht real default 0,
|
||||
remise_percent real default 0,
|
||||
remise_absolue real default 0,
|
||||
remise real default 0,
|
||||
tva float default 0,
|
||||
total_ht float default 0,
|
||||
total_ttc float default 0,
|
||||
note text,
|
||||
note_public text,
|
||||
model_pdf varchar(50),
|
||||
|
||||
facture tinyint default 0,
|
||||
fk_cond_reglement integer, -- condition de réglement
|
||||
fk_mode_reglement integer, -- mode de réglement
|
||||
date_livraison SMALLDATETIME default NULL,
|
||||
fk_adresse_livraison integer -- adresse de livraison
|
||||
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX ref ON llx_commande(ref)
|
||||
@ -1,31 +0,0 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 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, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
--
|
||||
-- ============================================================================
|
||||
|
||||
|
||||
-- Supprimme orphelins pour permettre montée de la clé
|
||||
-- V4 DELETE llx_commande_fournisseur FROM llx_commande_fournisseur LEFT JOIN llx_societe ON llx_commande_fournisseur.fk_soc = llx_societe.idp WHERE llx_societe.idp IS NULL;
|
||||
|
||||
CREATE INDEX idx_commande_fournisseur_fk_soc ON llx_commande_fournisseur(fk_soc);
|
||||
|
||||
ALTER TABLE llx_commande_fournisseur ADD CONSTRAINT fk_commande_fournisseur_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe (rowid);
|
||||
|
||||
CREATE UNIQUE INDEX uk_commande_fournisseur_ref ON llx_commande_fournisseur(ref, fk_soc);
|
||||
@ -1,54 +0,0 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
--
|
||||
-- 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.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
--
|
||||
-- ===================================================================
|
||||
|
||||
create table llx_commande_fournisseur
|
||||
(
|
||||
rowid integer IDENTITY PRIMARY KEY,
|
||||
tms timestamp,
|
||||
fk_soc integer NOT NULL,
|
||||
fk_projet integer DEFAULT 0, -- projet auquel est rattache la commande
|
||||
ref varchar(30) NOT NULL, -- order number
|
||||
|
||||
date_creation datetime, -- SMALLDATETIME de creation
|
||||
date_valid datetime, -- SMALLDATETIME de validation
|
||||
date_cloture datetime, -- SMALLDATETIME de cloture
|
||||
date_commande SMALLDATETIME, -- SMALLDATETIME de la commande
|
||||
fk_user_author integer, -- createur de la commande
|
||||
fk_user_valid integer, -- valideur de la commande
|
||||
fk_user_cloture integer, -- auteur cloture
|
||||
source smallint NOT NULL,
|
||||
fk_statut smallint default 0,
|
||||
amount_ht real default 0,
|
||||
remise_percent real default 0,
|
||||
remise real default 0,
|
||||
tva float default 0,
|
||||
total_ht float default 0,
|
||||
total_ttc float default 0,
|
||||
note text,
|
||||
note_public text,
|
||||
model_pdf varchar(50),
|
||||
|
||||
fk_methode_commande integer default 0,
|
||||
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX ref ON llx_commande_fournisseur(ref)
|
||||
@ -1,22 +0,0 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
--
|
||||
-- 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.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
-- ===================================================================
|
||||
|
||||
CREATE INDEX fk_commande ON llx_commande_fournisseur_dispatch(fk_commande);
|
||||
@ -1,31 +0,0 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
--
|
||||
-- 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.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
-- ===================================================================
|
||||
|
||||
create table llx_commande_fournisseur_dispatch
|
||||
(
|
||||
rowid integer IDENTITY PRIMARY KEY,
|
||||
fk_commande integer,
|
||||
fk_product integer,
|
||||
qty float, -- quantité
|
||||
fk_entrepot integer,
|
||||
fk_user integer,
|
||||
datec datetime
|
||||
);
|
||||
@ -1,31 +0,0 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
--
|
||||
-- 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.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
--
|
||||
-- ===================================================================
|
||||
|
||||
create table llx_commande_fournisseur_log
|
||||
(
|
||||
rowid integer IDENTITY PRIMARY KEY,
|
||||
tms timestamp,
|
||||
datelog datetime NOT NULL,
|
||||
fk_commande integer NOT NULL,
|
||||
fk_statut smallint NOT NULL,
|
||||
fk_user integer NOT NULL
|
||||
);
|
||||
@ -1,40 +0,0 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
--
|
||||
-- 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.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
-- ===================================================================
|
||||
|
||||
create table llx_commande_fournisseurdet
|
||||
(
|
||||
rowid integer IDENTITY PRIMARY KEY,
|
||||
fk_commande integer,
|
||||
fk_product integer,
|
||||
ref varchar(50),
|
||||
label varchar(255),
|
||||
description text,
|
||||
tva_tx real DEFAULT 19.6, -- taux tva
|
||||
qty real, -- quantité
|
||||
remise_percent real DEFAULT 0, -- pourcentage de remise
|
||||
remise real DEFAULT 0, -- montant de la remise
|
||||
price real, -- prix final
|
||||
subprice float, -- prix avant remise
|
||||
total_ht float, -- Total HT de la ligne toute quantité et incluant remise ligne et globale
|
||||
total_tva float, -- Total TVA de la ligne toute quantité et incluant remise ligne et globale
|
||||
total_ttc float, -- Total TTC de la ligne toute quantité et incluant remise ligne et globale
|
||||
info_bits integer DEFAULT 0 -- TVA NPR ou non
|
||||
);
|
||||
@ -1,28 +0,0 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 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, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
-- ===================================================================
|
||||
|
||||
|
||||
-- Supprimme orhpelins pour permettre montée de la clé
|
||||
-- V4 DELETE llx_commandedet FROM llx_commandedet LEFT JOIN llx_commande ON llx_commandedet.fk_commande = llx_commande.rowid WHERE llx_commande.rowid IS NULL;
|
||||
|
||||
CREATE INDEX idx_commandedet_fk_commande ON llx_commandedet(fk_commande);
|
||||
|
||||
-- V4 ALTER TABLE llx_commandedet ADD CONSTRAINT fk_commandedet_fk_commande FOREIGN KEY (fk_commande) REFERENCES llx_commande (rowid);
|
||||
@ -1,50 +0,0 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 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, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
-- ===================================================================
|
||||
|
||||
create table llx_commandedet
|
||||
(
|
||||
rowid integer IDENTITY PRIMARY KEY,
|
||||
fk_commande integer,
|
||||
fk_product integer,
|
||||
description text,
|
||||
tva_tx real, -- taux tva
|
||||
qty real, -- quantité
|
||||
remise_percent real DEFAULT 0, -- pourcentage de remise
|
||||
remise real DEFAULT 0, -- montant de la remise
|
||||
fk_remise_except integer NULL, -- Lien vers table des remises fixes
|
||||
price real, -- prix final
|
||||
subprice float, -- prix avant remise
|
||||
total_ht float, -- Total HT de la ligne toute quantité et incluant remise ligne et globale
|
||||
total_tva float, -- Total TVA de la ligne toute quantité et incluant remise ligne et globale
|
||||
total_ttc float, -- Total TTC de la ligne toute quantité et incluant remise ligne et globale
|
||||
info_bits integer DEFAULT 0, -- TVA NPR ou non
|
||||
marge_tx real, -- taux de marge (marge sur prix d'achat)
|
||||
marque_tx real, -- taux de marque (marge sur prix de vente)
|
||||
special_code tinyint DEFAULT 0, -- code pour les lignes speciales
|
||||
rang integer DEFAULT 0
|
||||
);
|
||||
|
||||
--
|
||||
-- Liste des codes pour special_code
|
||||
--
|
||||
-- 1 : frais de port
|
||||
--
|
||||
@ -1,36 +0,0 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2000-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.
|
||||
--
|
||||
-- ===================================================================
|
||||
|
||||
create table llx_compta
|
||||
(
|
||||
rowid integer IDENTITY PRIMARY KEY,
|
||||
datec datetime,
|
||||
datev SMALLDATETIME, -- SMALLDATETIME de valeur
|
||||
amount real DEFAULT 0 NOT NULL ,
|
||||
label varchar(255),
|
||||
fk_compta_account integer,
|
||||
fk_user_author integer,
|
||||
fk_user_valid integer,
|
||||
valid tinyint DEFAULT 0,
|
||||
note text
|
||||
|
||||
);
|
||||
@ -1,32 +0,0 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2000-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.
|
||||
--
|
||||
-- ===================================================================
|
||||
|
||||
create table llx_compta_account
|
||||
(
|
||||
rowid integer IDENTITY PRIMARY KEY,
|
||||
datec datetime,
|
||||
number varchar(12),
|
||||
label varchar(255),
|
||||
fk_user_author integer,
|
||||
note text
|
||||
|
||||
);
|
||||
@ -1,33 +0,0 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
--
|
||||
-- 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.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
--
|
||||
-- ===================================================================
|
||||
|
||||
create table llx_compta_compte_generaux
|
||||
(
|
||||
rowid integer IDENTITY PRIMARY KEY,
|
||||
date_creation datetime,
|
||||
numero varchar(50),
|
||||
intitule varchar(255),
|
||||
fk_user_author integer,
|
||||
note text,
|
||||
|
||||
UNIQUE(numero)
|
||||
);
|
||||
@ -1,34 +0,0 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
--
|
||||
-- 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.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
--
|
||||
-- ============================================================================
|
||||
|
||||
create table llx_cond_reglement
|
||||
(
|
||||
rowid integer PRIMARY KEY,
|
||||
code varchar(16),
|
||||
sortorder smallint,
|
||||
active tinyint DEFAULT 1,
|
||||
libelle varchar(255),
|
||||
libelle_facture text,
|
||||
fdm tinyint, -- reglement fin de mois
|
||||
nbjour smallint,
|
||||
decalage smallint
|
||||
);
|
||||
@ -1,37 +0,0 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
--
|
||||
-- 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.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
--
|
||||
-- ===========================================================================
|
||||
--
|
||||
-- Definitions des constantes utilisés comme parametres de configuration
|
||||
--
|
||||
|
||||
create table llx_const
|
||||
(
|
||||
rowid integer IDENTITY PRIMARY KEY,
|
||||
name varchar(255),
|
||||
value text, -- max 65535 caracteres
|
||||
type varchar(6) check (type in ('yesno','texte','chaine')),
|
||||
visible tinyint DEFAULT 1 NOT NULL,
|
||||
note text,
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX name ON llx_const(name)
|
||||
@ -1,34 +0,0 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2004-2005 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, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
--
|
||||
-- ============================================================================
|
||||
|
||||
|
||||
-- Supprimme orhpelins pour permettre montée de la clé
|
||||
-- V4 DELETE llx_contratdet FROM llx_contratdet, llx_contrat LEFT JOIN llx_societe ON llx_contrat.fk_soc = llx_societe.idp WHERE llx_contratdet.fk_contrat = llx_contrat.rowid AND llx_societe.idp IS NULL;
|
||||
-- V4 DELETE llx_contrat FROM llx_contrat LEFT JOIN llx_societe ON llx_contrat.fk_soc = llx_societe.idp WHERE llx_societe.idp IS NULL;
|
||||
-- V4 DELETE llx_contrat FROM llx_contrat LEFT JOIN llx_user ON llx_contrat.fk_user_author = llx_user.rowid WHERE llx_user.rowid IS NULL;
|
||||
|
||||
CREATE INDEX idx_contrat_fk_soc ON llx_contrat(fk_soc);
|
||||
CREATE INDEX idx_contrat_fk_user_author ON llx_contrat(fk_user_author);
|
||||
|
||||
ALTER TABLE llx_contrat ADD CONSTRAINT fk_contrat_societe FOREIGN KEY (fk_soc) REFERENCES llx_societe (rowid);
|
||||
ALTER TABLE llx_contrat ADD CONSTRAINT fk_contrat_user_author FOREIGN KEY (fk_user_author) REFERENCES llx_user (rowid);
|
||||
@ -1,45 +0,0 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2004-2005 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, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
--
|
||||
-- ============================================================================
|
||||
|
||||
create table llx_contrat
|
||||
(
|
||||
rowid integer IDENTITY PRIMARY KEY,
|
||||
ref varchar(30), -- reference de contrat
|
||||
tms timestamp,
|
||||
datec datetime, -- SMALLDATETIME de creation de l'enregistrement
|
||||
date_contrat datetime,
|
||||
statut smallint DEFAULT 0,
|
||||
mise_en_service datetime,
|
||||
fin_validite datetime,
|
||||
date_cloture datetime,
|
||||
fk_soc integer NOT NULL,
|
||||
fk_projet integer,
|
||||
fk_commercial_signature integer NOT NULL, -- obsolete
|
||||
fk_commercial_suivi integer NOT NULL, -- obsolete
|
||||
fk_user_author integer NOT NULL default 0,
|
||||
fk_user_mise_en_service integer,
|
||||
fk_user_cloture integer,
|
||||
note text,
|
||||
note_public text
|
||||
);
|
||||
|
||||
@ -1,32 +0,0 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2005 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, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
--
|
||||
-- ============================================================================
|
||||
|
||||
|
||||
CREATE INDEX idx_contratdet_fk_contrat ON llx_contratdet(fk_contrat);
|
||||
CREATE INDEX idx_contratdet_fk_product ON llx_contratdet(fk_product);
|
||||
CREATE INDEX idx_contratdet_date_ouverture_prevue ON llx_contratdet(date_ouverture_prevue);
|
||||
CREATE INDEX idx_contratdet_date_ouverture ON llx_contratdet(date_ouverture);
|
||||
CREATE INDEX idx_contratdet_date_fin_validite ON llx_contratdet(date_fin_validite);
|
||||
|
||||
ALTER TABLE llx_contratdet ADD CONSTRAINT fk_contratdet_fk_contrat FOREIGN KEY (fk_contrat) REFERENCES llx_contrat (rowid);
|
||||
ALTER TABLE llx_contratdet ADD CONSTRAINT fk_contratdet_fk_product FOREIGN KEY (fk_product) REFERENCES llx_product (rowid);
|
||||
@ -1,59 +0,0 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
--
|
||||
-- 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.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
--
|
||||
-- ============================================================================
|
||||
|
||||
create table llx_contratdet
|
||||
(
|
||||
rowid integer IDENTITY PRIMARY KEY,
|
||||
tms timestamp,
|
||||
|
||||
fk_contrat integer NOT NULL,
|
||||
fk_product integer NULL, -- doit pouvoir etre nul pour ligne detail sans produits
|
||||
|
||||
statut smallint DEFAULT 0,
|
||||
|
||||
label text, -- libellé du produit
|
||||
description text,
|
||||
fk_remise_except integer NULL, -- Lien vers table des remises fixes
|
||||
|
||||
date_commande datetime,
|
||||
date_ouverture_prevue datetime,
|
||||
date_ouverture datetime, -- SMALLDATETIME d'ouverture du service chez le client
|
||||
date_fin_validite datetime,
|
||||
date_cloture datetime,
|
||||
|
||||
tva_tx float DEFAULT 19.6, -- taux tva
|
||||
qty real, -- quantité
|
||||
remise_percent real DEFAULT 0, -- pourcentage de remise
|
||||
subprice float, -- prix avant remise
|
||||
price_ht real, -- prix final
|
||||
remise real DEFAULT 0, -- montant de la remise
|
||||
total_ht float, -- Total HT de la ligne toute quantité et incluant remise ligne et globale
|
||||
total_tva float, -- Total TVA de la ligne toute quantité et incluant remise ligne et globale
|
||||
total_ttc float, -- Total TTC de la ligne toute quantité et incluant remise ligne et globale
|
||||
info_bits integer DEFAULT 0, -- TVA NPR ou non
|
||||
|
||||
fk_user_author integer NOT NULL default 0,
|
||||
fk_user_ouverture integer,
|
||||
fk_user_cloture integer,
|
||||
commentaire text
|
||||
|
||||
);
|
||||
@ -1,26 +0,0 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 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, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
--
|
||||
-- ============================================================================
|
||||
|
||||
CREATE INDEX idx_contratdet_log_fk_contratdet ON llx_contratdet_log(fk_contratdet);
|
||||
CREATE INDEX idx_contratdet_log_date ON llx_contratdet_log(SMALLDATETIME);
|
||||
|
||||
ALTER TABLE llx_contratdet_log ADD CONSTRAINT fk_contratdet_log_fk_contratdet FOREIGN KEY (fk_contratdet) REFERENCES llx_contratdet (rowid);
|
||||
@ -1,33 +0,0 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
--
|
||||
-- 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.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
--
|
||||
-- ============================================================================
|
||||
|
||||
create table llx_contratdet_log
|
||||
(
|
||||
rowid integer IDENTITY PRIMARY KEY,
|
||||
tms timestamp,
|
||||
fk_contratdet integer NOT NULL,
|
||||
SMALLDATETIME datetime NOT NULL,
|
||||
statut smallint NOT NULL,
|
||||
fk_user_author integer NOT NULL,
|
||||
commentaire text
|
||||
|
||||
);
|
||||
@ -1,23 +0,0 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2007 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, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
--
|
||||
-- ============================================================================
|
||||
|
||||
CREATE UNIQUE INDEX uk_cotisation ON llx_cotisation(fk_adherent,dateadh);
|
||||
@ -1,32 +0,0 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
--
|
||||
-- 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.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
-- ===================================================================
|
||||
|
||||
create table llx_cotisation
|
||||
(
|
||||
rowid integer IDENTITY PRIMARY KEY,
|
||||
tms timestamp,
|
||||
datec datetime,
|
||||
fk_adherent integer,
|
||||
dateadh datetime,
|
||||
cotisation real,
|
||||
fk_bank integer DEFAULT NULL,
|
||||
note text
|
||||
);
|
||||
@ -1,35 +0,0 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
--
|
||||
-- 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.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
--
|
||||
-- ============================================================================
|
||||
|
||||
create table llx_deplacement
|
||||
(
|
||||
rowid integer IDENTITY PRIMARY KEY,
|
||||
datec datetime NOT NULL,
|
||||
tms timestamp,
|
||||
dated datetime,
|
||||
fk_user integer NOT NULL,
|
||||
fk_user_author integer,
|
||||
type smallint NOT NULL,
|
||||
km smallint,
|
||||
fk_soc integer,
|
||||
note text
|
||||
);
|
||||
@ -1,33 +0,0 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
--
|
||||
-- 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.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
-- ===================================================================
|
||||
|
||||
create table llx_document
|
||||
(
|
||||
rowid integer IDENTITY PRIMARY KEY,
|
||||
name varchar(255) NOT NULL,
|
||||
file_name varchar(255) NOT NULL,
|
||||
file_extension varchar(5) NOT NULL,
|
||||
date_generation datetime NULL,
|
||||
fk_owner integer NULL,
|
||||
fk_group integer NULL,
|
||||
permissions char(9) DEFAULT 'rw-rw-rw'
|
||||
|
||||
);
|
||||
@ -1,29 +0,0 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
--
|
||||
-- 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.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
-- ===================================================================
|
||||
|
||||
create table llx_document_generator
|
||||
(
|
||||
rowid integer NOT NULL PRIMARY KEY,
|
||||
name varchar(255) NOT NULL,
|
||||
classfile varchar(255) NOT NULL,
|
||||
class varchar(255) NOT NULL
|
||||
|
||||
);
|
||||
@ -1,24 +0,0 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2007 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, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
--
|
||||
-- ===================================================================
|
||||
|
||||
|
||||
CREATE UNIQUE INDEX uk_document_model ON llx_document_model(nom,type);
|
||||
@ -1,33 +0,0 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 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, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
--
|
||||
-- Liste des modeles de document disponibles
|
||||
--
|
||||
-- ===================================================================
|
||||
|
||||
create table llx_document_model
|
||||
(
|
||||
rowid integer IDENTITY PRIMARY KEY,
|
||||
nom varchar(50),
|
||||
type varchar(20) NOT NULL,
|
||||
libelle varchar(255),
|
||||
description text
|
||||
);
|
||||
@ -1,32 +0,0 @@
|
||||
-- ========================================================================
|
||||
-- Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
--
|
||||
-- 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.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
--
|
||||
-- ========================================================================
|
||||
|
||||
create table llx_dolibarr_modules
|
||||
(
|
||||
numero integer PRIMARY KEY,
|
||||
active tinyint DEFAULT 0 NOT NULL,
|
||||
active_date datetime NOT NULL,
|
||||
active_version varchar(25) NOT NULL
|
||||
|
||||
);
|
||||
|
||||
|
||||
@ -1,30 +0,0 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
--
|
||||
-- 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.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
--
|
||||
-- ===================================================================
|
||||
|
||||
create table llx_domain
|
||||
(
|
||||
rowid integer IDENTITY PRIMARY KEY,
|
||||
datec datetime,
|
||||
label varchar(255),
|
||||
note text
|
||||
);
|
||||
|
||||
@ -1,45 +0,0 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
--
|
||||
-- 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.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
--
|
||||
-- ===================================================================
|
||||
|
||||
create table llx_don
|
||||
(
|
||||
rowid integer IDENTITY PRIMARY KEY,
|
||||
tms timestamp,
|
||||
fk_statut smallint NOT NULL DEFAULT 0,-- etat du don promesse/valid
|
||||
datec datetime, -- SMALLDATETIME de création de l'enregistrement
|
||||
datedon datetime, -- SMALLDATETIME du don/promesse
|
||||
amount real DEFAULT 0,
|
||||
fk_paiement integer,
|
||||
prenom varchar(50),
|
||||
nom varchar(50),
|
||||
societe varchar(50),
|
||||
adresse text,
|
||||
cp varchar(30),
|
||||
ville varchar(50),
|
||||
pays varchar(50),
|
||||
email varchar(255),
|
||||
[public] smallint DEFAULT 1 NOT NULL, -- le don est-il [public] (0,1)
|
||||
fk_don_projet integer NOT NULL, -- projet auquel est fait le don
|
||||
fk_user_author integer NOT NULL,
|
||||
fk_user_valid integer NOT NULL,
|
||||
note text
|
||||
);
|
||||
@ -1,31 +0,0 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
--
|
||||
-- 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.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
--
|
||||
-- ===================================================================
|
||||
|
||||
create table llx_don_projet
|
||||
(
|
||||
rowid integer IDENTITY PRIMARY KEY,
|
||||
tms timestamp,
|
||||
datec datetime,
|
||||
libelle varchar(255),
|
||||
fk_user_author integer NOT NULL,
|
||||
note text
|
||||
);
|
||||
@ -1,32 +0,0 @@
|
||||
-- ========================================================================
|
||||
-- Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||
--
|
||||
-- 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.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
--
|
||||
-- ========================================================================
|
||||
|
||||
|
||||
create table llx_droitpret_rapport (
|
||||
rowid integer NOT NULL identity PRIMARY KEY,
|
||||
date_envoie datetime NOT NULL,
|
||||
format varchar(10) NOT NULL,
|
||||
date_debut datetime NOT NULL,
|
||||
date_fin datetime NOT NULL,
|
||||
fichier varchar(255) NOT NULL,
|
||||
nbfact integer NOT NULL,
|
||||
);
|
||||
@ -1,27 +0,0 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2005 patrick Rouillon <patrick@rouillon.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, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
--
|
||||
-- ============================================================================
|
||||
|
||||
CREATE UNIQUE INDEX idx_element_contact_idx1 ON llx_element_contact(element_id, fk_c_type_contact, fk_socpeople);
|
||||
|
||||
ALTER TABLE llx_element_contact
|
||||
ADD CONSTRAINT fk_element_contact_fk_c_type_contact
|
||||
FOREIGN KEY (fk_c_type_contact) REFERENCES llx_c_type_contact(rowid);
|
||||
@ -1,36 +0,0 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2005 patrick Rouillon <patrick@rouillon.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, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
--
|
||||
-- Association de personnes/societes avec un element de la base (contrat, projet, propal).
|
||||
-- Permet de definir plusieur type d'intervenant sur un element.
|
||||
-- i.e. commercial, adresse de facturation, prestataire...
|
||||
-- ============================================================================
|
||||
|
||||
create table llx_element_contact
|
||||
(
|
||||
rowid integer IDENTITY PRIMARY KEY,
|
||||
datecreate datetime NULL, -- SMALLDATETIME de creation de l'enregistrement
|
||||
statut smallint DEFAULT 5, -- 5 inactif, 4 actif
|
||||
|
||||
element_id integer NOT NULL, -- la reference de l'element.
|
||||
fk_c_type_contact integer NOT NULL, -- nature du contact.
|
||||
fk_socpeople integer NOT NULL
|
||||
);
|
||||
|
||||
@ -1,32 +0,0 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
--
|
||||
-- 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.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
--
|
||||
-- ===================================================================
|
||||
|
||||
create table llx_energie_compteur
|
||||
(
|
||||
rowid integer IDENTITY PRIMARY KEY,
|
||||
libelle varchar(50),
|
||||
fk_energie integer NOT NULL,
|
||||
datec datetime,
|
||||
fk_user_author integer NOT NULL,
|
||||
|
||||
note text
|
||||
);
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user