2
0
forked from Wavyzz/dolibarr

Dbut implmentation base MSSQL - merci Simon

This commit is contained in:
Regis Houssin
2007-09-01 13:25:36 +00:00
parent d6d7d2e984
commit 220efb96b6
43 changed files with 308 additions and 191 deletions

View File

@@ -23,7 +23,7 @@ create table llx_accountingtransaction
(
rowid integer IDENTITY PRIMARY KEY,
label varchar(128) NOT NULL,
datec datetime NOT NULL,
datec SMALLDATETIME NOT NULL,
fk_author varchar(20) NOT NULL,
tms timestamp,
fk_facture integer,

View File

@@ -26,11 +26,11 @@
create table llx_actioncomm
(
id integer IDENTITY PRIMARY KEY,
datec datetime, -- SMALLDATETIME creation
datep datetime, -- SMALLDATETIME debut planifiee
datep2 datetime, -- SMALLDATETIME fin planifiee si action non ponctuelle
datea datetime, -- SMALLDATETIME debut realisation
datea2 datetime, -- SMALLDATETIME fin realisation si action non ponctuelle
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

View File

@@ -45,14 +45,14 @@ create table llx_adherent
phone varchar(30),
phone_perso varchar(30),
phone_mobile varchar(30),
naiss datetime, -- SMALLDATETIME de naissance
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 datetime, -- SMALLDATETIME de fin de validit<69> de la cotisation
datefin SMALLDATETIME, -- SMALLDATETIME de fin de validit<69> de la cotisation
note text,
datevalid datetime, -- SMALLDATETIME de validation
datec datetime, -- SMALLDATETIME de creation
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,

View File

@@ -0,0 +1,24 @@
-- ============================================================================
-- 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);

View File

@@ -30,7 +30,7 @@ create table llx_adherent_type
rowid integer IDENTITY PRIMARY KEY,
tms timestamp,
statut smallint NOT NULL DEFAULT 0,
libelle varchar(50),
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,

View File

@@ -25,8 +25,8 @@ create table llx_bank
(
rowid integer IDENTITY PRIMARY KEY,
datec datetime,
datev datetime, -- SMALLDATETIME de valeur
dateo datetime, -- SMALLDATETIME operation
datev SMALLDATETIME, -- SMALLDATETIME de valeur
dateo SMALLDATETIME, -- SMALLDATETIME operation
amount real NOT NULL default 0,
label varchar(255),
fk_account integer,

View File

@@ -47,7 +47,7 @@ create table llx_bank_account
rappro smallint DEFAULT 1,
url varchar(128),
account_number varchar(8),
currency_code varchar(2) NOT NULL,
currency_code varchar(3) NOT NULL,
min_allowed integer DEFAULT 0,
min_desired integer DEFAULT 0,
comment varchar(254)

View File

@@ -28,5 +28,5 @@ create table llx_bank_url
url_id integer,
url varchar(255),
label varchar(255),
type varchar(12) check (type in ('company','payment','member','subscription','donation','sc','payment_sc'))
type varchar(16) NOT NULL check (type in ('company','payment','payment_supplier','member','subscription','donation','sc','payment_sc'))
);

View File

@@ -0,0 +1,32 @@
-- ========================================================================
-- Copyright (C) 2007 R<>gis Houssin <regis.houssin@cap-networks.com>
--
-- $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 <20> la traduction et <20> la r<>f<EFBFBD>rence interne
libelle varchar(255), -- Description
price FLOAT(25), -- Montant HT
organization varchar(255), -- Organisme g<>rant le bar<61>me tarifaire
fk_pays integer NOT NULL, -- Pays correspondant
active tinyint DEFAULT 1 NOT NULL
);

View File

@@ -22,5 +22,5 @@
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_code_iso ON llx_c_pays(code_iso);
CREATE UNIQUE INDEX idx_c_pays_libelle ON llx_c_pays(libelle);

View File

@@ -27,5 +27,6 @@ create table llx_categorie
rowid integer IDENTITY PRIMARY KEY,
label VARCHAR(255), -- nom de la cat<61>gorie
description text, -- description de la cat<61>gorie
visible tinyint DEFAULT 1 NOT NULL -- determine si les produits sont visible ou pas
visible tinyint DEFAULT 1 NOT NULL, -- determine si les produits sont visible ou pas
type integer not null default 0
);

View File

@@ -0,0 +1,28 @@
-- ============================================================================
-- 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);

View File

@@ -0,0 +1,23 @@
-- ============================================================================
-- 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
);

View File

@@ -28,7 +28,7 @@ create table llx_chargesociales
fk_type integer,
amount real default 0 NOT NULL,
paye smallint default 0 NOT NULL,
periode datetime
periode SMALLDATETIME
);

View File

@@ -32,7 +32,7 @@ create table llx_commande
date_creation datetime, -- SMALLDATETIME de creation
date_valid datetime, -- SMALLDATETIME de validation
date_cloture datetime, -- SMALLDATETIME de cloture
date_commande datetime, -- SMALLDATETIME de la commande
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
@@ -52,7 +52,7 @@ create table llx_commande
facture tinyint default 0,
fk_cond_reglement integer, -- condition de r<>glement
fk_mode_reglement integer, -- mode de r<>glement
date_livraison datetime default NULL,
date_livraison SMALLDATETIME default NULL,
fk_adresse_livraison integer, -- adresse de livraison
);

View File

@@ -31,7 +31,7 @@ create table llx_commande_fournisseur
date_creation datetime, -- SMALLDATETIME de creation
date_valid datetime, -- SMALLDATETIME de validation
date_cloture datetime, -- SMALLDATETIME de cloture
date_commande datetime, -- SMALLDATETIME de la commande
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

View File

@@ -31,6 +31,10 @@ create table llx_commande_fournisseurdet
qty real, -- quantit<69>
remise_percent real DEFAULT 0, -- pourcentage de remise
remise real DEFAULT 0, -- montant de la remise
subprice real, -- prix avant remise
price real -- prix final
price real, -- prix final
subprice float, -- prix avant remise
total_ht float, -- Total HT de la ligne toute quantit<69> et incluant remise ligne et globale
total_tva float, -- Total TVA de la ligne toute quantit<69> et incluant remise ligne et globale
total_ttc float, -- Total TTC de la ligne toute quantit<69> et incluant remise ligne et globale
info_bits integer DEFAULT 0 -- TVA NPR ou non
);

View File

@@ -24,7 +24,7 @@ create table llx_compta
(
rowid integer IDENTITY PRIMARY KEY,
datec datetime,
datev datetime, -- SMALLDATETIME de valeur
datev SMALLDATETIME, -- SMALLDATETIME de valeur
amount real DEFAULT 0 NOT NULL ,
label varchar(255),
fk_compta_account integer,

View File

@@ -0,0 +1,23 @@
-- ============================================================================
-- 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);

View File

@@ -1,17 +1,17 @@
-- ========================================================================
-- Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- 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
-- 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.
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General [public] License
-- 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.
--
@@ -20,13 +20,13 @@
--
-- ========================================================================
create table llx_soc_events
(
rowid integer IDENTITY PRIMARY KEY, -- [public] id
fk_soc integer NOT NULL, --
dateb datetime NOT NULL, -- begin SMALLDATETIME
datee datetime NOT NULL, -- end SMALLDATETIME
title varchar(100) NOT NULL,
url varchar(255),
description text
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,
);

View File

@@ -24,7 +24,7 @@ create table llx_entrepot_valorisation
(
rowid integer IDENTITY PRIMARY KEY,
tms timestamp, -- SMALLDATETIME technique mise <20> jour automatiquement
date_calcul datetime, -- SMALLDATETIME auquel a ete calcule la valeur
date_calcul SMALLDATETIME, -- SMALLDATETIME auquel a ete calcule la valeur
fk_entrepot integer NOT NULL ,
valo_pmp float(12) -- valoristaion du stock en PMP
--key(fk_entrepot)

View File

@@ -28,7 +28,7 @@ create table llx_expedition
fk_commande integer,
date_creation datetime, -- SMALLDATETIME de creation
date_valid datetime, -- SMALLDATETIME de validation
date_expedition datetime, -- SMALLDATETIME de l'expedition
date_expedition SMALLDATETIME, -- SMALLDATETIME de l'expedition
fk_user_author integer, -- createur
fk_user_valid integer, -- valideur
fk_entrepot integer,

View File

@@ -29,8 +29,8 @@ create table llx_facture
increment varchar(10),
fk_soc integer NOT NULL,
datec datetime, -- SMALLDATETIME de creation de la facture
datef datetime, -- SMALLDATETIME de la facture
date_valid datetime, -- SMALLDATETIME de validation
datef SMALLDATETIME, -- SMALLDATETIME de la facture
date_valid SMALLDATETIME, -- SMALLDATETIME de validation
paye smallint DEFAULT 0 NOT NULL,
amount real DEFAULT 0 NOT NULL,
remise_percent real DEFAULT 0, -- remise relative
@@ -54,7 +54,7 @@ create table llx_facture
fk_cond_reglement integer DEFAULT 1 NOT NULL, -- condition de reglement (30 jours, fin de mois ...)
fk_mode_reglement integer, -- mode de reglement (Virement, Pr<50>l<EFBFBD>vement)
date_lim_reglement datetime, -- SMALLDATETIME limite de reglement
date_lim_reglement SMALLDATETIME, -- SMALLDATETIME limite de reglement
note text,
note_public text,

View File

@@ -27,7 +27,7 @@ create table llx_facture_fourn
type smallint DEFAULT 0 NOT NULL,
fk_soc integer NOT NULL,
datec datetime, -- SMALLDATETIME de creation de la facture
datef datetime, -- SMALLDATETIME de la facture
datef SMALLDATETIME, -- SMALLDATETIME de la facture
libelle varchar(255),
paye smallint DEFAULT 0 NOT NULL,
amount real DEFAULT 0 NOT NULL,
@@ -46,7 +46,7 @@ create table llx_facture_fourn
fk_projet integer, -- projet auquel est associ<63>e la facture
fk_cond_reglement integer DEFAULT 1 NOT NULL, -- condition de reglement (30 jours, fin de mois ...)
date_lim_reglement datetime, -- SMALLDATETIME limite de reglement
date_lim_reglement SMALLDATETIME, -- SMALLDATETIME limite de reglement
note text,
note_public text

View File

@@ -39,7 +39,7 @@ create table llx_facture_rec
fk_projet integer, -- projet auquel est associ<63> la facture
fk_cond_reglement integer DEFAULT 0, -- condition de reglement
fk_mode_reglement integer DEFAULT 0, -- mode de reglement (Virement, Pr<50>l<EFBFBD>vement)
date_lim_reglement datetime, -- SMALLDATETIME limite de reglement
date_lim_reglement SMALLDATETIME, -- SMALLDATETIME limite de reglement
note text,
note_public text,

View File

@@ -22,7 +22,7 @@
create table llx_facture_stats
(
date_full datetime,
date_day datetime,
date_day SMALLDATETIME,
data varchar(50),
value real

View File

@@ -24,7 +24,7 @@ create table llx_fichinterdet
(
rowid integer IDENTITY PRIMARY KEY,
fk_fichinter integer,
SMALLDATETIME SMALLDATETIME, -- SMALLDATETIME de la ligne d'intervention
date SMALLDATETIME, -- SMALLDATETIME de la ligne d'intervention
description text, -- description de la ligne d'intervention
duree integer, -- duree de la ligne d'intervention
rang integer DEFAULT 0 -- ordre affichage sur la fiche

View File

@@ -37,7 +37,7 @@ create table llx_livraison
note text,
note_public text,
model_pdf varchar(50),
date_livraison datetime default NULL,
date_livraison SMALLDATETIME default NULL,
fk_adresse_livraison integer -- adresse de livraison
--key(fk_commande)

45
mssql/tables/llx_menu.sql Normal file
View File

@@ -0,0 +1,45 @@
-- ========================================================================
-- Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
-- 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_menu (
rowid integer PRIMARY KEY NOT NULL ,
menu_handler varchar(16) NOT NULL default 'auguria', -- Menu handler name
type varchar(4) NOT NULL check (type in ('top','left')) default 'left', -- Menu top or left
mainmenu varchar(100) NOT NULL, -- Name family/module (home, companies, ...)
fk_menu integer NOT NULL, -- 0 or Id of mother menu line
[order] SMALLINT NOT NULL, -- Order of entry
url varchar(255) NOT NULL, -- Relative (or absolute) url to go
target varchar(100) NULL, -- Target of Url link
titre varchar(255) NOT NULL, -- Key for menu translation
langs varchar(100), -- Lang file to load for translation
level SMALLINT, -- ???
leftmenu varchar(100) NULL, -- Condition to show or hide
[right] varchar(255), -- Condition to show enabled or disabled
[user] SMALLINT NOT NULL default '0', -- 0 if menu for all users, 1 for external only, 2 for internal only
);

View File

@@ -0,0 +1,29 @@
-- ========================================================================
-- Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
-- 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_menu_const_fk_menu on llx_menu_const(fk_menu);
CREATE INDEX idx_menu_const_fk_constraint on llx_menu_const(fk_constraint);
ALTER TABLE llx_menu_const ADD CONSTRAINT fk_menu_const_fk_menu FOREIGN KEY (fk_menu) REFERENCES llx_menu (rowid);
ALTER TABLE llx_menu_const ADD CONSTRAINT fk_menu_const_fk_constraint FOREIGN KEY (fk_constraint) REFERENCES llx_menu_constraint (rowid);

View File

@@ -1,34 +1,30 @@
-- ===================================================================
-- Copyright (C) 2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- ========================================================================
-- 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
-- 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.
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General [public] License
-- 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_ventes
(
rowid integer IDENTITY PRIMARY KEY,
fk_soc integer NOT NULL,
fk_product integer NOT NULL,
dated datetime, -- SMALLDATETIME debut
datef datetime, -- SMALLDATETIME fin
price real,
author varchar(30),
active smallint DEFAULT 0 NOT NULL,
note varchar(255)
CREATE TABLE llx_menu_const (
rowid integer NOT NULL IDENTITY PRIMARY KEY,
fk_menu integer NOT NULL,
fk_constraint integer NOT NULL,
[user] tinyint NOT NULL default 2
);

View File

@@ -0,0 +1,27 @@
-- ========================================================================
-- 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_menu_constraint (
rowid integer PRIMARY KEY NOT NULL,
action varchar(255) NOT NULL
);

View File

@@ -1,45 +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_newsletter
(
rowid integer IDENTITY PRIMARY KEY,
datec datetime,
tms timestamp,
email_subject varchar(32) NOT NULL,
email_from_name varchar(255) NOT NULL,
email_from_email varchar(255) NOT NULL,
email_replyto varchar(255) NOT NULL,
email_body text,
target smallint,
sql_target text,
status smallint DEFAULT 0 NOT NULL,
date_send_request datetime, -- debut de l'envoi demand<6E>
date_send_begin datetime, -- debut de l'envoi
date_send_end datetime, -- fin de l'envoi
nbsent integer, -- nombre de mails envoy<6F>s
nberror integer, -- nombre de mails envoy<6F>s
fk_user_author integer,
fk_user_valid integer,
fk_user_modif integer
);

View File

@@ -24,7 +24,7 @@ create table llx_notify_def
(
rowid integer IDENTITY PRIMARY KEY,
tms timestamp,
datec datetime, -- SMALLDATETIME de creation
datec SMALLDATETIME, -- SMALLDATETIME de creation
fk_action integer NOT NULL,
fk_soc integer NOT NULL,
fk_contact integer NOT NULL

View File

@@ -26,7 +26,7 @@ create table llx_projet
fk_soc integer NOT NULL,
fk_statut smallint NOT NULL,
tms timestamp,
dateo datetime, -- SMALLDATETIME d'ouverture du projet
dateo SMALLDATETIME, -- SMALLDATETIME d'ouverture du projet
ref varchar(50),
title varchar(255),
fk_user_resp integer, -- responsable du projet

View File

@@ -24,7 +24,7 @@ create table llx_projet_task_time
(
rowid integer IDENTITY PRIMARY KEY,
fk_task integer NOT NULL,
task_date datetime,
task_date SMALLDATETIME,
task_duration FLOAT(25),
fk_user integer,
note text

View File

@@ -29,7 +29,7 @@ create table llx_propal
ref_client varchar(30), -- customer order number
datec datetime, -- SMALLDATETIME de creation
datep datetime, -- SMALLDATETIME de la propal
datep SMALLDATETIME, -- SMALLDATETIME de la propal
fin_validite datetime, -- SMALLDATETIME de fin de validite
date_valid datetime, -- SMALLDATETIME de validation
date_cloture datetime, -- SMALLDATETIME de cloture

View File

@@ -33,7 +33,7 @@ create table llx_socpeople
cp varchar(25),
ville varchar(255),
fk_pays integer DEFAULT 0,
birthday datetime,
birthday SMALLDATETIME,
poste varchar(80),
phone varchar(30),
phone_perso varchar(30),

View File

@@ -1,32 +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 table llx_models
(
rowid integer IDENTITY PRIMARY KEY,
tms timestamp,
type varchar(32), -- Fonction destinee au modele
[public] smallint DEFAULT 1 NOT NULL, -- Model publique ou privee
fk_user integer, -- Id utilisateur si privee, sinon null
title varchar(128), -- Titre modele
content text -- Texte du modele
);

View File

@@ -1,38 +0,0 @@
-- ========================================================================
-- Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
--
-- $Id$
-- $Source$
--
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General [public] License as published by
-- the Free Software Foundation; either version 2 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General [public] License for more details.
--
-- You should have received a copy of the GNU General [public] License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
--
-- Actions commerciales a effectuer
--
-- ========================================================================
create table llx_todocomm
(
id integer IDENTITY PRIMARY KEY,
datea datetime, -- SMALLDATETIME de l'action
label varchar(50), -- libelle de l'action
fk_user_action integer, -- id de la personne qui doit effectuer l'action
fk_user_author integer, -- id auteur de l'action
fk_soc integer, -- id de la societe auquel est rattachee l'action
fk_contact integer, -- id du contact sur laquelle l'action
-- doit etre effectuee
note text
);

View File

@@ -24,8 +24,8 @@ create table llx_tva
(
rowid integer IDENTITY PRIMARY KEY,
tms timestamp,
datep datetime, -- SMALLDATETIME de paiement
datev datetime, -- SMALLDATETIME de valeur
datep SMALLDATETIME, -- SMALLDATETIME de paiement
datev SMALLDATETIME, -- SMALLDATETIME de valeur
amount real NOT NULL DEFAULT 0,
label varchar(255),
note text

View File

@@ -30,7 +30,7 @@ create table llx_voyage
rowid integer IDENTITY PRIMARY KEY,
datec datetime,
dateo datetime, -- SMALLDATETIME operation
dateo SMALLDATETIME, -- SMALLDATETIME operation
date_depart datetime, -- SMALLDATETIME du voyage
date_arrivee datetime, -- SMALLDATETIME du voyage
amount real NOT NULL DEFAULT 0, -- prix du billet

View File

@@ -24,9 +24,9 @@ create table llx_voyage_reduc
(
rowid integer IDENTITY PRIMARY KEY,
datec datetime,
datev datetime, -- SMALLDATETIME de valeur
date_debut datetime, -- SMALLDATETIME operation
date_fin datetime,
datev SMALLDATETIME, -- SMALLDATETIME de valeur
date_debut SMALLDATETIME, -- SMALLDATETIME operation
date_fin SMALLDATETIME,
amount real NOT NULL DEFAULT 0,
label varchar(255),
numero varchar(255),